Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxGPImageCodecBMP.Load(TRGBColors,TAlphaFormat,Integer,Integer,TdxSmartImageCustomHandle) Method

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
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