[Lazarus] TLazIntfImage GetDataLineStart

Marc Weustink marc at dommelstein.net
Sun Jul 18 03:07:15 CEST 2010


Mattias Gaertner wrote:
> On Sun, 18 Jul 2010 01:02:03 +0200
> theo <xpde at theo.ch> wrote:
> 
>> Ah,  now I see. Thanks!
>>
>> I tried like below, it seems to work.
>> TBitmap.LoadFromIntfImage seems to care about the back-conversion, right?
> 
> AFAIK: no
> The intfimage must be in a compatible format.

I thought it didnt, but recently I saw it does a conversion (somewhere).


BTW, TBitmap.LoadFromIntfImage loads through handle creation, which may 
lead to data loss (alpha channel, image depth)

Better use:

var
   RI: TRawImage;
begin
   ...
   IntfImg.GetRawImage(RI, True);
   Bitmap.LoadFromRawImage(RI, True);
   ...

end;

If you want to reuse the IntfImage data, then Pass False to both 
functions (don't transfer ownership)

Marc (still needs to adapt LoadFromIntfImage)


Marc





More information about the Lazarus mailing list