TCustomImageList.ReadAdvData procedure
Reads the image content for multiple resolutions from a stream.
Declaration
procedure ReadAdvData(AStream: TStream); virtualArguments
AStream | Stream with the image resolutions loaded in the method. |
Description
ReadAdvData is a procedure used to read the content for multiple
image resolutions from the stream specified in AStream. ReadAdvData is the
complement to the
WriteAdvData method, and handles reading
multiple image resolutions for the image list.
ReadAdvData calls BeginUpdate to block OnChange
notifications in the method. The EndUpdate method is called when
all image resolutions in the stream have been loaded.
ReadAdvData reads the image list signature from AStream, and checks the value
to ensure that it supports use of BitmapAdv in its properties. If
it does not contain the value SIG_LAZ3, an Exception is raised.
ReadAdvData reads the Integer value that indicates the number of image resolutions stored in the stream, and processes each resolution by reading the following values:
| Value | Size |
| Resolution signature | SizeOf(TImageListSignature) |
| Image count | Cardinal |
| Image width | Cardinal |
| Image height | Cardinal |
An exception is raised if an image resolution does not support
BitmapAdv in its properties (requires SIG_LAZ3 or
SIG_LAZ4 in the resolution signature).
ReadAdvData gets a TCustomImageListResolution instance from the
internal TCustomImageListResolutions container that uses the image width for
each of the resolutions. An image resolution is created if it does not
already exist. Each resolution class instance calls its ReadData
method to load image data from the stream in AStream.
ReadAdvData updates the internal Changed member for the image list, and calls
Change prior to exiting from the method.
Errors
Raises an exception if the image list signature is not SIG_LAZ3.
Raises an exception if an image resolution signature is not SIG_LAZ3 or SIG_LAZ4.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
