TdxGPImageCodecBMP.Load(TRGBColors,TAlphaFormat,Integer,Integer,TdxSmartImageCustomHandle) Method
In This Article
Creates a BMP image from the specified array of pixel colors and concomitant image settings
#Declaration
Delphi
class function Load(const ABits: TRGBColors; AAlphaFormat: TAlphaFormat; AWidth: Integer; AHeight: Integer; out AHandle: TdxSmartImageCustomHandle): Boolean; override;
#Parameters
Name | Type |
---|---|
ABits | TRGBColors |
AAlpha |
TAlpha |
AWidth | Integer |
AHeight | Integer |
AHandle | Tdx |
#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.
AAlpha |
Description |
---|---|
af |
The function ignores reserved bytes. |
af |
The function treats reserved bytes as alpha channel values and loads RGBA colors from an array as is. |
af |
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