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
butteraugli 3.8226268291 — 3-norm: 0.873709 0.6581351757 — 3-norm: 0.378749
ssimulacra 0.00242852 0.00083543
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
3.8941497803 — 3-norm: 0.921176 0.7905966043 — 3-norm: 0.310271 6.7210550308 — 3-norm: 1.411379
0.00271378 0.00186821 0.00475416
cwebp -near_lossless 20 pingo -webp-nigh=60
94.98 KB — 0.480s 82.59 KB — 0.330s
11.5340499878 — 3-norm: 2.309199 1.0789813995 — 3-norm: 0.488908
0.00713892 0.00353626

« 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
butteraugli 9.1930837631 — 3-norm: 2.137555 9.1830739975 — 3-norm: 2.168963
ssimulacra 0.00676507 0.00723370
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
9.1293087006 — 3-norm: 2.315386 9.4517145157 — 3-norm: 2.554123 3.5459191799 — 3-norm: 0.858294
0.00901554 0.01059002 0.00080105

« 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
butteraugli 0.6204899549 — 3-norm: 0.297650 0.6345605254 — 3-norm: 0.411579
ssimulacra 0.00260336 0.00176649
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
1.0989629030 — 3-norm: 0.431888 0.7065519094 — 3-norm: 0.341491 1.3740233183 — 3-norm: 0.516312
0.00428470 0.00421199 0.00493758
cwebp -near_lossless 20 pingo -webp-nigh=61
301.59 KB — 0.853s 266.29 KB — 0.531s
2.0044021606 — 3-norm: 0.674747 1.0651518106 — 3-norm: 0.563140
0.00652287 0.00789918

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 demonstrated 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