GetBitmapInfoEx

int GetBitmapInfoEx (int bitmapID, int *colorSize, int *bitsSize, int *maskSize, int *alphaSize);

Purpose

Obtains size information about the image associated with a bitmap. You can use this information to allocate the buffers you pass to GetBitmapDataEx. GetBitmapInfoEx is similar to GetBitmapInfo, except that GetBitmapInfoEx supports alpha-channel transparency.

You can use this function with bitmaps created with NewBitmapEx, GetBitmapFromFile, GetCtrlBitmap, ClipboardGetBitmap, GetCtrlDisplayBitmap, GetPanelDisplayBitmap, GetScaledPanelDisplayBitmap, or GetScaledCtrlDisplayBitmapGetScaledPanelDisplayBitmap, GetScaledCtrlDisplayBitmap, or DuplicateBitmap.

As an alternative to this function, you can call AllocBitmapDataEx, which allocates the buffers for you.

Parameters

Input
Name Type Description
bitmapID integer ID of the bitmap object that contains the image. Obtain the ID from NewBitmapEx, GetBitmapFromFile, GetCtrlBitmap, ClipboardGetBitmap, GetCtrlDisplayBitmap, GetPanelDisplayBitmap, GetScaledPanelDisplayBitmap, GetScaledCtrlDisplayBitmap, or DuplicateBitmap.
Output
Name Type Description
colorSize integer Number of bytes in the image color table. This parameter value is 0 if the pixel depth is greater than 8.

You can pass NULL for this parameter.
bitsSize integer Number of bytes in the image bitmap.

You can pass NULL for this parameter.
maskSize integer Number of bytes in the image mask. This parameter value is 0 if no mask exists.

You can pass NULL for this parameter.
alphaSize integer Number of bytes in the image alpha channel. This parameter value is 0 if no alpha-channel data exists.

You can pass NULL for this parameter.

Return Value

Name Type Description
status integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Code Error Message String
xx Success