CreateFromBits(Integer,Integer,TRGBColors,TAlphaFormat) Constructor
Creates a new Smart Image container and populates it with the specified array of pixel data.
Declaration
constructor CreateFromBits(AWidth: Integer; AHeight: Integer; const ABits: TRGBColors; AAlphaFormat: TAlphaFormat); overload; virtual;
Parameters
Name | Type | Description |
---|---|---|
AWidth | Integer | The loaded image’s width, in pixels. |
AHeight | Integer | The loaded image’s height, in pixels. |
ABits | TRGBColors | The source array of |
AAlphaFormat | TAlphaFormat | Specifies how the constructor interprets reserved color bytes in the source array of |
Remarks
Call this constructor to create a Smart Image container populated with pixel color data passed as the ABits
parameter. Use the AAlphaFormat
parameter to determine how the constructor interprets the accepted array of TRGBQuad
values:
AAlphaFormat Value | Description |
---|---|
afIgnored |
The constructor ignores reserved byte values. |
afPremultiplied |
The constructor loads reserved bytes as alpha values. The corresponding red, green, and blue color values are treated as pre-multiplied by the loaded alpha value. |
afDefined |
The constructor loads reserved bytes as alpha values. The corresponding red, green, and blue color values remain unchanged. |
You can call the LoadFromBits procedure to load an array of pixel color data to an existing Smart Image container.