[comp.graphics] Palette selection

yanek@panix.uucp (Yanek Martinson) (06/07/91)

Can anybody help with this? Problem: I have an image in 24-bit color (a byte
for each r, g, b), and I need to display it on a screen that can show 256 
colors at a time, out of palette of 262144 (18 bits, 6 bits for each r,g,b).
How do I select the best 256 colors that represent the 24-bit picture?
Source code? Comments? Algorithms? Suggestion?