[Fwd: Bitmaps and Palettes]

Wayne Elliott wrote:

> Subject: Bitmaps and Palettes
> Date: Mon, 17 Feb 1997 09:45:47 +0800
> From: Wayne Elliott <wa...@ccis.adisys.com.au>
> Organization: ADI Limited
> CC: Wayne Elliott <wayne>
> Newsgroups: comp.lang.pascal.delphi.misc

> I would like to take portions (points usually) of a 256 color bitmap
> and place them somewhere else (eg reflect them) on that bitmap.
> Delphi provides Canvas.Pixels which certainly sounds suitable. It
> returns the TColor of the Bitmap at a point, so

>   MyImage.Canvas.Pixels[I,J] := MyImage.Canvas.Pixels[J,I];

> (although an odd example) sounds delightful. However, the TColor
> used is not the original color, but some "close?" translation, or
> so it would seem.  What I wan't is the actual colour/palette used
> to be the one drawn.  Any ideas?

> I would also like to be able to use routines like LineTo in
> a similar way, but setting the pen color applies a TColor again
> and "appears" to ignore my the bitmaps palette.

> I guess I'm basically having trouble working with palettes.
> All help appreciated.


You need to look at the PaletteRgb functions.


Joe C. Hecht
Borland Delphi Developer Support Group