imaqGetBitDepth

NI Vision for LabWindows/CVI Function

imaqGetBitDepth

Usage

int imaqGetBitDepth(const Image* image, unsigned int* bitDepth);

Purpose

Returns the bit depth of the image. The bit depth of an image determines how NI Vision displays, saves, and converts images with more than 8 bits per channel.

Image Types Supported

IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image const Image* The image the function queries the bit depth for.
bitDepth unsigned int* On return, the bit depth of the image. A bit depth of 0 indicates that NI Vision is using the entire range of the image datatype. This parameter is required and cannot be NULL.

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().