WebP near-lossless compression

near, lossless, compression, image

« near-lossless » on HC RGBA

closer distance of psychovisual metrics regarding filesize
original cwebp -near_lossless 99 pingo -webp-nigh=99
175.86 KB 112.38 KB — 0.490s 108.35 KB — 0.330s
dssim 0.00003258 0.00003130
butteraugli 1.086502 0.445320
ssimulacra 0.00091166 0.00060987
cwebp -near_lossless 60 pingo -webp-nigh=80 cwebp -near_lossless 40
104.34 KB — 0.480s 91.00 KB — 0.331s 98.37 KB — 0.500s
0.00005714 0.00007040 0.00010743
1.628806 0.783920 1.607396
0.00127683 0.00139604 0.00210675
cwebp -near_lossless 20 pingo -webp-nigh=60
94.98 KB — 0.480s 82.59 KB — 0.330s
0.00020235 0.00013308
2.250526 1.097308
0.00378624 0.00263757

« near-lossless » on LC RGBA

closer distance of psychovisual metrics regarding filesize
original cwebp -near_lossless 99 cwebp -near_lossless 60
18.91 KB 10.78 KB — 0.007s 9.83 KB — 0.006s
dssim 0.00000064 0.00000208
butteraugli 0.184249 0.394511
ssimulacra 0.00003042 0.00006947
cwebp -near_lossless 40 cwebp -near_lossless 20 pingo -webp-nigh=99
10.07 KB — 0.007s 8.76 KB — 0.006s 7.63 KB — 0.008s
0.00004861 0.00010100 0.00000054
1.342353 1.457666 0.345148
0.00088317 0.00140596 0.00003793

« near-lossless » on HC RGB

closer distance of psychovisual metrics regarding filesize
original cwebp -near_lossless 99 pingo -webp-nigh=99
535.63 KB 354.18 KB — 0.873s 385.66 KB — 0.546s
dssim 0.00013298 0.00006638
butteraugli 0.673271 0.483674
ssimulacra 0.00260219 0.00172575
cwebp -near_lossless 60 pingo -webp-nigh=80 cwebp -near_lossless 40
318.50 KB — 0.881s 297.30 KB — 0.550s 305.18 KB — 0.862s
0.00025325 0.00015481 0.00034020
1.144387 0.733298 1.613877
0.00434004 0.00423425 0.00500550
cwebp -near_lossless 20 pingo -webp-nigh=61
301.59 KB — 0.853s 266.29 KB — 0.531s
0.00045563 0.00029032
2.743662 1.085350
0.00657507 0.00800282

notes

cwebp cf2f88b — N: 99 (80), 60, 40
cwebp -near_lossless N target
pingo rc3 (02) — N: 99, 80, 60
pingo -webp-nigh=N target

note that this function could be work in progress and would not always perform as well as demonstrate on any samples. the lossless compression level over this transformation can be increased to get smaller filesize by using -sN:

N: from 0 to 9 — 0: fast and good compression — 9: slow, but better compression
pingo flags -sN target

machine test: CPU G1820 2.7Ghz — 1.88GB RAM — Windows 7, 32-bit