ResizeImage


Enlarges or shrinks an image to new dimensions.

Syntax

C++
Python
 
def ResizeImage(
	inImage: Image,
	outImage: Image,
	/,
	*,
	inRoi: Box | None = None,
	inNewWidth: int | None = None,
	inNewHeight: int | None = None,
	inResizeMethod: ResizeMethod = ResizeMethod.NearestNeighbour
)
-> None

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Box | None None Box defining a subimage to be cropped and resized.
Input value inNewWidth int | None 1 - 65535 None
Input value inNewHeight int | None 1 - 65535 None
Input value inResizeMethod ResizeMethod ResizeMethod.NearestNeighbour
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: UINT8 (when inResizeMethod = Area), UINT16 (when inResizeMethod = Area), 3xUINT8 (when inResizeMethod = Area), 3xUINT16 (when inResizeMethod = Area).

This operation is optimized for SSE41 technology for pixels of types: UINT8(when inResizeMethod = Bilinear), 3xUINT8(when inResizeMethod = Bilinear).

This operation is optimized for AVX2 technology for pixels of types: UINT8 (when inResizeMethod = Area or inResizeMethod = Bilinear), UINT16 (when inResizeMethod = Area), 3xUINT8 (when inResizeMethod = Area or inResizeMethod = Bilinear), 3xUINT16 (when inResizeMethod = Area).

This operation is optimized for NEON technology for pixels of types: UINT8 (when inResizeMethod = Area), 3xUINT8 (when inResizeMethod = Area), UINT16 (when inResizeMethod = Area), 3xUINT16 (when inResizeMethod = Area).