Shift16To8 Method

NI Vision for Visual Basic

Shift16To8 Method

Syntax

CWIMAQVision.Shift16To8 SourceImage, DestImage, ShiftValue

Return Type

Long

On success, this method returns 0. On failure, this function returns a negative number.

Purpose

Obsolete—Use Cast instead. Converts a 16-bit image to an 8-bit image. This conversion is done by shifting the 16-bit pixel values right by the specified number of shift operations, which must be between 1 and 8, and then truncating the result to get an 8-bit value.

Remarks

This function operates on images of type U16 or I16.

Parameters

SourceImage As CWIMAQImage

The 16-bit image from which the 8-bit image is obtained.

DestImage As CWIMAQImage

The resulting image.

ShiftValue As Integer

The number of right shifts (between 1 and 8) by which each pixel value in the input image is shifted before being truncated.

See Also

Cast