Re: BITMAPINFO

From: Jamie (jamie_5_not_valid_after_5_at_charter.net)
Date: 11/27/03


Date: Thu, 27 Nov 2003 11:40:28 -0800

Change the pixel format of the bitmap that currently resides in the
Timage..
   for example.
  mytimage.picture.bitmap.pixelformat := pf24bit;
  then to get the pointer to the start of memory..
  mypixelpointer :=
mytimage.picture.bitmap.scanline[myimage.picture.bitmap.height-1];
   remember by default bitmaps are stored in memory bottom side up.
that is the reason for the use of the last line instead of the first line.
    also you may want to create a bitmap dynamicly and then simply
assign it to the picture property and work with that bitmap directly
behind the
scenes instead of going through the image canvas.
   when your done making your changes you then simple do a invalidate or
a repaint on the image so that it updates the screen.

Arek wrote:
> Hello
>
> Maybe it is primitive problem but i can't find solution.
> How from borland's TImage can I get pointer to BITMAPINFO strucrure?
> I use BorlandC++5.
> Is there any simply method to do this?
> On http://homepages.borland.com/efg2lab/Library/UseNet/1999/0115a.txt
> someone writes that it is possible only with SaveToStream method... How to
> do it exactly ?
>
> Arek.
>
>


Quantcast