TdxCustomSmartImage.LoadFromBits(Integer,Integer,TRGBColors,TAlphaFormat) Method
Loads the stored image from the specified array of pixel colors.
Declaration
procedure LoadFromBits(AWidth: Integer; AHeight: Integer; const ABits: TRGBColors; AAlphaFormat: TAlphaFormat); overload;
Parameters
Name | Type |
---|---|
AWidth | Integer |
AHeight | Integer |
ABits | TRGBColors |
AAlphaFormat | TAlphaFormat |
Remarks
Call either of the two overloaded procedure variants and pass an array of pixel colors as the ABits parameter to populate the Smart Image container. Pass the corresponding image dimensions as the AWidth and AHeight parameters to determine how the Smart Image container must interpret the pixel color data.
The two procedure variants accept different parameters that indicate how an image codec interprets reserved bytes in individual TRGBQuad values in a TRGBColors array.
Parameter Value | Description | |
AHasAlphaChannel | AAlphaFormat | |
False | afIgnored | The procedure ignores reserved byte values. |
True | afPremultiplied | The procedure loads reserved bytes as alpha values. The corresponding red, green, and blue color values are considered pre-multiplied with the loaded alpha value. |
– | afDefined | The procedure loads RGBA values from the specified pixel color data array as is. |
Note
The AAlphaFormat parameter works similarly to the TBitmap.AlphaFormat property.