Color quantization/C: Difference between revisions

m
enough with the frogs
(dithering)
m (enough with the frogs)
Line 1:
[[file:Quantum_frog_dithered.png|200px|thumb]]This is a complete program that takes a PPM P6 image and a number, then writes out the image reduced to the number of colors to out.ppm. There is optional dithering, too, which doesn't make a whole lot of difference with say 64 colors or more. And with low colors, the quantization did such a good job of picking average colors that it actually hurts the dithering process.
<lang c>#include <stdio.h>
#include <stdlib.h>
Anonymous user