ImageEn, unit iexBitmaps

TIEBitmap.EncapsulatedFromMemory

TIEBitmap.EncapsulatedFromMemory

Declaration

property EncapsulatedFromMemory: Boolean;

Description

Returns True if the image is encapsulated from a memory buffer (using EncapsulateMemory).
When True, destroying or calling FreeImage on this TIEBitmap will not free the underlying buffer.

Example

bmp := TIEBitmap.Create();
try
  bmp.EncapsulateMemory( buf, width, height, ie24RGB, False );
  if bmp.EncapsulatedFromMemory then
    // buf is still owned by the caller — free it after FreeAndNil(bmp)
    bmp.Proc.Negative();
finally
  FreeAndNil( bmp );
end;
FreeMem( buf );