• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# image_mdk.h
2
3
4## Overview
5
6The **image_mdk.h** file declares the functions that access the image rectangle, size, format, and component data.
7
8**Since**
9
1010
11
12**Related Modules**
13
14[Image](image.md)
15
16
17## Summary
18
19
20### Structs
21
22| Name| Description|
23| -------- | -------- |
24| [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) | Defines the information about an image rectangle.|
25| [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) | Defines the information about an image component.|
26
27
28### Types
29
30| Name| Description|
31| -------- | -------- |
32| [ImageNative](image.md#imagenative) | Defines an image object at the native layer.|
33
34
35### Enums
36
37| Name| Description|
38| -------- | -------- |
39| { [OHOS_IMAGE_FORMAT_YCBCR_422_SP](image.md) = 1000,<br>[OHOS_IMAGE_FORMAT_JPEG](image.md) = 2000, } | Enumerates the image formats.|
40| { [OHOS_IMAGE_COMPONENT_FORMAT_YUV_Y](image.md) = 1,<br>[OHOS_IMAGE_COMPONENT_FORMAT_YUV_U](image.md) = 2,<br>[OHOS_IMAGE_COMPONENT_FORMAT_YUV_V](image.md) = 3,<br>[OHOS_IMAGE_COMPONENT_FORMAT_JPEG](image.md) = 4, } | Enumerates the image components.|
41
42
43### Functions
44
45| Name| Description|
46| -------- | -------- |
47| [OH_Image_InitImageNative](image.md#oh_image_initimagenative) (napi_env env, napi_value source) | Parses an **ImageNative** object from an **Image** object at the JavaScript native layer.|
48| [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.|
49| [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.|
50| [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.|
51| [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.|
52| [OH_Image_Release](image.md#oh_image_release) ([ImageNative](image.md#imagenative) \*native) | Releases an **ImageNative** object.|
53