1e41f4b71Sopenharmony_ci# image_mdk.h 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## 概述 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ci声明访问图像剪辑矩形、大小、格式和组件数据的方法。 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci**库**:libimage_ndk.z.so 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci**引用文件**:<multimedia/image_framework/image_mdk.h> 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci**起始版本:** 10 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci**相关模块:** [Image](image.md) 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci## 汇总 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci### 结构体 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ci| 名称 | 描述 | 23e41f4b71Sopenharmony_ci| -------- | -------- | 24e41f4b71Sopenharmony_ci| struct [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) | 定义图像矩形信息。 | 25e41f4b71Sopenharmony_ci| struct [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) | 定义图像组成信息。 | 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci### 类型定义 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci| 名称 | 描述 | 31e41f4b71Sopenharmony_ci| -------- | -------- | 32e41f4b71Sopenharmony_ci| typedef struct ImageNative_ [ImageNative](image.md#imagenative) | 为图像接口定义native层图像对象。 | 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ci### 枚举 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ci| 名称 | 描述 | 38e41f4b71Sopenharmony_ci| -------- | -------- | 39e41f4b71Sopenharmony_ci| { [OHOS_IMAGE_FORMAT_YCBCR_422_SP](image.md#anonymous-enum-13) = 1000,<br/>[OHOS_IMAGE_FORMAT_JPEG](image.md#anonymous-enum-13) = 2000, } | 图像格式枚举值。 | 40e41f4b71Sopenharmony_ci| { [OHOS_IMAGE_COMPONENT_FORMAT_YUV_Y](image.md#anonymous-enum-13-1) = 1,<br/>[OHOS_IMAGE_COMPONENT_FORMAT_YUV_U](image.md#anonymous-enum-13-1) = 2,<br/>[OHOS_IMAGE_COMPONENT_FORMAT_YUV_V](image.md#anonymous-enum-13-1) = 3,<br/>[OHOS_IMAGE_COMPONENT_FORMAT_JPEG](image.md#anonymous-enum-13-1) = 4, } | 图像组成类型枚举值。 | 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci### 函数 44e41f4b71Sopenharmony_ci 45e41f4b71Sopenharmony_ci| 名称 | 描述 | 46e41f4b71Sopenharmony_ci| -------- | -------- | 47e41f4b71Sopenharmony_ci| [ImageNative](image.md#imagenative) \* [OH_Image_InitImageNative](image.md#oh_image_initimagenative) (napi_env env, napi_value source) | 从输入的JavaScript Native API **图像** 对象中解析 native **ImageNative** 对象。 | 48e41f4b71Sopenharmony_ci| int32_t [OH_Image_ClipRect](image.md#oh_image_cliprect) (const [ImageNative](image.md#imagenative) \*native, struct [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) \*rect) | 获取native **ImageNative** 对象 [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) 信息。 | 49e41f4b71Sopenharmony_ci| int32_t [OH_Image_Size](image.md#oh_image_size) (const [ImageNative](image.md#imagenative) \*native, struct [OhosImageSize](_ohos_image_size.md) \*size) | 获取native **ImageNative** 对象的 [OhosImageSize](_ohos_image_size.md) 信息。 | 50e41f4b71Sopenharmony_ci| int32_t [OH_Image_Format](image.md#oh_image_format) (const [ImageNative](image.md#imagenative) \*native, int32_t \*format) | 获取native **ImageNative** 对象的图像格式。 | 51e41f4b71Sopenharmony_ci| int32_t [OH_Image_GetComponent](image.md#oh_image_getcomponent) (const [ImageNative](image.md#imagenative) \*native, int32_t componentType, struct [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) \*componentNative) | 从 native **ImageNative** 对象中获取 [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md)。 | 52e41f4b71Sopenharmony_ci| int32_t [OH_Image_Release](image.md#oh_image_release) ([ImageNative](image.md#imagenative) \*native) | 释放 **ImageNative** native对象。 | 53