resize

Function Usage

Resizes an image. For details about the input and output ranges and alignment modes, see resize(inputImage, resize, interpolation).

This API will be officially deleted in December, 2025. Use resize of the ImageProcessor class.

Prototype

1
resize(inputImage: Image, resize: Size, interpolation: interpolation)

Input Parameters

Parameter

Type

Description

inputImage

Image class

Image class before resizing

resize

Size class

Height and width for resizing

interpolation

interpolation enumeration

Resizing mode. The default value is HUAWEI_HIGH_ORDER_FILTER.

Response Parameters

Image object

Exception Throwing Interface

If the ImageProcessor fails to be created or an image fails to be resized, a runtime exception is thrown.