reduce the number of colours without conversion to palette (PNG)

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

pingo could pre-process the image data from PNG by reducing significantly the amount of colors. this lossy transformation, could be less effective than the lossy filtering or the transformation to paletted encoding on some samples

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

strong color quantization

original file: music.png (67.20 KB) — PNG color quantization
original pingo -pngrgb
music - original music - pngrgb
67.20 KB — 26103 colors 36.98 KB (0.22s) — 5023 colors
dssim — butteraugli 0.00053465 — 2.482823

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 -pngrgb -sN target