decode_bytes
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
decode_bytes(data: bytes, dataSize: int, decodeFormat: image_format)
Input Parameters
Parameter |
Type |
Description |
|---|---|---|
data |
bytes |
Binary data before decoding. |
dataSize |
int |
Valid length of the binary data. The value must be the same as the length of the input data. |
decodeFormat |
image_format enumerations |
Format of the decoded image. (This parameter does not need to be set when the PNG format is used for decoding.) The default value is base.nv12. |
Response Parameters
Returns the decoded image class.
Exception Throwing Interface
If the data type or length does not match, the decoding format is incorrect, or the decoding fails, a runtime exception is thrown.
Parent topic: ImageProcessor