TIEBitmap.EncapsulatedFromTBitmap
TIEBitmap.EncapsulatedFromTBitmap
Declaration
property EncapsulatedFromTBitmap: Boolean;
Description
Returns True if the image is encapsulated from a
TBitmap object (using
EncapsulateTBitmap).
When True, destroying or calling FreeImage on this TIEBitmap will not free the underlying TBitmap.
Example
bmp := TIEBitmap.Create();
try
bmp.EncapsulateTBitmap( Image1.Picture.Bitmap, False );
if bmp.EncapsulatedFromTBitmap then
// Image1.Picture.Bitmap is still owned by Image1 — do not Free it here
bmp.Proc.Negative();
finally
FreeAndNil( bmp );
end;