APNG optimization (lossless and lossy)

cédric (dev) said on 09/19/2018

[edit: 01/25/2019]: i added a simple support for APNG optimization in 0.98.19 (still primitive atm) but changed how it could be used in 0.98.50. pingo should be able to handle and process APNG files just like PNG

lossless

-sN — web lossless

pingo 0.98.51 — APNG optimization (zlib comparison)
apng-dirty-transparency.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
apngopt 1.4 32-bit -z0 1.13s 541.81 KB 427.84 KB
pingo 0.98.51 32-bit -s0 0.55s 541.81 KB 412.25 KB
pingo 0.98.51 — APNG optimization (7-zip's deflate comparison)
apng-alpha.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
apngopt 1.4 32-bit -z2 4.04s 314.18 KB 293.33 KB
pingo 0.98.51 32-bit -s6 1.99s 314.18 KB 292.96 KB
pingo 0.98.51 — APNG optimization (zopfli comparison)
apng-tweet.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
apngopt 1.4 32-bit -z2 41.74s 371.76 KB 356.86 KB
pingo 0.98.51 32-bit -s6 2.51s 371.76 KB 356.22 KB
pingo 0.98.51 32-bit -s9 3.10s 371.76 KB 355.77 KB
pingo 0.98.51 32-bit -sa 4.26s 371.76 KB 351.73 KB
pingo 0.98.51 — APNG optimization (palette comparison)
apng-zephyr.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
apngopt 1.4 32-bit -z2 14.49s 617.97 KB 615.11 KB
pingo 0.98.51 32-bit -s9 1.64s 617.97 KB 614.91 KB
pingo 0.98.51 32-bit -sa 2.94s 617.97 KB 533.28 KB

regarding web lossless APNG optimization, -sa could use more reductions (filtering, palette sorting) and could compress better most of the time

lossy

-pngfilter — lossy filter

pingo 0.98.51 — APNG optimization (lossy filter comparison)
apng-dirty-transparency.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
pingo 0.98.51 32-bit -pngfilter 0.88s 541.81 KB 342.03 KB
pingo 0.98.51 32-bit -pngfilter -s2 1.21s 541.81 KB 334.01 KB
pingo 0.98.51 32-bit -pngfilter -s3 2.06s 541.81 KB 300.72 KB
pingo 0.98.51 32-bit -pngfilter -sa 2.71s 541.81 KB 290.68 KB

regarding the lossy filter APNG optimization, all profiles from -s3 (included) do a full image processing — unlike what is done by -s2 and less

-pngcolor — soft color quantization

pingo 0.98.51 — APNG optimization (soft color quantization comparison)
apng-alpha.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
pingo 0.98.51 32-bit -pngcolor=100 1.09s 314.18 KB 223.21 KB

-pngrgb — strong color quantization

pingo 0.98.51 — APNG optimization (strong color quantization comparison)
apng-alpha.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
pingo 0.98.51 32-bit -pngrgb=100 1.55s 371.76 KB 209.31 KB

-pngpalette — color quantization to palette

pingo 0.98.51 — APNG optimization (color quantization to palette comparison)
apng-alpha.png — G1820 @ 2.7 Ghz - 2 Go RAM - Windows 7 32-bit
tool version binary options time in out
pingo 0.98.51 32-bit -pngpalette=20 1.92s 306.50 KB 71.21 KB

comment this