Image encoding API of the ImageProcessor class. For details about the input and output formats, resolution ranges, and alignment modes, see Encode.
For details about how to use this API, see Image Encoding.
1 | encode(inputImage: Image, savePath: str, encodeLevel: int) |
Parameter |
Type |
Description |
|---|---|---|
inputImage |
Image class |
Image class before encoding. |
savePath |
str |
Path for saving the encoded image. The file name extension must be jpg. |
encodeLevel |
int |
The default value is 100. For the |
If the image path and the encoding level are incorrect, or the encoding fails, a runtime exception is thrown.