crop_paste(inputImage, cropPasteRect, pastedImage)

Function Usage

Image cropping and pasting API of the ImageProcessor class. The procedure is as follows:

  1. Crops an image from inputImage and resizes the image to the size of the pasting ROI.
  2. Pastes the cropped image to the specified pasting ROI of pastedImage. For details about the input and output formats, resolution ranges, and alignment modes, see CropAndPaste.

Input Parameter Description

Parameter

Type

Description

inputImage

Image class

Image class before cropping

cropPasteRect

tuple(Rect, Rect)

Cropping parameters of the input image.

The first Rect corresponds to the cropping parameter, and the second one corresponds to the pasting parameter.

pastedImage

Image class

Image class after pasting

Return Parameter Description

None

Exception Throwing Interface

If image cropping and pasting fails, a runtime exception occurs.