Board index » delphi » bitmap, palettes, and colours (colors)

bitmap, palettes, and colours (colors)

I would like to replace one colour for another in a tbitmap. (ie. change red
for blue) I believe that this is an easy thing to do, because the tbitmap
has a tpalette property. But I haven't been able to find any examples. Can
someone please respond with a working example for Delphi 5.

Thanx

Chris

 

Re:bitmap, palettes, and colours (colors)


Quote
"Chris Bertrand" <chris.bertr...@fourleafsolutions.com> wrote in message

news:8a98im$gmc7@bornews.borland.com...

Quote
> I would like to replace one colour for another in a tbitmap. (ie. change
red
> for blue) I believe that this is an easy thing to do, because the tbitmap
> has a tpalette property. But I haven't been able to find any examples. Can
> someone please respond with a working example for Delphi 5.

What is the PixelFormat of your bitmap?  For pf8bit and below you need
to worry about palettes, which is somewhat of a pain.    There
are a couple of links that might be useful under "Changing Color
in Image" at
http://www.efg2.com/Lab/Library/Delphi/Graphics/Color.htm

--
efg

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

Other Threads