MimShift()函数

Synopsis

Perform a point-to-point bit shift.

Format

void MimShift(SrcImageBufId, DestImageBufId, BitsToShift)

MIL_ID SrcImageBufId;

Source image buffer identifier

MIL_ID DestImageBufId;

Destination image buffer identifier

long BitsToShift;

Number of bits to shift

Description

This function performs left or right bit-shifting on each pixel in the specified image. The shift operation is signed or unsigned depending on the source image buffer’s data type.

The SrcImageBufId parameter specifies the identifier of the data source of the operation. This parameter must be given an image buffer identifier.

The DestImageBufId parameter specifies the identifier of the destination of the results. This parameter must be given an image buffer identifier.

The BitsToShift parameter specifies the number of bits to shift. If the given value is negative, each pixel in the specified image is right bit-shifted by the specified number of bits; otherwise, it is left bit-shifted.

Note

Floating point values will be cast as unsigned long values before performing the shift operation. Therefore, unexpected results can occur if a floating point value is larger than the unsigned long range.

Status

In-place processing is supported, but the source and destination image buffers cannot partially overlap (a situation that can only occur when using child buffers).