sys_get_image_align_info
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
x |
|
√ |
|
√ |
Function Usage
Calculates the aligned width and height and the buffer size for storing image data based on the module and image width and height.
Prototype
- C Prototype
1hi_s32 hi_mpi_sys_get_image_align_info(const hi_module_type mod_type[], const hi_u32 mod_num, const hi_img_base_info *img_base_info, hi_img_align_info *img_align_info)
- Python Function
1img_align_info, ret = acl.himpi.sys_get_image_align_info(mod_type, mod_num, img_base_info)
Parameter Description
Parameter |
Description |
|---|---|
mod_type |
List, module type list. The module type is an integer constant. For details, see hi_module_type.
|
mod_num |
Int, length of the module type array. |
img_base_info |
Dict, image basic information dictionary. For details, see hi_img_base_info. |
Return Value Description
Return Value |
Description |
|---|---|
img_align_info |
Dict, dictionary of the image alignment information and memory size. For details, see hi_img_align_info. |
ret |
Int, error code. 0: success. Other values: failures. For details, see Common Return Codes. |
Restrictions
- The width and height of the image cannot be less than the minimum width and height or exceed the maximum width and height of the module. The image format must be supported by the module.
- For details about the image formats and alignment requirements supported by each module, see the restrictions in VPC APIs, VDEC/JPEGD APIs, VENC/JPEGE APIs, and PNGD APIs. The HI_PIXEL_FORMAT_UNKNOWN image format is not supported.