Sign in Join
FPDoc Onlineexperiment

TBitmapResource.BitmapData property

Member of TBitmapResourcepublicIn unit bitmapresource

Resource data as a BMP stream

Declaration

pascal
property BitmapData: TStream read GetBitmapData;

Description

BitmapData property gives access to resource data in a BMP file-like stream, unlike RawData.

BitmapData does not create a copy of RawData so memory usage is generally kept limited.

You can also set a custom stream as the underlying stream for BitmapData via SetCustomBitmapDataStream, much like SetCustomRawDataStream does for RawData. This is useful when you want a TBitmapResource to be created from a bmp file for which you have a stream.

If you need to access RawData after you modified BitmapData, be sure to call UpdateRawData first. This isn't needed however when resource is written to a stream, since TResources takes care of it.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.