imaqDisplayImage

NI Vision for LabWindows/CVI Function

imaqDisplayImage

Usage

int imaqDisplayImage(const Image* image, int windowNumber, int resize);

Purpose

Displays an image in an image window. The window becomes visible when you call the function. The window is associated with the image until you close the window, dispose of the image, or call this function again with the same window number. Call this function to refresh the display of the window, including overlays. Use imaqSetBitDepth() to set the bit depth of 16-bit monochrome and 64-bit RGB images. imaqDisplayImage uses this specified bit depth to display the image. Use imaqSetWindowDisplayMapping() to set the pixel mapping policy for displaying 16-bit monochrome images of an unspecified bit depth.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image const Image* The image to display in the window.
windowNumber int The window number of the window in which to display the image. There are 16 image windows, which have window numbers 0-15. To obtain a window number not in use, call imaqGetWindowHandle().
resize int If you set this parameter to TRUE, the function resizes the window to the size of the image. If you set this parameter to FALSE, the window size does not change.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().