1e41f4b71Sopenharmony_ci# image_mdk.h
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Overview
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciDeclares the APIs used to access the image rectangle, size, format, and component data.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci**Library**: libimage_ndk.z.so
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci**File to include**: <multimedia/image_framework/image_mdk.h>
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci**Since**: 10
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci**Related module**: [Image](image.md)
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci## Summary
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci### Structs
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci| Name| Description| 
23e41f4b71Sopenharmony_ci| -------- | -------- |
24e41f4b71Sopenharmony_ci| struct  [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) | Defines the information about an image rectangle. | 
25e41f4b71Sopenharmony_ci| struct  [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) | Defines the information about an image component. | 
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci### Types
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci| Name| Description| 
31e41f4b71Sopenharmony_ci| -------- | -------- |
32e41f4b71Sopenharmony_ci| typedef struct ImageNative_ [ImageNative](image.md#imagenative) | Defines an image object at the native layer. | 
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci### Enums
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci| Name| Description| 
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, } | Enumerates the image formats.| 
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, } | Enumerates the image components.| 
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci### Functions
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ci| Name| Description| 
46e41f4b71Sopenharmony_ci| -------- | -------- |
47e41f4b71Sopenharmony_ci| [ImageNative](image.md#imagenative) \* [OH_Image_InitImageNative](image.md#oh_image_initimagenative) (napi_env env, napi_value source) | Converts an **Image** object at the JavaScript native layer into an **ImageNative** object. | 
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) | Obtains [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) of an **ImageNative** object. | 
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) | Obtains [OhosImageSize](_ohos_image_size.md) of an **ImageNative** object. | 
50e41f4b71Sopenharmony_ci| int32_t [OH_Image_Format](image.md#oh_image_format) (const [ImageNative](image.md#imagenative) \*native, int32_t \*format) | Obtains the image format of an **ImageNative** object. | 
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) | Obtains [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) of an **ImageNative** object. | 
52e41f4b71Sopenharmony_ci| int32_t [OH_Image_Release](image.md#oh_image_release) ([ImageNative](image.md#imagenative) \*native) | Releases an **ImageNative** object. | 
53