ResizeImage_FixedAspectRatio


Changes one dimension of the image to a desired length while the other dimension is set to a length such that the aspect ration of the image is maintained.

Syntax

C++
Python
 
def ResizeImage_FixedAspectRatio(
	inImage: Image,
	outImage: Image,
	/,
	*,
	inNewLength: int | None = None,
	inDimension: Dimension = Dimension.Width,
	inResizeMethod: ResizeMethod = ResizeMethod.NearestNeighbour
)
-> None

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inNewLength int | None 1 - 65535 None The length in pixels that the chosen dimension will be set to
Input value inDimension Dimension Dimension.Width The dimension that will be set to the given length
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 AVX2 technology for pixels of types: UINT8 (when inResizeMethod = Area), UINT16 (when inResizeMethod = Area), 3xUINT8 (when inResizeMethod = Area), 3xUINT16 (when inResizeMethod = Area).