GetImageInfo
int GetImageInfo (int panelHandle, int controlID, int imageID, int *colorSize, int *bitsSize, int *maskSize);
Purpose
![]() |
Note This function has been superseded by GetBitmapInfoEx, which supports alpha-channel transparency. |
Obtains size information about an image associated with a control. Use the information to allocate the buffers you pass to GetImageBits.
As an alternative to this function, you can call AllocImageBits, which allocates the buffers for you.
Supported Controls
You can use GetImageInfo with the following controls:
Parameters
Input | ||
Name | Type | Description |
panelHandle | int | Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel. |
controlID | int | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by functions such as NewCtrl and DuplicateCtrl. |
imageID | int | For picture rings, the zero-based index of an image in the ring. For graphs, the plot handle you obtain from PlotBitmap. For picture controls, picture buttons, and canvas controls, this parameter is ignored. |
Output | ||
Name | Type | Description |
colorSize | int | Number of bytes in the image color table. If the image pixel depth is greater than 8, this parameter is set to 0. If no image exists, this parameter is set to –1. You can pass NULL for this parameter. |
bitsSize | int | Number of bytes in the image bitmap. If no image exists, this parameter is set to –1. You can pass NULL for this parameter. |
maskSize | int | Number of bytes in the image mask. If the image does not have a mask, this parameter is set to 0. If no image exists, this parameter is set to –1. You can pass NULL for this parameter. |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later