[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TBitmap.InitializeReader

Initializes the image reader to use the transparency settings in the class instance.

Declaration

Source position: graphics.pp line 1475

protected procedure TBitmap.InitializeReader(

  AImage: TLazIntfImage;

  AReader: TFPCustomImageReader

); override;

Arguments

AImage

  

Provides access to the raw data for the image.

AReader

  

Reader used to access raw data for the image.

Description

InitializeReader is an overridden procedure used to apply transparency settings to the image reader in AReader. InitializeReader calls the inherited method on entry to signal the OnProgress event handler (when assigned).

InitializeReader ensures that AReader is derived from TLazReaderBMP. No additional actions are performed in the method when AReader is not a TLazReaderBMP class instance.

InitializeReader applies values from the TransparentMode and TransparentColor properties to the mask settings in AReader.

TransparentMode

Determines whether the transparency color is auto-detected in the image data, or a fixed transparency color is used.

tmAuto
The bottom left pixel in the image data contains the transparency color.
tmFixed
Uses a predefined color in TransparentColor as the transparency color.

TransparentColor

Determines the color used to represent transparent areas in the image data.

clDefault
Uses the bottom left pixel as the transparency color. This is a Lazarus extension.
clNone
Ignores transparency in the image data. This is a Lazarus extension.

All other color constants represent the color for transparent pixels in the image.

Values in TransparentMode and TransparentColor are assigned to the MaskMode and MaskColor properties in AReader as required.

See also

TFPImageBitmap.InitializeReader

  

Configures the reader class instance for the image type.


Version 3.2 Generated 2024-02-25 Home