WebP paletted encoding

last modified on 9 July 2019, by Cédric Louvrier

pingo could pre-process the image data to reduce the number of colors for WebP encoding. this lossy transformation could be very effective regarding the filesize but could have some limitations regarding the visual perception

N: from 1 to 100 — 1: smaller filesize, worse quality — 100: bigger filesize, better quality
pingo -webp-palette=N target

paletted encoding

original file: firefox.png (22.01 KB): paletted WebP (lossy)
original pingo -webp-palette=100 pingo -webp-palette=90
firefox - original firefox - webp palette 100 firefox - webp palette 90
22.01 KB 10.86 KB (0.29s) 10.81 KB (0.28s)
dssim - butteraugli 0.00000093 - 0.768358 0.00000057 - 0.603598
pingo -webp-palette=80 pingo -webp-palette=70 pingo -webp-palette=60
firefox - webp palette 80 firefox - webp palette 70 firefox - webp palette 60
10.60 KB (0.22s) 10.41 KB (0.10s) 10.12 KB (0.10s)
0.00000160 - 0.851640 0.00000219 - 1.018418 0.00000217 - 1.058353
pingo -webp-palette=50 pingo -webp-palette=40 pingo -webp-palette=30
firefox - webp palette 50 firefox - webp palette 40 firefox - webp palette 30
9.81 KB (0.09s) 9.34 KB (0.09s) 8.06 KB (0.09s)
0.00000312 - 1.291238 0.00000563 - 1.401826 0.00001264 - 1.556444

compression level

note that 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 -webp-palette -sN target