Hello SO,
I am playing with computer graphics programming for the first time.
Don't ask me why, but it feels like a good day to convert RGB (24bit) images, to indexed-palette (8bit) images (like GIF).
How would one go about picking the optimal palette, for a given image?
I just thought of going with k-means, with k=256.
Any suggestions, or past experience are welcomed.
Remember, this is a learning experience for me, so I would rather have a more overviewish answer, than bits and bytes.
In addition, what language would one choose for the job?
I speak Java and C/C++ fluently. Would C be really faster than Java (as I imagine many will say).
Edit: Dithering is currently off-topic. I am only referring to "simple" colour conversion, psycho-visual/perceptual models aside; colour-space is also currently off-topic, though moving between colour-spaces is what got me thinking about this in the first place :)