---
title: acl.himpi.sys_get_image_align_info
description: "| c函数原型 | hi\\_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"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0412.html"
---

# acl.himpi.sys_get_image_align_info

| c函数原型 | hi\_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函数 | img\_align\_info, ret = acl.himpi.sys\_get\_image\_align\_info(mod\_type, mod\_num, img\_base\_info) |
| 函数功能 | 根据模块、图片宽高计算出宽高对齐后的值以及存放图片数据的内存大小。 |
| 输入说明 | mod\_type：模块类型数组。模块类型是整数型常量. 如果数组中只有一个模块，则系统内部按该模块的对齐值来计算；如果数组中有多个模块，则系统内部按多个模块中的最大对齐值来计算；如果将模块类型设置为HI\_MOD\_ALL，则系统内部会从所有模块中选取最大对齐值来计算，便于简化理解各模块的对齐差异，操作简便，但可能占用内存较大。 mod\_num：模块类型数组长度。 img\_base\_info：图片基本信息字典。 |
| 返回值说明 | img\_align\_info：图片对齐信息、内存大小的字典。 ret：int，错误码。 返回0表示成功。 返回非0表示失败，参见公共返回码。 |
| 约束说明 | 图片宽、高不能小于该模块最小宽高、不能大于最大宽高，图片格式必须是该模块所支持的。 各模块支持的图片格式、对齐要求请参见VPC图像处理接口、VDEC视频解码/JPEGD图像解码接口、VENC视频/JPEGE图像编码接口、PNGD图像处理接口下的约束说明。当前不支持设置HI\_PIXEL\_FORMAT\_UNKNOWN格式。 |
