📜 ⬆️ ⬇️

Test Lossless Image Optimizers (PNG and JPG)

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.79c
3. pinga v0.09
4. OptiPNG 0.7.6
5. pngout
6. PngOptimizer 2.5 (x64)
7. advpng aka AdvanceCOMP v1.23
8. ECT 0.6 (x64)
9. TruePNG 0.6.2.2
10. pngwolf-zopfli 1.1.1 (x64)

For JPEG :

1. Leanify 0.4.3 (x64)
2. pingo v0.79c
3. ECT 0.6 (x64)
4. mozjpeg 3.2 (x64)
5. jhead 3.00
6. jpegoptim v1.4.4 (x64)
7. jpegtran

100 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
Maximum88.49
1 placeEct88.98
2nd placeLeanify89.62
3rd placePingo89.69
4th placepngwolf91.34
5th placepngout91.85
6 placeTRUEPng93.01
7th placeOptipng94.19
8th placepinga94.8
9th placePNGOptimizer95.13
10 placeadvpng97.27

Table 2. The best optimizers PNG for speed
1 placePNGOptimizer00:04:08
2nd placepinga00:21:41
3rd placePingo00:23:15
4th placeTruePNG01:53:29
5th placeLeanify01:57:00
6 placepngout02:53:09
7th placepngwolf02:55:26
8th placeEct03:06:08
9th placeadvpng03:25:34
10 placeOptipng03:39:05

Table 3. Summary table for PNG optimizers
BYSpeed ​​rankCompression rankOverall rankOpen source
Pingo336-
Leanifyfive27+
Ecteightone9+
PNGOptimizerone9ten+
TruePNGfour6ten-
pinga2eightten-
pngout6fiveeleven+
pngwolf7foureleven+
Optipngten717+
advpng9tennineteen+

Table 4. The best optimizers JPG in terms of compression
1 placeEct89.996
1 placepingo89.996
1 placeleanify89.997
1 placemozjpeg89.999
5th placejpegoptim90.880
6 placejpegtran90.924
7th placejhead99.592

Table 5. The best JPG optimizers for speed
1 placejhead00:00:25
2nd placejpegtran00:00:52
3rd placejpegoptim00:01:03
4th placeleanify00:01:30
5th placepingo00:01:42
6 placemozjpeg00:01:55
7th placeEct00:02:52

Table 6. Summary table for JPG optimizers
SoftSpeed ​​rankCompression rankOverall rankOpen source
leanifyfouronefive+
jpegoptim32five+
jpegtran23five+
jheadonefourfive+
pingofiveone6-
mozjpeg6one7+
Ect7oneeight+

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.com

For 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

Source: https://habr.com/ru/post/326122/


All Articles