GetImageInfo

int GetImageInfo (int panelHandle, int controlID, int imageID, int *colorSize, int *bitmapSize, int *maskSize);

Purpose

Note   This function is obsolete. National Instruments recommends that you use GetCtrlBitmap and GetBitmapInfo instead.

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.

Parameters

Input
Name Type Description
panelHandle integer Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID integer 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 NewCtrl or DuplicateCtrl.
imageID integer 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 integer 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.
bitmapSize integer 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 integer 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 integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Code Error Message String
xx Success