imaqSetBitDepth

NI Vision for LabWindows/CVI Function

imaqSetBitDepth

Usage

int imaqSetBitDepth(Image* image, unsigned int bitDepth);

Purpose

Sets 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 Image* The image whose bit depth the function sets.
bitDepth unsigned int The new bit depth of the image. The value must be from 8 to 15 for IMAQ_IMAGE_I16 images, from 8 to 16 for IMAQ_IMAGE_U16 and IMAQ_IMAGE_RGB_U64 images, or 0. A value of 0 indicates that NI Vision should use the entire range of the image datatype.

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