Obtains the width, height, and source format of the input PNG image, the width stride and height stride of the output image, as well as the required buffer size based on the input stream.
The Ascend 310 AI Processor does not support this API in the current version.
The Ascend 910 AI Processor does not support this API in the current version.
This API is provided to calculate the size of the buffer occupied by the decoded output image. Currently, only PNG images can be parsed. The obtained widthStride and heightStride must be rounded up to the nearest multiples of 128 and 16, respectively.
hi_s32 hi_mpi_png_get_image_info(const hi_img_stream *png_stream, hi_img_info *img_info)
Parameter |
Input/Output |
Description |
|---|---|---|
png_stream |
Input |
Pointer to the input stream information. In standard form, when this API is called on the host, the configured addr must be a buffer address on the host. |
img_info |
Output |
Pointer to the image information. |