image optimizer for web

pingo image optimizer for web

pingo is an experimental lossless and lossy image optimizer (PNG, JPEG, WebP, APNG) designed to be used for web context

pingo optimizing 400 files optimized 400 PNG losslessly

usage — examples

pingo -sN myfolder
N from 0 to 9, optimization level
pingo -pngfilter=X -sN *.png
X from 1 to 100, quality level

PNG — lossless

-sN in.png
-s9
infile outfile time
43,09 KB 24,69 KB 0,32s
palette ordering
59,71 KB 50,74 KB 0,19s
filtering & alpha
607,27 KB 38,75 KB 0,23s
ordered transforms

PNG — lossy

-pngpalette=X -sN in.png
-pngpalette=100 -s9
infile outfile time
219,49 KB 86,08 KB 0,14s
palettization and palette ordering
-pngfilter=X -sN in.png
-pngfilter=100 -s9
infile outfile time
197,91 KB 121,08 KB 0,47s
prediction

PNG — auto

-auto=X -sN in.png
-auto=100 -s6
infile outfile time
171,02 KB 17,31 KB 0,57s
lossless optimization
580,38 KB 25,91 KB 0,26s
palettization
232,79 KB 148,77 KB 0,29s
prediction
975,49 KB 544,41 KB 0,24s
JPEG conversion

JPEG — lossless

-jpgtype=M -sN in.jpg
M from 0 to 2, compression type
-jpgtype=0 -s0
infile outfile time
890,51 KB 847,09 KB 0,04s
baseline — fast decode/encode
-jpgtype=1 -s0
infile outfile time
890,51 KB 808,54 KB 0,07s
progressive — slower decode
-jpgtype=2 -s0
infile outfile time
890,51 KB 790,34 KB 0,18s
progressive — slower decode/encode

JPEG — lossy

-jpgquality=X in.jpg
-jpgquality=100
infile outfile time
1,34 MB 930,93 KB 0,18s
4:4:4, baseline
-jpgquality=X -jpgsub in.jpg
-jpgquality=100 -jpgsub
infile outfile time
1,34 MB 612,40 KB 0,17s
4:2:0 sharp, baseline

WebP — lossless

-webp-lossless -sN in.png
-webp-lossless -s9
infile outfile time
344,80 KB 271,48 KB 0,68s
palette ordering (from PNG)
-sN in.webp
-s9
infile outfile time
968,56 KB 208,38 KB 0,53s
palette ordering (from WebP)

WebP — lossy

-webp-lossy=X -sN in.png
-webp-lossy=100 -s9
infile outfile time
195,58 KB 72,20 KB 0,06s
alpha optimization
-webp-lossy=X -nopre -sN in.png
-webp-lossy=100 -nopre -s9
infile outfile time
251,73 KB 93,54 KB 0,13s
alpha optimization
-webp-palette=X -sN in.png
-webp-palette=100 -s9
infile outfile time
157,49 KB 35,91 KB 0,19s
palettization and palette ordering

WebP — auto

-webp=X -sN in.png
-webp=100 -s9
infile outfile time
171,02 KB 6,94 KB 0,05s
lossless optimization
580,38 KB 20,84 KB 0,17s
palettization
232,79 KB 50,33 KB 0,05s
lossy WebP
975,49 KB 336,31 KB 0,10s
lossy WebP

APNG — lossless

-sN in.png
-s9
infile outfile time
114,19 KB 103,13 KB 0,54s
palette ordering
621,74 KB 508,63 KB 0,80s
interframe, filtering & alpha
586,83 KB 340,42 KB 3,39s
interframe, colortype

APNG — lossy

-pngpalette=X -sN in.png
-pngpalette=100 -s9
infile outfile time
370,09 KB 213,13 KB 2,58s
palettization and palette ordering
-pngfilter=X -sN in.png
-pngfilter=100 -s9
infile outfile time
621,74 KB 448,88 KB 1,14s
prediction

-resize

-resize=M -auto=X -sN in.png
M from 24 to 4096, highest w/h
-resize=800 -auto=100 -s9
infile outfile time
52,92 KB 27,98 KB 0,15s
PNG: resize & palettization
718,89 KB 427,86 KB 0,35s
PNG: resize & prediction
8,30 MB 167,02 KB 0,29s
JPG: DCT scale, resize & progressive
47,94 KB 34,23 KB 0,25s
WebP: resize
385,48 KB 290,73 KB 2,99s
APNG: resize & palettization

manual updated on August 30, 2022