int GetBitmapInfo (int bitmapID, int *colorSize, int *bitsSize, int *maskSize);
Obtains size information about the image associated with a bitmap. You can use this information to allocate the buffers you pass to GetBitmapData.
You can use this function with bitmaps created with NewBitmap, GetBitmapFromFile, GetCtrlBitmap, ClipboardGetBitmap, GetCtrlDisplayBitmap, GetPanelDisplayBitmap, GetScaledPanelDisplayBitmap, GetScaledCtrlDisplayBitmap, or DuplicateBitmap.
As an alternative to this function, you can call AllocBitmapData, which allocates the buffers for you.
![]() |
Note LabWindows/CVI provides GetBitmapInfoEx, an extended version of GetBitmapInfo. GetBitmapInfoEx supports alpha-channel transparency. |
Input | ||
Name | Type | Description |
bitmapID | integer | ID of the bitmap object that contains the image. Obtain the ID from NewBitmap, 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. |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|