Mattias Gaertner wrote:
On Sun, 18 Jul 2010 01:02:03 +0200
theo <x...@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


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to