png_get_image_info
产品支持情况
| 
          产品  | 
        
          是否支持  | 
       
|---|---|
| 
          | 
        
          √  | 
       
| 
          | 
        
          √  | 
       
| 
          | 
        
          x  | 
       
| 
          | 
        
          √  | 
       
| 
          | 
        
          √  | 
       
| 
          | 
        
          x  | 
       
使用说明
| 
          c函数原型  | 
        
          hi_s32 hi_mpi_png_get_image_info(const hi_img_stream *png_stream, hi_img_info *img_info)  | 
       
|---|---|
| 
          Python函数  | 
        
          img_info, ret = acl.himpi.png_get_image_info(png_stream)  | 
       
| 
          函数功能  | 
        
          根据输入码流,获取PNG源图片的宽、高、源格式及源格式解码时输出图片的宽Stride、高Stride、以及所需的内存大小等信息。  | 
       
| 
          输入说明  | 
        
          png_stream:dict,输入码流信息,具体请参见hi_img_stream。  | 
       
| 
          返回值说明  | 
        
          img_info:dict,图片信息字典,具体请参见hi_img_info。 ret:int,错误码。 
  | 
       
| 
          约束说明  | 
        
          提供给用户来计算解码后输出图片占用的内存大小。当前仅支持解析PNG图片。通过本接口获取的“width_stride”向上128对齐、“height_stride”向上16对齐。  |