ConvertPixelType


Changes the type of pixel components.

Syntax

C++
Python
 
def ConvertPixelType(
	inImage: Image,
	inNewType: PlainType,
	inDepthDelta: int,
	outImage: Image,
	/,
	*,
	inRoi: Region | None = None
)
-> None

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Region | None None Range of pixels to be processed
Input value inNewType PlainType Type of the output image
Input value inDepthDelta int -30 - 30 Pixel values will be multiplied by 2^inDepthDelta. For example, use -4 to convert 12-bit to 8-bit images.
Output value outImage Image Output image

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

This operation is optimized for SSE2 technology for pixels of types: UINT16 (when converting to UINT8 with negative delta).

This operation is optimized for AVX2 technology for pixels of types: UINT16 (when converting to UINT8 with negative delta).

This operation is optimized for NEON technology for pixels of types: UINT16 (when converting to UINT8 with negative delta).