TdxGPImageCodecBMP.Load(TRGBColors,TAlphaFormat,Integer,Integer,TdxSmartImageCustomHandle) Method
Creates a BMP image from the specified array of pixel colors and concomitant image settings
Declaration
class function Load(const ABits: TRGBColors; AAlphaFormat: TAlphaFormat; AWidth: Integer; AHeight: Integer; out AHandle: TdxSmartImageCustomHandle): Boolean; override;
Parameters
Name | Type |
---|---|
ABits | TRGBColors |
AAlphaFormat | TAlphaFormat |
AWidth | Integer |
AHeight | Integer |
AHandle | TdxSmartImageCustomHandle |
Returns
Type |
---|
Boolean |
Remarks
Call this class function and pass an array of pixel colors as the ABits parameter to create a BMP image and a smart handle to it. Pass the image’s pixel dimensions as the AWidth and AHeight parameters to inform the function on how to interpret the linear pixel array. The AAlphaFormat parameter specifies how the function treats reserved bytes in individual TRGBQuad values in a TRGBColors array.
AAlphaFormat Value | Description |
---|---|
afIgnored | The function ignores reserved bytes. |
afDefined | The function treats reserved bytes as alpha channel values and loads RGBA colors from an array as is. |
afPremultiplied | The function treats reserved bytes as alpha channel values and considers them pre-multiplied by the base alpha value. |
The Load function returns True and returns a newly created smart image handle to the successfully loaded image as the AHandle out parameter; otherwise, a GDI+ exception occurs.
See Also