decode
Function Usage
Image decoding API of the ImageProcessor class. For details about the input and output formats, resolution ranges, and alignment modes, see Decode.
For details about how to use this API, see Image Decoding.
Prototype
1 | decode(inputPath: str, decodeFormat: image_format) |
Input Parameters
Parameter |
Type |
Description |
|---|---|---|
inputPath |
str |
Path of the image to be decoded. |
decodeFormat |
image_format enumeration |
Format of the decoded image. (For PNG images, this parameter does not need to be set.) |
Response Parameters
Decoded Image class
Exception Throwing Interface
If the image path and decoding format are incorrect, or the decoding fails, a runtime exception is thrown.
Parent topic: ImageProcessor