imaqSetWindowPalette

NI Vision for LabWindows/CVI Function

imaqSetWindowPalette

Usage

int imaqSetWindowPalette(int windowNumber, PaletteType type, const RGBValue* palette, int numColors);

Purpose

Sets the color palette to use when displaying a monochrome image in an image window.

Parameters

Name

Type

Description

windowNumber int The window number of the image window.
type PaletteType The palette type to use.
palette const RGBValue* If type is IMAQ_PALETTE_USER, this array is the palette of colors to use with the window. If type is not IMAQ_PALETTE_USER, the function ignores this parameter, and you can set it to NULL. The maximum number of colors in a palette is 256. palette[n] maps to pixel value n. If there are less than 256 elements in palette, the function maps all pixel values past the last element in palette to the associated grayscale value.
numColors int If type is IMAQ_PALETTE_USER, this parameter is the number of colors in the palette array. If type is not IMAQ_PALETTE_USER, the function ignores this parameter.

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