Sign in Join
FPDoc Onlineexperiment

TCustomImageListResolution.ReadData procedure

Member of TCustomImageListResolutionprotectedIn unit ImgList

Reads raw image data from the specified Stream.

Declaration

pascal
procedure ReadData(AStream: TStream); virtual

Arguments

AStream

Stream which contains the raw image data read in the method.

Description

ReadData is a procedure used to read the raw image data for all images in the resolution from the specified stream.

AStream contains the TStream class instance with the raw image data read in the method. The current position in AStream is used when values are read in the method. The stream is positioned immediately after the raw image values when values are read in the method.

ReadData calls the Clear method to remove any existing image data stored in the resolution.

ReadData reads the signature for the image list from the stream. The signature identifies whether image data was written by various versions of the Lazarus or Delphi IDEs, and defines the header information expected in the stream. Methods are provided to read header and image data for the following image list signatures:

SIG_LAZ1
Earlier versions of the Lazarus IDE
SIG_LAZ2
Lazarus versions that included header data for each image
SIG_LAZ3
Current Lazarus image list format using uncompressed image data
SIG_LAZ4
Current Lazarus image list format using compression for image data
SIG_D3
Delphi 3 image list format

If an image list signature is not found, it was created using the Delphi 2 image list format which did not include a signature. In this scenario, the stream in AStream is moved to its original position prior to reading image data from the stream.

ReadData is used in the implementation of the TCustomImageList.ReadData method.

Visibility changed in LCL version 5.0.

See also

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