JPEG is a standard in image compression and is one of the fastest algorithms, but it has one problem: JPEG compresses with loss of quality. If the photo is subjected to multiple processing, it is unacceptable, and in such cases you have to look for an alternative. I want something quick and at the same time with an acceptable degree of compression.
A quick look at the
benchmarks of losless algorithms on a sample of photos does not give grounds for joy: it turns out that PNG is very fast at unpacking, but it is extremely slow in compressing images.
There are still JPEG-LS, good at first glance. But HP has a patent for it, so no chance of use. German programmer Christoph Feck decided to correct the situation and
released his ImageZero photo compression
algorithm without loss of quality. It is about 20 times faster than PNG, and is comparable to JPEG-LS in compression.
London Bridge (Tower Bridge): Reflection on the River Thames. Photo by: Anirudh Koul')
The results of processing a
full-size version of the photographs of the London Bridge (4507 × 3512 pixels)
Method | file size | Compression | Unpacking |
Without compression | 46380 KB | - | - |
Jls | 14984 KB | 6.6 s | 7.3 s |
PNG | 16256 KB | 42.4 s | 2.4 s |
Iz | 15496 KB | 1.2 s | 1.3 seconds |
Judging by the first independent tests, IZ claims to be generally the fastest lossless algorithm for 24-bit photos, and in terms of compression, it also looks good.
The author of the algorithm
writes that IZ is not intended for greyscale-images or synthetic images, but he can adapt it for these tasks. Now IZ works best on full-color photos and can be used in storage systems, for generating thumbnails for previewing, as well as a future format for icons.
ImageZero source code (BSD licensed)