image optimizer for web

1.25

pingo is a context-based optimizer (IIRC ~ 2017 and even more with ax versions): it would do identification of image data. that is done regardless of what was asked (lossless, lossy, transforms, etc). if the heuristic works as intended, it would have a precise idea (a profile) of what should be best for the image regarding speed/result

analyse & trials

pingo would be adaptative to preserve speed all along the process: unlike the classical approches to test everything and see — which is probably the most efficient regarding filesize — it could set a minimal amount of trials (or none) according to the etablished profile, the compression level, the image definition, structure, etc.

PNG — lossless

pingo -lossless in.png
PNG — lossless
infile id lvl outfile time
47.84 MB 1.00 - 43.19 MB 2.13s
1.25 - 43.19 MB 1.87s
1.25 -s0 43.19 MB 1.49s
140.68 MB 1.00 - 131.86 MB 7.26s
1.25 - 131.86 MB 5.73s
1.25 -s0 131.86 MB 4.77s

todo: improve speed even further by optimizing the decoding phase

pingo -lossless -s4 *.png
PNG — lossless (palette set, mt/mp)
infile id lvl saved time
80 files 1.00 -s4 589.56 KB 2.60s
1.25 -s4 667.19 KB 2.30s
140 files 1.00 -s4 3.99 MB 8.62s
1.25 -s4 4.32 MB 8.94s

WebP — lossless

pingo -lossless -webp -s4 in.png
WebP — lossless (mix PNG/WebP sorters)
infile id lvl saved time
658.02 KB 1.00 -s4 148.34 KB 0.95s
1.25 -s4 152.56 KB 0.87s
pingo -lossless -webp -s4 *.png
WebP — lossless (palette set, mt/mp)
infile id lvl saved time
80 files 1.00 -s4 867.21 KB 1.95s
1.25 -s4 884.97 KB 1.99s
140 files 1.00 -s4 5.48 MB 8.03s
1.25 -s4 5.57 MB 8.04s
WebP — lossless
infile id lvl saved time
94.84 KB 1.00 -s4 12.35 KB 0.19s
1.25 -s4 12.38 KB 0.19s
WebP — lossless from optimized
infile id lvl saved time
84.97 KB 1.00 -s4 2.48 KB 0.19s
1.25 -s4 6.46 KB 0.20s

WebP — near-lossless

pingo -hq=100 -webp -s4 in.png
WebP — near-lossless
infile tool time out
1.45 MB 1 0.73s 817.60 KB
2 0.34s 747.38 KB
tool metrics
1 0.00004710 0.51783585 94.5911618
2 0.00004065 0.67663240 94.8225913
1: cwebp -near_lossless 80
2: pingo -hq=100 -webp

resize

pingo -resize=1920 in.jpg
JPEG — resizer
in time out
9.31 MB (8k x 6k) 0.16s 430.08 KB
pingo -resize=256 in.png
APNG — resizer
in time out
427.10 KB (480 x 400) 0.45s 205.67 KB