ImageProcessor类的图片解码接口,输入输出格式、分辨率范围、对齐方式请参见Decode。
decode(inputPath: str, decodeFormat: image_format)
参数名 |
类型 |
说明 |
---|---|---|
inputPath |
str |
输入待解码的图片路径。 |
decodeFormat |
image_format枚举类 |
输入解码后图片的格式。(PNG格式解码无需设置。) |
返回解码后的Image类。
图片路径错误、解码格式错误、解码失败,抛出runtime异常。