Board index » delphi » How increase/decrease num colors in bitmap palette

How increase/decrease num colors in bitmap palette

hi,
working in 24 bits colors, i want save bitmap created in this to a 256 or 16
bits colors. Possible or not ??
thanks.

 

Re:How increase/decrease num colors in bitmap palette


Quote
solbemol wrote:

> hi,
> working in 24 bits colors, i want save bitmap created in this to a 256
> or 16
> bits colors. Possible or not ??
> thanks.

Yes. You can just copy it, but that would ruin the image. You have to do
some palette-mapping. There most be some good code around here somewhere
(I've seen messages suggesting such). Otherwise I've made a routine
which works rather nice, though it could do with some optimizing
regarding speed.

Good luck,

Remco de Korte
http://www.xs4all.nl/~remcodek/

Other Threads