ImageEn, unit iexBitmaps

TIEBitmap.EncapsulateTBitmap

TIEBitmap.EncapsulateTBitmap


Declaration


procedure EncapsulateTBitmap(obj: TBitmap; DoFreeImage: boolean);


Description


Encapsulates an existing TBitmap object. It is useful to pass a TBitmap object to routines that require a TIEBitmap. Any changes to the TIEBitmap will be reflected in the TBitmap.
If DoFreeImage is true, the TBitmap object will be freed when the object is destroyed.
Supports only TBitmap with PixelFormat pf1bit, pf8bit, pf24bit, pf32bit.

Note: If your TBitmap.PixelFormat is pfDevice, set it to a valid alternative, such as pf24bit


Example


iebmp := TIEBitmap.Create;
try
  tbmp.EncapsulateTBitmap( bmp, False );
  RotateMyIEBitmap( iebmp );
finally
  FreeAndNil( iebmp );
end;