Decodes and reads images.
For details about the input and output formats and alignment modes, see decode(inputPath, decodeFormat).
This API will be officially deleted in December, 2025. Use decode of the ImageProcessor class.
1 | read_image(inputPath: str, deviceId: int, decodeFormat: image_format) |
Parameter |
Type |
Description |
|---|---|---|
inputPath |
str |
Image path |
deviceId |
int |
Device ID |
decodeFormat |
image_format enumeration |
Decoding format of an input image |
Image object
If the ImageProcessor fails to be created or an image fails to be decoded, a runtime exception is thrown.