For many, it is no secret that most JPEG and PNG images contain redundant information that can be deleted without loss of quality. Usually this is achieved due to heuristic algorithms for searching various compression parameters and choosing the least cost option. The use of optimizers is especially important on files that are used on visited sites, to save disk space, traffic and reduce page load time for users. There are quite a few programs of this type and we set ourselves the goal of finding which optimizers compress better and work quickly.
The following programs took part in the test.
For PNG :
')
1.
Leanify 0.4.3 (x64)
2.
pingo v0.79c3.
pinga v0.094.
OptiPNG 0.7.65.
pngout6.
PngOptimizer 2.5 (x64)7.
advpng aka AdvanceCOMP v1.238.
ECT 0.6 (x64)9.
TruePNG 0.6.2.210.
pngwolf-zopfli 1.1.1 (x64)For JPEG :
1.
Leanify 0.4.3 (x64)
2.
pingo v0.79c3.
ECT 0.6 (x64)
4.
mozjpeg 3.2 (x64)
5.
jhead 3.006.
jpegoptim v1.4.4 (x64)
7.
jpegtran100 PNG files and 100 JPG files were selected as test samples. Different sizes and resolutions from very small to huge. Each of the programs was launched on the whole set. The file size was considered after optimization and how long it took the program to optimize. Summary tables are shown below.
Table 1. Best PNG optimizers in terms of compression | Maximum | 88.49 |
1 place | Ect | 88.98 |
2nd place | Leanify | 89.62 |
3rd place | Pingo | 89.69 |
4th place | pngwolf | 91.34 |
5th place | pngout | 91.85 |
6 place | TRUEPng | 93.01 |
7th place | Optipng | 94.19 |
8th place | pinga | 94.8 |
9th place | PNGOptimizer | 95.13 |
10 place | advpng | 97.27 |
Table 2. The best optimizers PNG for speed1 place | PNGOptimizer | 00:04:08 |
2nd place | pinga | 00:21:41 |
3rd place | Pingo | 00:23:15 |
4th place | TruePNG | 01:53:29 |
5th place | Leanify | 01:57:00 |
6 place | pngout | 02:53:09 |
7th place | pngwolf | 02:55:26 |
8th place | Ect | 03:06:08 |
9th place | advpng | 03:25:34 |
10 place | Optipng | 03:39:05 |
Table 3. Summary table for PNG optimizersBY | Speed rank | Compression rank | Overall rank | Open source |
---|
Pingo | 3 | 3 | 6 | - |
Leanify | five | 2 | 7 | + |
Ect | eight | one | 9 | + |
PNGOptimizer | one | 9 | ten | + |
TruePNG | four | 6 | ten | - |
pinga | 2 | eight | ten | - |
pngout | 6 | five | eleven | + |
pngwolf | 7 | four | eleven | + |
Optipng | ten | 7 | 17 | + |
advpng | 9 | ten | nineteen | + |
Table 4. The best optimizers JPG in terms of compression1 place | Ect | 89.996 |
1 place | pingo | 89.996 |
1 place | leanify | 89.997 |
1 place | mozjpeg | 89.999 |
5th place | jpegoptim | 90.880 |
6 place | jpegtran | 90.924 |
7th place | jhead | 99.592 |
Table 5. The best JPG optimizers for speed1 place | jhead | 00:00:25 |
2nd place | jpegtran | 00:00:52 |
3rd place | jpegoptim | 00:01:03 |
4th place | leanify | 00:01:30 |
5th place | pingo | 00:01:42 |
6 place | mozjpeg | 00:01:55 |
7th place | Ect | 00:02:52 |
Table 6. Summary table for JPG optimizersSoft | Speed rank | Compression rank | Overall rank | Open source |
---|
leanify | four | one | five | + |
jpegoptim | 3 | 2 | five | + |
jpegtran | 2 | 3 | five | + |
jhead | one | four | five | + |
pingo | five | one | 6 | - |
mozjpeg | 6 | one | 7 | + |
Ect | 7 | one | eight | + |
Launch options
Testing was conducted on the platform of Windows 10 (x64), i7 - 4930K, 32gb RAM. All programs where there is a plus sign in the column Open Source will be collected on Linux. Only 3 programs do not work under Linux: Pingo, Pinga and TRUEpng.
PNG :
Leanify -i 15 -q Pingo -s4 pinga -lossless -more Optipng -o7 -strip all -quiet pngout /s0 /q /y /r /d0 /mincodes0 /k1 PngOptimizer -file advpng -z -q -4 -i 20 ECT --allfilters --mt-deflate -strip --strict -quiet -9 TruePNG /i0 /tz /quiet /y /md remove all /g0 /o4 pngwolf --strip-optional --out-deflate=zopfli,iter=30 --in= --out=
JPEG :
Leanify -i 15 -q Pingo -s4 ECT --mt-deflate -strip -progressive --allfilters --strict -quiet -9 mozjpegtran -outfile -progressive jhead -autorot -purejpg -di -dx -dt -zt -q jpegoptim --strip-all -o -q --all-progressive jpegtran -copy none -progressive
For their internal purposes, they decided to use Leanify. And they made a small test site, if someone needs to optimize a small number of images online:
→
lossless-image-optimization.comFor local start, you can use
FileOptimizer . It runs sequentially almost all of the above optimizers one by one on one file and as a result it works long enough, but it gives a result close to the maximum.
Links→
Archive with test PNG files (100 pieces)→
Archive with test JPG files (100 pieces)→
Detailed table for all files on Google.Docs