1e41f4b71Sopenharmony_ci# Image
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Overview
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciThe **Image** module enables access to image APIs.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.Image
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci**Since**: 8
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci## Summary
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci### Files
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci| Name| Description| 
19e41f4b71Sopenharmony_ci| -------- | -------- |
20e41f4b71Sopenharmony_ci| [image_mdk.h](image__mdk_8h.md) | Declares the APIs used to access the image rectangle, size, format, and component data.| 
21e41f4b71Sopenharmony_ci| [image_mdk_common.h](image__mdk__common_8h.md) | Declares the common enums and structs used by the image APIs.|
22e41f4b71Sopenharmony_ci| [image_packer_mdk.h](image__packer__mdk_8h.md) | Declares the APIs used to pack an image into a buffer or file.| 
23e41f4b71Sopenharmony_ci| [image_pixel_map_mdk.h](image__pixel__map__mdk_8h.md) | Declares the APIs used to lock, access, and unlock a pixel map.| 
24e41f4b71Sopenharmony_ci| [image_pixel_map_napi.h](image__pixel__map__napi_8h.md) | (Deprecated) Declares the APIs used to lock, access, and unlock a pixel map.| 
25e41f4b71Sopenharmony_ci| [image_receiver_mdk.h](image__receiver__mdk_8h.md) | Declares the APIs used to obtain image data from the native layer.| 
26e41f4b71Sopenharmony_ci| [image_source_mdk.h](image__source__mdk_8h.md) | Declares the APIs used to decode an image source into a pixel map.|
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci### Structs
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci| Name| Description| 
32e41f4b71Sopenharmony_ci| -------- | -------- |
33e41f4b71Sopenharmony_ci| struct  [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) | Defines the information about an image rectangle. | 
34e41f4b71Sopenharmony_ci| struct  [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) | Defines the information about an image component. | 
35e41f4b71Sopenharmony_ci| struct  [OhosImageSize](_ohos_image_size.md) | Defines the image size. | 
36e41f4b71Sopenharmony_ci| struct  [ImagePacker_Opts_](_image_packer___opts__.md) | Defines the image packing options. | 
37e41f4b71Sopenharmony_ci| struct  [OhosPixelMapInfos](_ohos_pixel_map_infos.md) | Defines the information about a pixel map. | 
38e41f4b71Sopenharmony_ci| struct  [OhosPixelMapCreateOps](_ohos_pixel_map_create_ops.md) | Defines the options for creating a pixel map. | 
39e41f4b71Sopenharmony_ci| struct  [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) | Defines the information about a pixel map. | 
40e41f4b71Sopenharmony_ci| struct  [OhosImageReceiverInfo](_ohos_image_receiver_info.md) | Defines the information about an image receiver. | 
41e41f4b71Sopenharmony_ci| struct  [OhosImageRegion](_ohos_image_region.md) | Defines the region of an image source to decode. | 
42e41f4b71Sopenharmony_ci| struct  [OhosImageSourceOps](_ohos_image_source_ops.md) | Defines the image source options. | 
43e41f4b71Sopenharmony_ci| struct  [OhosImageDecodingOps](_ohos_image_decoding_ops.md) | Defines the options for decoding an image source. | 
44e41f4b71Sopenharmony_ci| struct  [OhosImageSourceInfo](_ohos_image_source_info.md) | Defines the information about an image source. | 
45e41f4b71Sopenharmony_ci| struct  [OhosImageSource](_ohos_image_source.md) | Defines the input resource of an image source. Only one type of resource is accepted at a time. | 
46e41f4b71Sopenharmony_ci| struct  [OhosImageSourceDelayTimeList](_ohos_image_source_delay_time_list.md) | Defines the delay time list of an image source. | 
47e41f4b71Sopenharmony_ci| struct  [OhosImageSourceSupportedFormat](_ohos_image_source_supported_format.md) | Defines the format string supported by an image source.  | 
48e41f4b71Sopenharmony_ci| struct  [OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md) | Defines the format string list supported by an image source.  | 
49e41f4b71Sopenharmony_ci| struct  [OhosImageSourceProperty](_ohos_image_source_property.md) | Defines the property string (in key-value format) of an image source.  | 
50e41f4b71Sopenharmony_ci| struct  [OhosImageSourceUpdateData](_ohos_image_source_update_data.md) | Defines the update data of an image source. | 
51e41f4b71Sopenharmony_ci
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci### Macros
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ci| Name| Description| 
56e41f4b71Sopenharmony_ci| -------- | -------- |
57e41f4b71Sopenharmony_ci| **IMAGE_RESULT_BASE** 62980096 | Defines the basic value returned by the interface. |
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ci
60e41f4b71Sopenharmony_ci### Types
61e41f4b71Sopenharmony_ci
62e41f4b71Sopenharmony_ci| Name| Description| 
63e41f4b71Sopenharmony_ci| -------- | -------- |
64e41f4b71Sopenharmony_ci| typedef struct ImageNative_ [ImageNative](#imagenative) | Defines an image object at the native layer. | 
65e41f4b71Sopenharmony_ci| typedef struct ImagePacker_Native_ [ImagePacker_Native](#imagepacker_native) | Defines an image packer object at the native layer. | 
66e41f4b71Sopenharmony_ci| typedef struct [ImagePacker_Opts_](_image_packer___opts__.md) [ImagePacker_Opts](#imagepacker_opts) | Defines the alias of the image packing options. | 
67e41f4b71Sopenharmony_ci| typedef struct NativePixelMap_ [NativePixelMap](#nativepixelmap) | Defines the data type name of the pixel map at the native layer. | 
68e41f4b71Sopenharmony_ci| typedef struct [OhosPixelMapInfos](_ohos_pixel_map_infos.md) [OhosPixelMapInfos](#ohospixelmapinfos) | Defines the information about a pixel map. | 
69e41f4b71Sopenharmony_ci| typedef struct ImageReceiverNative_ [ImageReceiverNative](#imagereceivernative) | Defines the data type name of the image receiver at the native layer. | 
70e41f4b71Sopenharmony_ci| typedef void(\* [OH_Image_Receiver_On_Callback](#oh_image_receiver_on_callback)) () | Defines the callbacks for the image interface at the native layer. | 
71e41f4b71Sopenharmony_ci| typedef struct ImageSourceNative_ [ImageSourceNative](#imagesourcenative) | Defines an image source object at the native layer. | 
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci
74e41f4b71Sopenharmony_ci### Enums
75e41f4b71Sopenharmony_ci
76e41f4b71Sopenharmony_ci| Name| Description| 
77e41f4b71Sopenharmony_ci| -------- | -------- |
78e41f4b71Sopenharmony_ci| { OHOS_IMAGE_FORMAT_YCBCR_422_SP = 1000,<br>OHOS_IMAGE_FORMAT_JPEG = 2000 } | Enumerates the image formats.| 
79e41f4b71Sopenharmony_ci| { OHOS_IMAGE_COMPONENT_FORMAT_YUV_Y = 1,<br>OHOS_IMAGE_COMPONENT_FORMAT_YUV_U = 2,<br>OHOS_IMAGE_COMPONENT_FORMAT_YUV_V = 3,<br>OHOS_IMAGE_COMPONENT_FORMAT_JPEG = 4 } | Enumerates the image components.| 
80e41f4b71Sopenharmony_ci| [IRNdkErrCode](#irndkerrcode-1) {<br>IMAGE_RESULT_SUCCESS = 0, IMAGE_RESULT_BAD_PARAMETER = -1,<br>IMAGE_RESULT_IMAGE_RESULT_BASE = IMAGE_RESULT_BASE,<br>IMAGE_RESULT_ERR_IPC = IMAGE_RESULT_BASE + 1,<br>IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST = IMAGE_RESULT_BASE + 2,<br>IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL = IMAGE_RESULT_BASE + 3,<br>IMAGE_RESULT_DECODE_ABNORMAL = IMAGE_RESULT_BASE + 4,<br>IMAGE_RESULT_DATA_ABNORMAL = IMAGE_RESULT_BASE + 5,<br>IMAGE_RESULT_MALLOC_ABNORMAL = IMAGE_RESULT_BASE + 6,<br>IMAGE_RESULT_DATA_UNSUPPORT = IMAGE_RESULT_BASE + 7,<br>IMAGE_RESULT_INIT_ABNORMAL = IMAGE_RESULT_BASE + 8,<br>IMAGE_RESULT_GET_DATA_ABNORMAL = IMAGE_RESULT_BASE + 9,<br>IMAGE_RESULT_TOO_LARGE = IMAGE_RESULT_BASE + 10,<br>IMAGE_RESULT_TRANSFORM = IMAGE_RESULT_BASE + 11,<br>IMAGE_RESULT_COLOR_CONVERT = IMAGE_RESULT_BASE + 12,<br>IMAGE_RESULT_CROP = IMAGE_RESULT_BASE + 13,<br>IMAGE_RESULT_SOURCE_DATA = IMAGE_RESULT_BASE + 14,<br>IMAGE_RESULT_SOURCE_DATA_INCOMPLETE = IMAGE_RESULT_BASE + 15,<br>IMAGE_RESULT_MISMATCHED_FORMAT = IMAGE_RESULT_BASE + 16,<br>IMAGE_RESULT_UNKNOWN_FORMAT = IMAGE_RESULT_BASE + 17,<br>IMAGE_RESULT_SOURCE_UNRESOLVED = IMAGE_RESULT_BASE + 18,<br>IMAGE_RESULT_INVALID_PARAMETER = IMAGE_RESULT_BASE + 19,<br>IMAGE_RESULT_DECODE_FAILED = IMAGE_RESULT_BASE + 20,<br>IMAGE_RESULT_PLUGIN_REGISTER_FAILED = IMAGE_RESULT_BASE + 21,<br>IMAGE_RESULT_PLUGIN_CREATE_FAILED = IMAGE_RESULT_BASE + 22,<br>IMAGE_RESULT_ENCODE_FAILED = IMAGE_RESULT_BASE + 23,<br>IMAGE_RESULT_ADD_PIXEL_MAP_FAILED = IMAGE_RESULT_BASE + 24,<br>IMAGE_RESULT_HW_DECODE_UNSUPPORT = IMAGE_RESULT_BASE + 25,<br>IMAGE_RESULT_DECODE_HEAD_ABNORMAL = IMAGE_RESULT_BASE + 26,<br>IMAGE_RESULT_DECODE_EXIF_UNSUPPORT = IMAGE_RESULT_BASE + 27,<br>IMAGE_RESULT_PROPERTY_NOT_EXIST = IMAGE_RESULT_BASE + 28,<br>IMAGE_RESULT_MEDIA_DATA_UNSUPPORT = IMAGE_RESULT_BASE + 30,<br>IMAGE_RESULT_MEDIA_TOO_LARGE = IMAGE_RESULT_BASE + 31,<br>IMAGE_RESULT_MEDIA_MALLOC_FAILED = IMAGE_RESULT_BASE + 32,<br>IMAGE_RESULT_MEDIA_END_OF_STREAM = IMAGE_RESULT_BASE + 33,<br>IMAGE_RESULT_MEDIA_IO_ABNORMAL = IMAGE_RESULT_BASE + 34,<br>IMAGE_RESULT_MEDIA_MALFORMED = IMAGE_RESULT_BASE + 35,<br>IMAGE_RESULT_MEDIA_BUFFER_TOO_SMALL = IMAGE_RESULT_BASE + 36,<br>IMAGE_RESULT_MEDIA_OUT_OF_RANGE = IMAGE_RESULT_BASE + 37,<br>IMAGE_RESULT_MEDIA_STATUS_ABNORMAL = IMAGE_RESULT_BASE + 38,<br>IMAGE_RESULT_MEDIA_VALUE_INVALID = IMAGE_RESULT_BASE + 39,<br>IMAGE_RESULT_MEDIA_NULL_POINTER = IMAGE_RESULT_BASE + 40,<br>IMAGE_RESULT_MEDIA_INVALID_OPERATION = IMAGE_RESULT_BASE + 41,<br>IMAGE_RESULT_MEDIA_ERR_PLAYER_NOT_INIT = IMAGE_RESULT_BASE + 42,<br>IMAGE_RESULT_MEDIA_EARLY_PREPARE = IMAGE_RESULT_BASE + 43,<br>IMAGE_RESULT_MEDIA_SEEK_ERR = IMAGE_RESULT_BASE + 44,<br>IMAGE_RESULT_MEDIA_PERMISSION_DENIED = IMAGE_RESULT_BASE + 45,<br>IMAGE_RESULT_MEDIA_DEAD_OBJECT = IMAGE_RESULT_BASE + 46,<br>IMAGE_RESULT_MEDIA_TIMED_OUT = IMAGE_RESULT_BASE + 47,<br>IMAGE_RESULT_MEDIA_TRACK_NOT_ALL_SUPPORTED = IMAGE_RESULT_BASE + 48,<br>IMAGE_RESULT_MEDIA_ADAPTER_INIT_FAILED = IMAGE_RESULT_BASE + 49,<br>IMAGE_RESULT_MEDIA_WRITE_PARCEL_FAIL = IMAGE_RESULT_BASE + 50,<br>IMAGE_RESULT_MEDIA_READ_PARCEL_FAIL = IMAGE_RESULT_BASE + 51,<br>IMAGE_RESULT_MEDIA_NO_AVAIL_BUFFER = IMAGE_RESULT_BASE + 52,<br>IMAGE_RESULT_MEDIA_INVALID_PARAM = IMAGE_RESULT_BASE + 53,<br>IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_EXIST = IMAGE_RESULT_BASE + 54,<br>IMAGE_RESULT_MEDIA_CREATE_CODEC_ADAPTER_FAILED = IMAGE_RESULT_BASE + 55,<br>IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_INIT = IMAGE_RESULT_BASE + 56,<br>IMAGE_RESULT_MEDIA_ZCODEC_CREATE_FAILED = IMAGE_RESULT_BASE + 57,<br>IMAGE_RESULT_MEDIA_ZCODEC_NOT_EXIST = IMAGE_RESULT_BASE + 58,<br>IMAGE_RESULT_MEDIA_JNI_CLASS_NOT_EXIST = IMAGE_RESULT_BASE + 59,<br>IMAGE_RESULT_MEDIA_JNI_METHOD_NOT_EXIST = IMAGE_RESULT_BASE + 60,<br>IMAGE_RESULT_MEDIA_JNI_NEW_OBJ_FAILED = IMAGE_RESULT_BASE + 61,<br>IMAGE_RESULT_MEDIA_JNI_COMMON_ERROR = IMAGE_RESULT_BASE + 62,<br>IMAGE_RESULT_MEDIA_DISTRIBUTE_NOT_SUPPORT = IMAGE_RESULT_BASE + 63,<br>IMAGE_RESULT_MEDIA_SOURCE_NOT_SET = IMAGE_RESULT_BASE + 64,<br>IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_INIT = IMAGE_RESULT_BASE + 65,<br>IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_EXIST = IMAGE_RESULT_BASE + 66,<br>IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT = IMAGE_RESULT_BASE + 67,<br>IMAGE_RESULT_MEDIA_RTSP_CAPTURE_NOT_INIT = IMAGE_RESULT_BASE + 68,<br>IMAGE_RESULT_MEDIA_RTSP_SOURCE_URL_INVALID = IMAGE_RESULT_BASE + 69,<br>IMAGE_RESULT_MEDIA_RTSP_VIDEO_TRACK_NOT_FOUND = IMAGE_RESULT_BASE + 70,<br>IMAGE_RESULT_MEDIA_RTSP_CAMERA_NUM_REACH_MAX = IMAGE_RESULT_BASE + 71,<br>IMAGE_RESULT_MEDIA_SET_VOLUME = IMAGE_RESULT_BASE + 72,<br>IMAGE_RESULT_MEDIA_NUMBER_OVERFLOW = IMAGE_RESULT_BASE + 73,<br>IMAGE_RESULT_MEDIA_DIS_PLAYER_UNSUPPORTED = IMAGE_RESULT_BASE + 74,<br>IMAGE_RESULT_MEDIA_DENCODE_ICC_FAILED = IMAGE_RESULT_BASE + 75,<br>IMAGE_RESULT_MEDIA_ENCODE_ICC_FAILED = IMAGE_RESULT_BASE + 76,<br>IMAGE_RESULT_MEDIA_READ_PIXELMAP_FAILED = IMAGE_RESULT_BASE + 150,<br>IMAGE_RESULT_MEDIA_WRITE_PIXELMAP_FAILED = IMAGE_RESULT_BASE + 151,<br>IMAGE_RESULT_MEDIA_PIXELMAP_NOT_ALLOW_MODIFY = IMAGE_RESULT_BASE + 152,<br>IMAGE_RESULT_MEDIA_CONFIG_FAILED = IMAGE_RESULT_BASE + 153,<br>IMAGE_RESULT_JNI_ENV_ABNORMAL = IMAGE_RESULT_BASE + 154,<br>IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED = IMAGE_RESULT_BASE + 155,<br>IMAGE_RESULT_CREATE_SURFACE_FAILED = IMAGE_RESULT_BASE + 156,<br>IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED = IMAGE_RESULT_BASE + 157,<br>IMAGE_RESULT_GET_SURFACE_FAILED = IMAGE_RESULT_BASE + 158,<br>IMAGE_RESULT_SURFACE_ACQUIRE_BUFFER_FAILED = IMAGE_RESULT_BASE + 159,<br>IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED = IMAGE_RESULT_BASE + 160,<br>IMAGE_RESULT_REGISTER_LISTENER_FAILED = IMAGE_RESULT_BASE + 161,<br>IMAGE_RESULT_REGISTER_BUFFER_FAILED = IMAGE_RESULT_BASE + 162,<br>IMAGE_RESULT_FREAD_FAILED = IMAGE_RESULT_BASE + 163,<br>IMAGE_RESULT_PEEK_FAILED = IMAGE_RESULT_BASE + 164,<br>IMAGE_RESULT_SEEK_FAILED = IMAGE_RESULT_BASE + 165,<br>IMAGE_RESULT_STREAM_SIZE_ERROR = IMAGE_RESULT_BASE + 166,<br>IMAGE_RESULT_FILE_FD_ERROR = IMAGE_RESULT_BASE + 167,<br>IMAGE_RESULT_FILE_DAMAGED = IMAGE_RESULT_BASE + 168,<br>IMAGE_RESULT_CREATE_DECODER_FAILED = IMAGE_RESULT_BASE + 169,<br>IMAGE_RESULT_CREATE_ENCODER_FAILED = IMAGE_RESULT_BASE + 170,<br>IMAGE_RESULT_CHECK_FORMAT_ERROR = IMAGE_RESULT_BASE + 171,<br>IMAGE_RESULT_THIRDPART_SKIA_ERROR = IMAGE_RESULT_BASE + 172,<br>IMAGE_RESULT_HW_DECODE_FAILED = IMAGE_RESULT_BASE + 173,<br>IMAGE_RESULT_ALLOCATER_TYPE_ERROR = IMAGE_RESULT_BASE + 174,<br>IMAGE_RESULT_ALPHA_TYPE_ERROR = IMAGE_RESULT_BASE + 175,<br>IMAGE_RESULT_INDEX_INVALID = IMAGE_RESULT_BASE + 176,<br>IMAGE_RESULT_MEDIA_UNKNOWN = IMAGE_RESULT_BASE + 200<br>} | Enumerates the return values that may be used by the interface.| 
81e41f4b71Sopenharmony_ci| { OHOS_PIXEL_MAP_ALPHA_TYPE_UNKNOWN = 0,<br>OHOS_PIXEL_MAP_ALPHA_TYPE_OPAQUE = 1,<br>OHOS_PIXEL_MAP_ALPHA_TYPE_PREMUL = 2,<br>OHOS_PIXEL_MAP_ALPHA_TYPE_UNPREMUL = 3 } | Enumerates the pixel map alpha types.| 
82e41f4b71Sopenharmony_ci| { OHOS_PIXEL_MAP_READ_ONLY = 0,<br>OHOS_PIXEL_MAP_EDITABLE = 1 } | Enumerates the pixel map editing types.| 
83e41f4b71Sopenharmony_ci| [OH_PixelMap_AntiAliasingLevel](#oh_pixelmap_antialiasinglevel) { <br>OH_PixelMap_AntiAliasing_NONE = 0, <br>OH_PixelMap_AntiAliasing_LOW = 1, <br>OH_PixelMap_AntiAliasing_MEDIUM = 2, <br>OH_PixelMap_AntiAliasing_HIGH = 3 <br>} | Enumerates the antialiasing levels used for scaling pixel maps. | 
84e41f4b71Sopenharmony_ci| { OHOS_IMAGE_RESULT_SUCCESS = 0,<br>OHOS_IMAGE_RESULT_BAD_PARAMETER = -1 } | Enumerates the error codes returned by the functions.| 
85e41f4b71Sopenharmony_ci| { OHOS_PIXEL_MAP_FORMAT_NONE = 0,<br>OHOS_PIXEL_MAP_FORMAT_RGBA_8888 = 3,<br>OHOS_PIXEL_MAP_FORMAT_RGB_565 = 2 } | Enumerates the pixel map formats.| 
86e41f4b71Sopenharmony_ci| { OHOS_PIXEL_MAP_SCALE_MODE_FIT_TARGET_SIZE = 0,<br>OHOS_PIXEL_MAP_SCALE_MODE_CENTER_CROP = 1 } | Enumerates the pixel map scale modes.| 
87e41f4b71Sopenharmony_ci
88e41f4b71Sopenharmony_ci
89e41f4b71Sopenharmony_ci### Functions
90e41f4b71Sopenharmony_ci
91e41f4b71Sopenharmony_ci| Name| Description| 
92e41f4b71Sopenharmony_ci| -------- | -------- |
93e41f4b71Sopenharmony_ci| [ImageNative](#imagenative) \* [OH_Image_InitImageNative](#oh_image_initimagenative) (napi_env env, napi_value source) | Converts an **Image** object at the JavaScript native layer into an **ImageNative** object. | 
94e41f4b71Sopenharmony_ci| int32_t [OH_Image_ClipRect](#oh_image_cliprect) (const [ImageNative](#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. | 
95e41f4b71Sopenharmony_ci| int32_t [OH_Image_Size](#oh_image_size) (const [ImageNative](#imagenative) \*native, struct [OhosImageSize](_ohos_image_size.md) \*size) | Obtains [OhosImageSize](_ohos_image_size.md) of an **ImageNative** object. | 
96e41f4b71Sopenharmony_ci| int32_t [OH_Image_Format](#oh_image_format) (const [ImageNative](#imagenative) \*native, int32_t \*format) | Obtains the format of an **ImageNative** object. | 
97e41f4b71Sopenharmony_ci| int32_t [OH_Image_GetComponent](#oh_image_getcomponent) (const [ImageNative](#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. | 
98e41f4b71Sopenharmony_ci| int32_t [OH_Image_Release](#oh_image_release) ([ImageNative](#imagenative) \*native) | Releases an **ImageNative** object.  | 
99e41f4b71Sopenharmony_ci| int32_t [OH_ImagePacker_Create](#oh_imagepacker_create) (napi_env env, napi_value \*res) | Obtains an **ImagePacker** object at the JavaScript native layer. | 
100e41f4b71Sopenharmony_ci| [ImagePacker_Native](#imagepacker_native) \* [OH_ImagePacker_InitNative](#oh_imagepacker_initnative) (napi_env env, napi_value packer) | Converts an **ImagePacker** object at the JavaScript native layer into an **ImagePacker_Native** object. | 
101e41f4b71Sopenharmony_ci| int32_t [OH_ImagePacker_PackToData](#oh_imagepacker_packtodata) ([ImagePacker_Native](#imagepacker_native) \*native, napi_value source, [ImagePacker_Opts](#imagepacker_opts) \*opts, uint8_t \*outData, size_t \*size) | Packs a **PixelMap** object or an **ImagePacker** object at the JavaScript native layer to a buffer (defined by **outData**) based on the specified **ImagePacker_Opts** struct.| 
102e41f4b71Sopenharmony_ci| int32_t [OH_ImagePacker_PackToFile](#oh_imagepacker_packtofile) ([ImagePacker_Native](#imagepacker_native) \*native, napi_value source, [ImagePacker_Opts](#imagepacker_opts) \*opts, int fd) | Packs a **PixelMap** object or an **ImagePacker** object at the JavaScript native layer to a file based on the specified **ImagePacker_Opts** struct.| 
103e41f4b71Sopenharmony_ci| int32_t [OH_ImagePacker_Release](#oh_imagepacker_release) ([ImagePacker_Native](#imagepacker_native) \*native) | Releases an [ImagePacker_Native](#imagepacker_native) object.| 
104e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_CreatePixelMap](#oh_pixelmap_createpixelmap) (napi_env env, [OhosPixelMapCreateOps](_ohos_pixel_map_create_ops.md) info, void \*buf, size_t len, napi_value \*res) | Creates a **PixelMap** object. | 
105e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_CreatePixelMapWithStride](#oh_pixelmap_createpixelmapwithstride) (napi_env env, [OhosPixelMapCreateOps](_ohos_pixel_map_create_ops.md) info, void \*buf, size_t len, int32_t rowStride, napi_value \*res) | Creates a **PixelMap** object. Currently, only BGRA input streams are supported. For a pixel map in RGBA format (with the size greater than 512\*512), DMA memory is used by default. | 
106e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_CreateAlphaPixelMap](#oh_pixelmap_createalphapixelmap) (napi_env env, napi_value source, napi_value \*alpha) | Creates a **PixelMap** object that contains only alpha channel information. | 
107e41f4b71Sopenharmony_ci| [NativePixelMap](#nativepixelmap) \* [OH_PixelMap_InitNativePixelMap](#oh_pixelmap_initnativepixelmap) (napi_env env, napi_value source) | Initializes a **PixelMap** object. | 
108e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_GetBytesNumberPerRow](#oh_pixelmap_getbytesnumberperrow) (const [NativePixelMap](#nativepixelmap) \*native, int32_t \*num) | Obtains the number of bytes per row of a **NativePixelMap** object. | 
109e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_GetIsEditable](#oh_pixelmap_getiseditable) (const [NativePixelMap](#nativepixelmap) \*native, int32_t \*editable) | Checks whether a **NativePixelMap** object is editable. | 
110e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_IsSupportAlpha](#oh_pixelmap_issupportalpha) (const [NativePixelMap](#nativepixelmap) \*native, int32_t \*alpha) | Checks whether a **NativePixelMap** object supports alpha channels. | 
111e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_SetAlphaAble](#oh_pixelmap_setalphaable) (const [NativePixelMap](#nativepixelmap) \*native, int32_t alpha) | Sets an alpha channel for a **NativePixelMap** object. | 
112e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_GetDensity](#oh_pixelmap_getdensity) (const [NativePixelMap](#nativepixelmap) \*native, int32_t \*density) | Obtains the pixel density of a **NativePixelMap** object. | 
113e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_SetDensity](#oh_pixelmap_setdensity) (const [NativePixelMap](#nativepixelmap) \*native, int32_t density) | Sets the pixel density for a **NativePixelMap** object. | 
114e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_SetOpacity](#oh_pixelmap_setopacity) (const [NativePixelMap](#nativepixelmap) \*native, float opacity) | Sets the opacity for a **NativePixelMap** object. | 
115e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_Scale](#oh_pixelmap_scale) (const [NativePixelMap](#nativepixelmap) \*native, float x, float y) | Scales a **NativePixelMap** object. | 
116e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_ScaleWithAntiAliasing](#oh_pixelmap_scalewithantialiasing) (const [NativePixelMap](#nativepixelmap) \*native, float x, float y, [OH_PixelMap_AntiAliasingLevel](#oh_pixelmap_antialiasinglevel) level) | Scales an image based on the specified antialiasing level, width, and height. | 
117e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_Translate](#oh_pixelmap_translate) (const [NativePixelMap](#nativepixelmap) \*native, float x, float y) | Translates a **NativePixelMap** object. | 
118e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_Rotate](#oh_pixelmap_rotate) (const [NativePixelMap](#nativepixelmap) \*native, float angle) | Rotates a **NativePixelMap** object. | 
119e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_Flip](#oh_pixelmap_flip) (const [NativePixelMap](#nativepixelmap) \*native, int32_t x, int32_t y) | Flips a **NativePixelMap** object. | 
120e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_Crop](#oh_pixelmap_crop) (const [NativePixelMap](#nativepixelmap) \*native, int32_t x, int32_t y, int32_t width, int32_t height) | Crops a **NativePixelMap** object. | 
121e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_GetImageInfo](#oh_pixelmap_getimageinfo) (const [NativePixelMap](#nativepixelmap) \*native, [OhosPixelMapInfos](_ohos_pixel_map_infos.md) \*info) | Obtains the image information of a **NativePixelMap** object. | 
122e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_AccessPixels](#oh_pixelmap_accesspixels) (const [NativePixelMap](#nativepixelmap) \*native, void \*\*addr) | Obtains the memory address of a **NativePixelMap** object and locks the memory. | 
123e41f4b71Sopenharmony_ci| int32_t [OH_PixelMap_UnAccessPixels](#oh_pixelmap_unaccesspixels) (const [NativePixelMap](#nativepixelmap) \*native) | Unlocks the memory of a **NativePixelMap** object. This function is used with [OH_PixelMap_AccessPixels](#oh_pixelmap_accesspixels) in pairs. | 
124e41f4b71Sopenharmony_ci| int32_t [OH_GetImageInfo](#oh_getimageinfo) (napi_env env, napi_value value, [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) \*info) | Obtains the information about a **PixelMap** object and stores the information to the [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) struct. | 
125e41f4b71Sopenharmony_ci| int32_t [OH_AccessPixels](#oh_accesspixels) (napi_env env, napi_value value, void \*\*addrPtr) | Obtains the memory address of a **PixelMap** object and locks the memory. | 
126e41f4b71Sopenharmony_ci| int32_t [OH_UnAccessPixels](#oh_unaccesspixels) (napi_env env, napi_value value) | Unlocks the memory of a **PixelMap** object. This function is used with **OH_AccessPixels** in pairs. | 
127e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_CreateImageReceiver](#oh_image_receiver_createimagereceiver) (napi_env env, struct [OhosImageReceiverInfo](_ohos_image_receiver_info.md) info, napi_value \*res) | Creates an **ImageReceiver** object at the application layer. | 
128e41f4b71Sopenharmony_ci| [ImageReceiverNative](#imagereceivernative) \* [OH_Image_Receiver_InitImageReceiverNative](#oh_image_receiver_initimagereceivernative) (napi_env env, napi_value source) | Initializes an [ImageReceiverNative](#imagereceivernative) object through an **ImageReceiver** object. | 
129e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_GetReceivingSurfaceId](#oh_image_receiver_getreceivingsurfaceid) (const [ImageReceiverNative](#imagereceivernative) \*native, char \*id, size_t len) | Obtains the receiver ID through an [ImageReceiverNative](#imagereceivernative) object. | 
130e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_ReadLatestImage](#oh_image_receiver_readlatestimage) (const [ImageReceiverNative](#imagereceivernative) \*native, napi_value \*image) | Obtains the latest image through an [ImageReceiverNative](#imagereceivernative) object. | 
131e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_ReadNextImage](#oh_image_receiver_readnextimage) (const [ImageReceiverNative](#imagereceivernative) \*native, napi_value \*image) | Obtains the next image through an [ImageReceiverNative](#imagereceivernative) object. | 
132e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_On](#oh_image_receiver_on) (const [ImageReceiverNative](#imagereceivernative) \*native, [OH_Image_Receiver_On_Callback](#oh_image_receiver_on_callback) callback) | Registers an [OH_Image_Receiver_On_Callback](#oh_image_receiver_on_callback) callback. This callback is triggered whenever a new image is received. | 
133e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_GetSize](#oh_image_receiver_getsize) (const [ImageReceiverNative](#imagereceivernative) \*native, struct [OhosImageSize](_ohos_image_size.md) \*size) | Obtains the size of the image receiver through an [ImageReceiverNative](#imagereceivernative) object. | 
134e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_GetCapacity](#oh_image_receiver_getcapacity) (const [ImageReceiverNative](#imagereceivernative) \*native, int32_t \*capacity) | Obtains the capacity of the image receiver through an [ImageReceiverNative](#imagereceivernative) object. | 
135e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_GetFormat](#oh_image_receiver_getformat) (const [ImageReceiverNative](#imagereceivernative) \*native, int32_t \*format) | Obtains the format of the image receiver through an [ImageReceiverNative](#imagereceivernative) object. | 
136e41f4b71Sopenharmony_ci| int32_t [OH_Image_Receiver_Release](#oh_image_receiver_release) ([ImageReceiverNative](#imagereceivernative) \*native) | Releases an [ImageReceiverNative](#imagereceivernative) object.| 
137e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_Create](#oh_imagesource_create) (napi_env env, struct [OhosImageSource](_ohos_image_source.md) \*src, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object at the JavaScript native layer based on the specified [OhosImageSource](_ohos_image_source.md) and [OhosImageSourceOps](_ohos_image_source_ops.md) structs. | 
138e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreateFromUri](#oh_imagesource_createfromuri) (napi_env env, char \*uri, size_t size, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object at the JavaScript native layer based on the specified URI and [OhosImageSourceOps](_ohos_image_source_ops.md) struct. | 
139e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreateFromFd](#oh_imagesource_createfromfd) (napi_env env, int32_t fd, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object at the JavaScript native layer based on the specified file descriptor and [OhosImageSourceOps](_ohos_image_source_ops.md) struct. | 
140e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreateFromData](#oh_imagesource_createfromdata) (napi_env env, uint8_t \*data, size_t dataSize, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object at the JavaScript native layer based on the specified image source buffer (defined by **data**) and [OhosImageSourceOps](_ohos_image_source_ops.md) struct. | 
141e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreateFromRawFile](#oh_imagesource_createfromrawfile) (napi_env env, RawFileDescriptor rawFile, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object at the JavaScript native layer based on the specified raw file descriptor and [OhosImageSourceOps](_ohos_image_source_ops.md) struct. | 
142e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreateIncremental](#oh_imagesource_createincremental) (napi_env env, struct [OhosImageSource](_ohos_image_source.md) \*source, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object of the incremental type at the JavaScript native layer based on the specified [OhosImageSource](_ohos_image_source.md) and [OhosImageSourceOps](_ohos_image_source_ops.md) structs. | 
143e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreateIncrementalFromData](#oh_imagesource_createincrementalfromdata) (napi_env env, uint8_t \*data, size_t dataSize, struct [OhosImageSourceOps](_ohos_image_source_ops.md) \*ops, napi_value \*res) | Creates an **ImageSource** object of the incremental type at the JavaScript native layer based on the specified image source buffer (defined by **data**) and [OhosImageSourceOps](_ohos_image_source_ops.md) struct. The image data is updated through **OH_ImageSource_UpdateData**.  | 
144e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_GetSupportedFormats](#oh_imagesource_getsupportedformats) (struct [OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md) \*res) | Obtains all supported decoding formats. | 
145e41f4b71Sopenharmony_ci| [ImageSourceNative](#imagesourcenative) \* [OH_ImageSource_InitNative](#oh_imagesource_initnative) (napi_env env, napi_value source) | Converts an **ImageSource** object at the JavaScript native layer into an [ImageSourceNative](#imagesourcenative) object. | 
146e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreatePixelMap](#oh_imagesource_createpixelmap) (const [ImageSourceNative](#imagesourcenative) \*native, struct [OhosImageDecodingOps](_ohos_image_decoding_ops.md) \*ops, napi_value \*res) | Decodes an **ImageSourceNative** object to obtain a **PixelMap** object at the JavaScript native layer based on the specified [OhosImageDecodingOps](_ohos_image_decoding_ops.md) struct. | 
147e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_CreatePixelMapList](#oh_imagesource_createpixelmaplist) (const [ImageSourceNative](#imagesourcenative) \*native, struct [OhosImageDecodingOps](_ohos_image_decoding_ops.md) \*ops, napi_value \*res) | Decodes an **ImageSourceNative** object to obtain all **PixelMap** objects at the JavaScript native layer based on the specified [OhosImageDecodingOps](_ohos_image_decoding_ops.md) struct. | 
148e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_GetDelayTime](#oh_imagesource_getdelaytime) (const [ImageSourceNative](#imagesourcenative) \*native, struct [OhosImageSourceDelayTimeList](_ohos_image_source_delay_time_list.md) \*res) | Obtains the delay time list from an **ImageSourceNative** object (such as GIF image source). | 
149e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_GetFrameCount](#oh_imagesource_getframecount) (const [ImageSourceNative](#imagesourcenative) \*native, uint32_t \*res) | Obtains the number of frames from an **ImageSourceNative** object. | 
150e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_GetImageInfo](#oh_imagesource_getimageinfo) (const [ImageSourceNative](#imagesourcenative) \*native, int32_t index, struct [OhosImageSourceInfo](_ohos_image_source_info.md) \*info) | Obtains image source information from an **ImageSourceNative** object by index. | 
151e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) (const [ImageSourceNative](#imagesourcenative) \*native, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*key, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*value) | Obtains the value of an image property from an **ImageSourceNative** object. | 
152e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty) (const [ImageSourceNative](#imagesourcenative) \*native, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*key, struct [OhosImageSourceProperty](_ohos_image_source_property.md) \*value) | Modifies the value of an image property of an **ImageSourceNative** object. | 
153e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_UpdateData](#oh_imagesource_updatedata) (const [ImageSourceNative](#imagesourcenative) \*native, struct [OhosImageSourceUpdateData](_ohos_image_source_update_data.md) \*data) | Updates the data of an **ImageSourceNative** object. | 
154e41f4b71Sopenharmony_ci| int32_t [OH_ImageSource_Release](#oh_imagesource_release) ([ImageSourceNative](#imagesourcenative) \*native) | Releases an **ImageSourceNative** object. | 
155e41f4b71Sopenharmony_ci
156e41f4b71Sopenharmony_ci
157e41f4b71Sopenharmony_ci### Variables
158e41f4b71Sopenharmony_ci
159e41f4b71Sopenharmony_ci| Name| Description| 
160e41f4b71Sopenharmony_ci| -------- | -------- |
161e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE](#ohos_image_property_bits_per_sample) = "BitsPerSample" | Defines a pointer to bits per sample, one of the image properties. | 
162e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_ORIENTATION](#ohos_image_property_orientation) = "Orientation" | Defines a pointer to the orientation, one of the image properties. | 
163e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_IMAGE_LENGTH](#ohos_image_property_image_length) = "ImageLength" | Defines a pointer to the image length, one of the image properties. | 
164e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_IMAGE_WIDTH](#ohos_image_property_image_width) = "ImageWidth" | Defines a pointer to the image width, one of the image properties. | 
165e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_GPS_LATITUDE](#ohos_image_property_gps_latitude) = "GPSLatitude" | Defines a pointer to the GPS latitude, one of the image properties. | 
166e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_GPS_LONGITUDE](#ohos_image_property_gps_longitude) = "GPSLongitude" | Defines a pointer to the GPS longitude, one of the image properties. | 
167e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF](#ohos_image_property_gps_latitude_ref) = "GPSLatitudeRef" | Defines a pointer to the GPS latitude reference information, one of the image properties. | 
168e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF](#ohos_image_property_gps_longitude_ref) = "GPSLongitudeRef" | Defines a pointer to the GPS longitude reference information, one of the image properties. | 
169e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL](#ohos_image_property_date_time_original) = "DateTimeOriginal" | Defines a pointer to the created date and time, one of the image properties. | 
170e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_EXPOSURE_TIME](#ohos_image_property_exposure_time) = "ExposureTime" | Defines a pointer to the exposure time, one of the image properties. | 
171e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_SCENE_TYPE](#ohos_image_property_scene_type) = "SceneType" | Defines a pointer to the scene type, one of the image properties. | 
172e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS](#ohos_image_property_iso_speed_ratings) = "ISOSpeedRatings" | Defines a pointer to the ISO speed ratings, one of the image properties. | 
173e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_F_NUMBER](#ohos_image_property_f_number) = "FNumber" | Defines a pointer to the f-number of the image, one of the image properties. | 
174e41f4b71Sopenharmony_ci| const char \* [OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL](#ohos_image_property_compressed_bits_per_pixel) = "CompressedBitsPerPixel" | Defines a pointer to the compressed bits per pixel, one of the image properties. | 
175e41f4b71Sopenharmony_ci| int32_t [OhosImageRegion::x](#x) | Defines the X coordinate of the start point, in pixels. | 
176e41f4b71Sopenharmony_ci| int32_t [OhosImageRegion::y](#y) | Defines the Y coordinate of the start point, in pixels. | 
177e41f4b71Sopenharmony_ci| int32_t [OhosImageRegion::width](#width) | Defines the width of the region, in pixels. | 
178e41f4b71Sopenharmony_ci| int32_t [OhosImageRegion::height](#height) | Defines the height of the region, in pixels. | 
179e41f4b71Sopenharmony_ci| int32_t [OhosImageSourceOps::density](#density-12) | Defines the pixel density of the image source. | 
180e41f4b71Sopenharmony_ci| int32_t [OhosImageSourceOps::pixelFormat](#pixelformat-13) | Defines the pixel format of the image source. It is usually used to describe the YUV buffer. | 
181e41f4b71Sopenharmony_ci| struct [OhosImageSize](_ohos_image_size.md) [OhosImageSourceOps::size](#size-17) | Defines the pixel width and height of the image source. | 
182e41f4b71Sopenharmony_ci| int8_t [OhosImageDecodingOps::editable](#editable) | Defines whether the output pixel map is editable. | 
183e41f4b71Sopenharmony_ci| int32_t [OhosImageDecodingOps::pixelFormat](#pixelformat-23) | Defines the pixel format of the output pixel map. | 
184e41f4b71Sopenharmony_ci| int32_t [OhosImageDecodingOps::fitDensity](#fitdensity) | Defines the pixel density of the output pixel map. | 
185e41f4b71Sopenharmony_ci| uint32_t [OhosImageDecodingOps::index](#index) | Defines the index of the output pixel map. | 
186e41f4b71Sopenharmony_ci| uint32_t [OhosImageDecodingOps::sampleSize](#samplesize) | Defines the size of the sample. | 
187e41f4b71Sopenharmony_ci| uint32_t [OhosImageDecodingOps::rotate](#rotate) | Defines the decoding rotation options. | 
188e41f4b71Sopenharmony_ci| struct [OhosImageSize](_ohos_image_size.md) [OhosImageDecodingOps::size](#size-27) | Defines the pixel width and height of the output pixel map. | 
189e41f4b71Sopenharmony_ci| struct [OhosImageRegion](_ohos_image_region.md) [OhosImageDecodingOps::region](#region) | Defines the region of the output pixel map. | 
190e41f4b71Sopenharmony_ci| int32_t [OhosImageSourceInfo::pixelFormat](#pixelformat-33) | Defines the pixel format of the image source. It is set in [OH_ImageSource_Create](#oh_imagesource_create). | 
191e41f4b71Sopenharmony_ci| int32_t [OhosImageSourceInfo::colorSpace](#colorspace) | Defines the color space of the image source. | 
192e41f4b71Sopenharmony_ci| int32_t [OhosImageSourceInfo::alphaType](#alphatype) | Defines the alpha type of the image source. | 
193e41f4b71Sopenharmony_ci| int32_t [OhosImageSourceInfo::density](#density-22) | Defines the image density of the image source. It is set in [OH_ImageSource_Create](#oh_imagesource_create). | 
194e41f4b71Sopenharmony_ci| struct [OhosImageSize](_ohos_image_size.md) [OhosImageSourceInfo::size](#size-37) | Defines the pixel width and height of the image source. | 
195e41f4b71Sopenharmony_ci| char \* [OhosImageSource::uri](#uri) = nullptr | Defines a pointer to the image source URI. Only a file URI or Base64 URI is accepted. | 
196e41f4b71Sopenharmony_ci| size_t [OhosImageSource::uriSize](#urisize) = 0 | Defines the length of the image source URI. | 
197e41f4b71Sopenharmony_ci| int32_t [OhosImageSource::fd](#fd) = -1 | Defines the descriptor of the image source. | 
198e41f4b71Sopenharmony_ci| uint8_t \* [OhosImageSource::buffer](#buffer-12) = nullptr | Defines a pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted. | 
199e41f4b71Sopenharmony_ci| size_t [OhosImageSource::bufferSize](#buffersize-12) = 0 | Defines the size of the image source buffer. | 
200e41f4b71Sopenharmony_ci| int32_t \* [OhosImageSourceDelayTimeList::delayTimeList](#delaytimelist) | Defines a pointer to the head of the image source delay time list. | 
201e41f4b71Sopenharmony_ci| size_t [OhosImageSourceDelayTimeList::size](#size-47) = 0 | Defines the size of the image source delay time list. | 
202e41f4b71Sopenharmony_ci| char \* [OhosImageSourceSupportedFormat::format](#format) = nullptr | Defines a pointer to the head of the format string. | 
203e41f4b71Sopenharmony_ci| size_t [OhosImageSourceSupportedFormat::size](#size-57) = 0 | Defines the size of the format string. | 
204e41f4b71Sopenharmony_ci| struct [OhosImageSourceSupportedFormat](_ohos_image_source_supported_format.md) \*\* [OhosImageSourceSupportedFormatList::supportedFormatList](#supportedformatlist) = nullptr | Defines a double pointer to the head of the format string list. | 
205e41f4b71Sopenharmony_ci| size_t [OhosImageSourceSupportedFormatList::size](#size-67) = 0 | Defines the size of the format string list. | 
206e41f4b71Sopenharmony_ci| char \* [OhosImageSourceProperty::value](#value) = nullptr | Defines a pointer to the head of the property string. | 
207e41f4b71Sopenharmony_ci| size_t [OhosImageSourceProperty::size](#size-77) = 0 | Defines the size of the property string. | 
208e41f4b71Sopenharmony_ci| uint8_t \* [OhosImageSourceUpdateData::buffer](#buffer-22) = nullptr | Defines a pointer to the buffer for storing the update data. | 
209e41f4b71Sopenharmony_ci| size_t [OhosImageSourceUpdateData::bufferSize](#buffersize-22) = 0 | Defines the size of the buffer. | 
210e41f4b71Sopenharmony_ci| uint32_t [OhosImageSourceUpdateData::offset](#offset) = 0 | Defines the offset of the update data in the buffer. | 
211e41f4b71Sopenharmony_ci| uint32_t [OhosImageSourceUpdateData::updateLength](#updatelength) = 0 | Defines the length of the update data in the buffer. | 
212e41f4b71Sopenharmony_ci| int8_t [OhosImageSourceUpdateData::isCompleted](#iscompleted) = 0 | Defines whether the image source data update is completed. | 
213e41f4b71Sopenharmony_ci
214e41f4b71Sopenharmony_ci
215e41f4b71Sopenharmony_ci## Type Description
216e41f4b71Sopenharmony_ci
217e41f4b71Sopenharmony_ci
218e41f4b71Sopenharmony_ci### ImageNative
219e41f4b71Sopenharmony_ci
220e41f4b71Sopenharmony_ci```
221e41f4b71Sopenharmony_citypedef struct ImageNative_ ImageNative
222e41f4b71Sopenharmony_ci```
223e41f4b71Sopenharmony_ci
224e41f4b71Sopenharmony_ci**Description**
225e41f4b71Sopenharmony_ci
226e41f4b71Sopenharmony_ciDefines an image object at the native layer.
227e41f4b71Sopenharmony_ci
228e41f4b71Sopenharmony_ci**Since**: 10
229e41f4b71Sopenharmony_ci
230e41f4b71Sopenharmony_ci
231e41f4b71Sopenharmony_ci### ImagePacker_Native
232e41f4b71Sopenharmony_ci
233e41f4b71Sopenharmony_ci```
234e41f4b71Sopenharmony_citypedef struct ImagePacker_Native_ ImagePacker_Native
235e41f4b71Sopenharmony_ci```
236e41f4b71Sopenharmony_ci
237e41f4b71Sopenharmony_ci**Description**
238e41f4b71Sopenharmony_ci
239e41f4b71Sopenharmony_ciDefines an image packer object at the native layer.
240e41f4b71Sopenharmony_ci
241e41f4b71Sopenharmony_ci**Since**: 11
242e41f4b71Sopenharmony_ci
243e41f4b71Sopenharmony_ci
244e41f4b71Sopenharmony_ci### ImagePacker_Opts
245e41f4b71Sopenharmony_ci
246e41f4b71Sopenharmony_ci```
247e41f4b71Sopenharmony_citypedef struct ImagePacker_Opts_ ImagePacker_Opts
248e41f4b71Sopenharmony_ci```
249e41f4b71Sopenharmony_ci
250e41f4b71Sopenharmony_ci**Description**
251e41f4b71Sopenharmony_ci
252e41f4b71Sopenharmony_ciDefines the alias of the image packing options.
253e41f4b71Sopenharmony_ci
254e41f4b71Sopenharmony_ci**Since**: 11
255e41f4b71Sopenharmony_ci
256e41f4b71Sopenharmony_ci
257e41f4b71Sopenharmony_ci### ImageReceiverNative
258e41f4b71Sopenharmony_ci
259e41f4b71Sopenharmony_ci```
260e41f4b71Sopenharmony_citypedef struct ImageReceiverNative_ ImageReceiverNative
261e41f4b71Sopenharmony_ci```
262e41f4b71Sopenharmony_ci
263e41f4b71Sopenharmony_ci**Description**
264e41f4b71Sopenharmony_ci
265e41f4b71Sopenharmony_ciDefines the data type name of the image receiver at the native layer.
266e41f4b71Sopenharmony_ci
267e41f4b71Sopenharmony_ci**Since**: 10
268e41f4b71Sopenharmony_ci
269e41f4b71Sopenharmony_ci
270e41f4b71Sopenharmony_ci### ImageSourceNative
271e41f4b71Sopenharmony_ci
272e41f4b71Sopenharmony_ci```
273e41f4b71Sopenharmony_citypedef struct ImageSourceNative_ ImageSourceNative
274e41f4b71Sopenharmony_ci```
275e41f4b71Sopenharmony_ci
276e41f4b71Sopenharmony_ci**Description**
277e41f4b71Sopenharmony_ci
278e41f4b71Sopenharmony_ciDefines an image source object at the native layer.
279e41f4b71Sopenharmony_ci
280e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.Image
281e41f4b71Sopenharmony_ci
282e41f4b71Sopenharmony_ci**Since**: 10
283e41f4b71Sopenharmony_ci
284e41f4b71Sopenharmony_ci
285e41f4b71Sopenharmony_ci### NativePixelMap
286e41f4b71Sopenharmony_ci
287e41f4b71Sopenharmony_ci```
288e41f4b71Sopenharmony_citypedef struct NativePixelMap_ NativePixelMap
289e41f4b71Sopenharmony_ci```
290e41f4b71Sopenharmony_ci
291e41f4b71Sopenharmony_ci**Description**
292e41f4b71Sopenharmony_ci
293e41f4b71Sopenharmony_ciDefines the data type name of the pixel map at the native layer.
294e41f4b71Sopenharmony_ci
295e41f4b71Sopenharmony_ci**Since**: 10
296e41f4b71Sopenharmony_ci
297e41f4b71Sopenharmony_ci
298e41f4b71Sopenharmony_ci### OH_Image_Receiver_On_Callback
299e41f4b71Sopenharmony_ci
300e41f4b71Sopenharmony_ci```
301e41f4b71Sopenharmony_citypedef void(* OH_Image_Receiver_On_Callback) ()
302e41f4b71Sopenharmony_ci```
303e41f4b71Sopenharmony_ci
304e41f4b71Sopenharmony_ci**Description**
305e41f4b71Sopenharmony_ci
306e41f4b71Sopenharmony_ciDefines the callbacks for the image interface at the native layer.
307e41f4b71Sopenharmony_ci
308e41f4b71Sopenharmony_ci**Since**: 10
309e41f4b71Sopenharmony_ci
310e41f4b71Sopenharmony_ci
311e41f4b71Sopenharmony_ci### OhosPixelMapInfos
312e41f4b71Sopenharmony_ci
313e41f4b71Sopenharmony_ci```
314e41f4b71Sopenharmony_citypedef struct OhosPixelMapInfos
315e41f4b71Sopenharmony_ci```
316e41f4b71Sopenharmony_ci
317e41f4b71Sopenharmony_ci**Description**
318e41f4b71Sopenharmony_ci
319e41f4b71Sopenharmony_ciDefines the information about a pixel map.
320e41f4b71Sopenharmony_ci
321e41f4b71Sopenharmony_ci**Since**: 10
322e41f4b71Sopenharmony_ci
323e41f4b71Sopenharmony_ci
324e41f4b71Sopenharmony_ci## Enum Description
325e41f4b71Sopenharmony_ci
326e41f4b71Sopenharmony_ci
327e41f4b71Sopenharmony_ci### anonymous enum [1/3]
328e41f4b71Sopenharmony_ci
329e41f4b71Sopenharmony_ci```
330e41f4b71Sopenharmony_cianonymous enum
331e41f4b71Sopenharmony_ci```
332e41f4b71Sopenharmony_ci
333e41f4b71Sopenharmony_ci**Description**
334e41f4b71Sopenharmony_ci
335e41f4b71Sopenharmony_ciEnumerates the image formats.
336e41f4b71Sopenharmony_ci
337e41f4b71Sopenharmony_ci**Since**: 10
338e41f4b71Sopenharmony_ci
339e41f4b71Sopenharmony_ci| Value| Description| 
340e41f4b71Sopenharmony_ci| -------- | -------- |
341e41f4b71Sopenharmony_ci| OHOS_IMAGE_FORMAT_YCBCR_422_SP | YCbCr422 semi-planar format.| 
342e41f4b71Sopenharmony_ci| OHOS_IMAGE_FORMAT_JPEG | JPEG encoding format.| 
343e41f4b71Sopenharmony_ci
344e41f4b71Sopenharmony_ci
345e41f4b71Sopenharmony_ci### anonymous enum [2/3]
346e41f4b71Sopenharmony_ci
347e41f4b71Sopenharmony_ci```
348e41f4b71Sopenharmony_cianonymous enum
349e41f4b71Sopenharmony_ci```
350e41f4b71Sopenharmony_ci
351e41f4b71Sopenharmony_ci**Description**
352e41f4b71Sopenharmony_ci
353e41f4b71Sopenharmony_ciEnumerates the pixel map alpha types.
354e41f4b71Sopenharmony_ci
355e41f4b71Sopenharmony_ci**Since**: 10
356e41f4b71Sopenharmony_ci
357e41f4b71Sopenharmony_ci| Value| Description| 
358e41f4b71Sopenharmony_ci| -------- | -------- |
359e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_ALPHA_TYPE_UNKNOWN  | Unknown format.  | 
360e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_ALPHA_TYPE_OPAQUE  | Opaque format.  | 
361e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_ALPHA_TYPE_PREMUL  | Premultiplied format.  | 
362e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_ALPHA_TYPE_UNPREMUL  | Unpremultiplied format.  | 
363e41f4b71Sopenharmony_ci
364e41f4b71Sopenharmony_ci
365e41f4b71Sopenharmony_ci### anonymous enum [3/3]
366e41f4b71Sopenharmony_ci
367e41f4b71Sopenharmony_ci```
368e41f4b71Sopenharmony_cianonymous enum
369e41f4b71Sopenharmony_ci```
370e41f4b71Sopenharmony_ci
371e41f4b71Sopenharmony_ci**Description**
372e41f4b71Sopenharmony_ci
373e41f4b71Sopenharmony_ciEnumerates the error codes returned by the functions.
374e41f4b71Sopenharmony_ci
375e41f4b71Sopenharmony_ci**Deprecated from**: 10
376e41f4b71Sopenharmony_ci
377e41f4b71Sopenharmony_ci**Since**: 8
378e41f4b71Sopenharmony_ci
379e41f4b71Sopenharmony_ci| Value| Description| 
380e41f4b71Sopenharmony_ci| -------- | -------- |
381e41f4b71Sopenharmony_ci| OHOS_IMAGE_RESULT_SUCCESS | Operation success.| 
382e41f4b71Sopenharmony_ci| OHOS_IMAGE_RESULT_BAD_PARAMETER | Invalid parameter.| 
383e41f4b71Sopenharmony_ci
384e41f4b71Sopenharmony_ci
385e41f4b71Sopenharmony_ci### anonymous enum [1/3]
386e41f4b71Sopenharmony_ci
387e41f4b71Sopenharmony_ci```
388e41f4b71Sopenharmony_cianonymous enum
389e41f4b71Sopenharmony_ci```
390e41f4b71Sopenharmony_ci
391e41f4b71Sopenharmony_ci**Description**
392e41f4b71Sopenharmony_ci
393e41f4b71Sopenharmony_ciEnumerates the image components.
394e41f4b71Sopenharmony_ci
395e41f4b71Sopenharmony_ci**Since**: 10
396e41f4b71Sopenharmony_ci
397e41f4b71Sopenharmony_ci| Value| Description| 
398e41f4b71Sopenharmony_ci| -------- | -------- |
399e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_YUV_Y | Luminance component.| 
400e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_YUV_U | Chrominance component - blue projection.| 
401e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_YUV_V | Chrominance component - red projection.| 
402e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_JPEG | JPEG format.| 
403e41f4b71Sopenharmony_ci
404e41f4b71Sopenharmony_ci
405e41f4b71Sopenharmony_ci### anonymous enum [2/3]
406e41f4b71Sopenharmony_ci
407e41f4b71Sopenharmony_ci```
408e41f4b71Sopenharmony_cianonymous enum
409e41f4b71Sopenharmony_ci```
410e41f4b71Sopenharmony_ci
411e41f4b71Sopenharmony_ci**Description**
412e41f4b71Sopenharmony_ci
413e41f4b71Sopenharmony_ciEnumerates the pixel map editing types.
414e41f4b71Sopenharmony_ci
415e41f4b71Sopenharmony_ci**Since**: 10
416e41f4b71Sopenharmony_ci
417e41f4b71Sopenharmony_ci| Value| Description| 
418e41f4b71Sopenharmony_ci| -------- | -------- |
419e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_READ_ONLY  | Read-only.  | 
420e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_EDITABLE  | Editable.  | 
421e41f4b71Sopenharmony_ci
422e41f4b71Sopenharmony_ci
423e41f4b71Sopenharmony_ci### anonymous enum [3/3]
424e41f4b71Sopenharmony_ci
425e41f4b71Sopenharmony_ci```
426e41f4b71Sopenharmony_cianonymous enum
427e41f4b71Sopenharmony_ci```
428e41f4b71Sopenharmony_ci
429e41f4b71Sopenharmony_ci**Description**
430e41f4b71Sopenharmony_ci
431e41f4b71Sopenharmony_ciEnumerates the pixel map formats.
432e41f4b71Sopenharmony_ci
433e41f4b71Sopenharmony_ci**Deprecated from**: 10
434e41f4b71Sopenharmony_ci
435e41f4b71Sopenharmony_ci**Since**: 8
436e41f4b71Sopenharmony_ci
437e41f4b71Sopenharmony_ci| Value| Description| 
438e41f4b71Sopenharmony_ci| -------- | -------- |
439e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_YUV_Y  | Luminance component.  | 
440e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_YUV_U  | Chrominance component - blue projection.  | 
441e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_YUV_V  | Chrominance component - red projection.  | 
442e41f4b71Sopenharmony_ci| OHOS_IMAGE_COMPONENT_FORMAT_JPEG  | JPEG format.  | 
443e41f4b71Sopenharmony_ci
444e41f4b71Sopenharmony_ci
445e41f4b71Sopenharmony_ci### anonymous enum
446e41f4b71Sopenharmony_ci
447e41f4b71Sopenharmony_ci```
448e41f4b71Sopenharmony_cianonymous enum
449e41f4b71Sopenharmony_ci```
450e41f4b71Sopenharmony_ci
451e41f4b71Sopenharmony_ci**Description**
452e41f4b71Sopenharmony_ci
453e41f4b71Sopenharmony_ciEnumerates the pixel map scale modes.
454e41f4b71Sopenharmony_ci
455e41f4b71Sopenharmony_ci**Since**: 10
456e41f4b71Sopenharmony_ci
457e41f4b71Sopenharmony_ci| Value| Description| 
458e41f4b71Sopenharmony_ci| -------- | -------- |
459e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_SCALE_MODE_FIT_TARGET_SIZE  | Adapting to the target image size.  | 
460e41f4b71Sopenharmony_ci| OHOS_PIXEL_MAP_SCALE_MODE_CENTER_CROP  | Cropping the center portion of an image to the target size.  | 
461e41f4b71Sopenharmony_ci
462e41f4b71Sopenharmony_ci
463e41f4b71Sopenharmony_ci### IRNdkErrCode
464e41f4b71Sopenharmony_ci
465e41f4b71Sopenharmony_ci```
466e41f4b71Sopenharmony_cienum IRNdkErrCode
467e41f4b71Sopenharmony_ci```
468e41f4b71Sopenharmony_ci
469e41f4b71Sopenharmony_ci**Description**
470e41f4b71Sopenharmony_ci
471e41f4b71Sopenharmony_ciEnumerates the return values that may be used by the interface.
472e41f4b71Sopenharmony_ci
473e41f4b71Sopenharmony_ci**Since**: 10
474e41f4b71Sopenharmony_ci
475e41f4b71Sopenharmony_ci
476e41f4b71Sopenharmony_ci| Value| Description| 
477e41f4b71Sopenharmony_ci| -------- | -------- |
478e41f4b71Sopenharmony_ci| IMAGE_RESULT_SUCCESS | Operation success.| 
479e41f4b71Sopenharmony_ci| IMAGE_RESULT_BAD_PARAMETER | Invalid parameter.| 
480e41f4b71Sopenharmony_ci| IMAGE_RESULT_IMAGE_RESULT_BASE | Operation failed.| 
481e41f4b71Sopenharmony_ci| IMAGE_RESULT_ERR_IPC | IPC error.| 
482e41f4b71Sopenharmony_ci| IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST | Failed to share the memory.| 
483e41f4b71Sopenharmony_ci| IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL | Abnormal data in the shared memory.| 
484e41f4b71Sopenharmony_ci| IMAGE_RESULT_DECODE_ABNORMAL | Failed to decode the image.| 
485e41f4b71Sopenharmony_ci| IMAGE_RESULT_DATA_ABNORMAL | Abnormal input data.| 
486e41f4b71Sopenharmony_ci| IMAGE_RESULT_MALLOC_ABNORMAL | An error occurs during memory allocation.| 
487e41f4b71Sopenharmony_ci| IMAGE_RESULT_DATA_UNSUPPORT | The image type is not supported.| 
488e41f4b71Sopenharmony_ci| IMAGE_RESULT_INIT_ABNORMAL | Failed to initialize the image.| 
489e41f4b71Sopenharmony_ci| IMAGE_RESULT_GET_DATA_ABNORMAL | An error occurs during image data retrieval.| 
490e41f4b71Sopenharmony_ci| IMAGE_RESULT_TOO_LARGE | The image is too large.| 
491e41f4b71Sopenharmony_ci| IMAGE_RESULT_TRANSFORM | An error occurs during image transformation.| 
492e41f4b71Sopenharmony_ci| IMAGE_RESULT_COLOR_CONVERT | An error occurs during image color conversion.| 
493e41f4b71Sopenharmony_ci| IMAGE_RESULT_CROP | An error occurs during image cropping.| 
494e41f4b71Sopenharmony_ci| IMAGE_RESULT_SOURCE_DATA | The image source data is incorrect.| 
495e41f4b71Sopenharmony_ci| IMAGE_RESULT_SOURCE_DATA_INCOMPLETE | The image source data is incomplete.| 
496e41f4b71Sopenharmony_ci| IMAGE_RESULT_MISMATCHED_FORMAT | The image format does not match.| 
497e41f4b71Sopenharmony_ci| IMAGE_RESULT_UNKNOWN_FORMAT | Unknown image format.| 
498e41f4b71Sopenharmony_ci| IMAGE_RESULT_SOURCE_UNRESOLVED | The image source is not parsed.| 
499e41f4b71Sopenharmony_ci| IMAGE_RESULT_INVALID_PARAMETER | Invalid image parameter.| 
500e41f4b71Sopenharmony_ci| IMAGE_RESULT_DECODE_FAILED | Failed to decode the image.| 
501e41f4b71Sopenharmony_ci| IMAGE_RESULT_PLUGIN_REGISTER_FAILED | Failed to register the plug-in.| 
502e41f4b71Sopenharmony_ci| IMAGE_RESULT_PLUGIN_CREATE_FAILED | Failed to create the plug-in.| 
503e41f4b71Sopenharmony_ci| IMAGE_RESULT_ENCODE_FAILED | Failed to encode the image.| 
504e41f4b71Sopenharmony_ci| IMAGE_RESULT_ADD_PIXEL_MAP_FAILED | Failed to add the pixel map.| 
505e41f4b71Sopenharmony_ci| IMAGE_RESULT_HW_DECODE_UNSUPPORT | Hardware decoding is not supported.| 
506e41f4b71Sopenharmony_ci| IMAGE_RESULT_DECODE_HEAD_ABNORMAL | Failed to decode the image header.| 
507e41f4b71Sopenharmony_ci| IMAGE_RESULT_DECODE_EXIF_UNSUPPORT | Exchangeable Image File (EXIF) is not supported for image decoding.| 
508e41f4b71Sopenharmony_ci| IMAGE_RESULT_PROPERTY_NOT_EXIST | The image property does not exist.| 
509e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_DATA_UNSUPPORT | The media type is not supported.| 
510e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_TOO_LARGE | The media is too large.| 
511e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_MALLOC_FAILED | Memory allocation failed.| 
512e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_END_OF_STREAM | Failed to end the media data stream.| 
513e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_IO_ABNORMAL | Abnormal input and output streams.| 
514e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_MALFORMED | The media service functions abnormally.| 
515e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_BUFFER_TOO_SMALL | The media data is too small.| 
516e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_OUT_OF_RANGE | The media is out of range.| 
517e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_STATUS_ABNORMAL | Abnormal media status.| 
518e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_VALUE_INVALID | Invalid media value.| 
519e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_NULL_POINTER | Media operation failed.| 
520e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_INVALID_OPERATION | Invalid media operation.| 
521e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_ERR_PLAYER_NOT_INIT | An error occurs during media initialization.| 
522e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_EARLY_PREPARE | Media preprocessing is carried out too early.| 
523e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_SEEK_ERR | The seek operation failed.| 
524e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_PERMISSION_DENIED | Permission denied.| 
525e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_DEAD_OBJECT | The media object is deregistered.| 
526e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_TIMED_OUT | A timeout occurs.| 
527e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_TRACK_NOT_ALL_SUPPORTED | The media capability is not supported.| 
528e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_ADAPTER_INIT_FAILED | Failed to initialize the media adapter.| 
529e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_WRITE_PARCEL_FAIL | Failed to write data to the parcel.| 
530e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_READ_PARCEL_FAIL | Failed to read data from the parcel.| 
531e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_NO_AVAIL_BUFFER | Invalid data.| 
532e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_INVALID_PARAM | Invalid parameters.| 
533e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_EXIST | The media codec adapter does not exist.| 
534e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_CREATE_CODEC_ADAPTER_FAILED | Failed to create the media codec adapter.| 
535e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_INIT | The media codec adapter is not initialized.| 
536e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_ZCODEC_CREATE_FAILED | Failed to create the media codec.| 
537e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_ZCODEC_NOT_EXIST | The media codec does not exist.| 
538e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_JNI_CLASS_NOT_EXIST | The media JNI layer class does not exist.| 
539e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_JNI_METHOD_NOT_EXIST | The media JNI layer method does not exist.| 
540e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_JNI_NEW_OBJ_FAILED | Failed to create the object at the media JNI layer.| 
541e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_JNI_COMMON_ERROR | The media JNI layer is abnormal.| 
542e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_DISTRIBUTE_NOT_SUPPORT | The distributed feature is not supported.| 
543e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_SOURCE_NOT_SET | The media source is not set.| 
544e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_INIT | The media RTSP adapter is not initialized.| 
545e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_EXIST | The media RTSP adapter does not exist.| 
546e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT | The media does not support the RTSP surface.| 
547e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_RTSP_CAPTURE_NOT_INIT | Failed to initialize the media RTSP capturer.| 
548e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_RTSP_SOURCE_URL_INVALID | Invalid media RTSP source path.| 
549e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_RTSP_VIDEO_TRACK_NOT_FOUND | No video capability is found in the media RTSP.| 
550e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_RTSP_CAMERA_NUM_REACH_MAX | The maximum number of RTSP cameras has been reached.| 
551e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_SET_VOLUME | Failed to set the volume.| 
552e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_NUMBER_OVERFLOW | The number of operations overflows.| 
553e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_DIS_PLAYER_UNSUPPORTED | The distributed media player is not supported.| 
554e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_DENCODE_ICC_FAILED | Failed to decode the ICC.| 
555e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_ENCODE_ICC_FAILED | Failed to encode the ICC.| 
556e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_READ_PIXELMAP_FAILED | Failed to read the pixel map.| 
557e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_WRITE_PIXELMAP_FAILED | Failed to write the pixel map.| 
558e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_PIXELMAP_NOT_ALLOW_MODIFY | The pixel map cannot be modified.| 
559e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_CONFIG_FAILED | Configuration failed.| 
560e41f4b71Sopenharmony_ci| IMAGE_RESULT_JNI_ENV_ABNORMAL | The JNI environment is abnormal.| 
561e41f4b71Sopenharmony_ci| IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED | Failed to allocate memory for the surface.| 
562e41f4b71Sopenharmony_ci| IMAGE_RESULT_CREATE_SURFACE_FAILED | Failed to create the surface.| 
563e41f4b71Sopenharmony_ci| IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED | Failed to obtain parameters from the surface.| 
564e41f4b71Sopenharmony_ci| IMAGE_RESULT_GET_SURFACE_FAILED | Failed to obtain the surface.| 
565e41f4b71Sopenharmony_ci| IMAGE_RESULT_SURFACE_ACQUIRE_BUFFER_FAILED | Failed to apply for a buffer.| 
566e41f4b71Sopenharmony_ci| IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED | Failed to request a buffer.| 
567e41f4b71Sopenharmony_ci| IMAGE_RESULT_REGISTER_LISTENER_FAILED | Failed to register the listener.| 
568e41f4b71Sopenharmony_ci| IMAGE_RESULT_REGISTER_BUFFER_FAILED | Failed to register the buffer.| 
569e41f4b71Sopenharmony_ci| IMAGE_RESULT_FREAD_FAILED | Failed to read the file.| 
570e41f4b71Sopenharmony_ci| IMAGE_RESULT_PEEK_FAILED | Failed to peek the file.| 
571e41f4b71Sopenharmony_ci| IMAGE_RESULT_SEEK_FAILED | Failed to seek the file.| 
572e41f4b71Sopenharmony_ci| IMAGE_RESULT_STREAM_SIZE_ERROR | The data stream is damaged.| 
573e41f4b71Sopenharmony_ci| IMAGE_RESULT_FILE_FD_ERROR | The file descriptor is damaged.| 
574e41f4b71Sopenharmony_ci| IMAGE_RESULT_FILE_DAMAGED | The file is damaged.| 
575e41f4b71Sopenharmony_ci| IMAGE_RESULT_CREATE_DECODER_FAILED | Failed to create a decoder.| 
576e41f4b71Sopenharmony_ci| IMAGE_RESULT_CREATE_ENCODER_FAILED | Failed to create an encoder.| 
577e41f4b71Sopenharmony_ci| IMAGE_RESULT_CHECK_FORMAT_ERROR | Failed to check the format.| 
578e41f4b71Sopenharmony_ci| IMAGE_RESULT_THIRDPART_SKIA_ERROR | Skia decoding failed.| 
579e41f4b71Sopenharmony_ci| IMAGE_RESULT_HW_DECODE_FAILED | Hardware decoding failed.| 
580e41f4b71Sopenharmony_ci| IMAGE_RESULT_ALLOCATER_TYPE_ERROR | Failed to verify the memory type.| 
581e41f4b71Sopenharmony_ci| IMAGE_RESULT_ALPHA_TYPE_ERROR | Failed to verify the alpha type.| 
582e41f4b71Sopenharmony_ci| IMAGE_RESULT_INDEX_INVALID | Invalid parameter.| 
583e41f4b71Sopenharmony_ci| IMAGE_RESULT_MEDIA_UNKNOWN | Unknown error.| 
584e41f4b71Sopenharmony_ci
585e41f4b71Sopenharmony_ci
586e41f4b71Sopenharmony_ci### OH_PixelMap_AntiAliasingLevel
587e41f4b71Sopenharmony_ci
588e41f4b71Sopenharmony_ci```
589e41f4b71Sopenharmony_cienum OH_PixelMap_AntiAliasingLevel
590e41f4b71Sopenharmony_ci```
591e41f4b71Sopenharmony_ci
592e41f4b71Sopenharmony_ci**Description**
593e41f4b71Sopenharmony_ci
594e41f4b71Sopenharmony_ciEnumerates the antialiasing levels used for scaling pixel maps.
595e41f4b71Sopenharmony_ci
596e41f4b71Sopenharmony_ci**Since**: 12
597e41f4b71Sopenharmony_ci
598e41f4b71Sopenharmony_ci| Value| Description| 
599e41f4b71Sopenharmony_ci| -------- | -------- |
600e41f4b71Sopenharmony_ci| OH_PixelMap_AntiAliasing_NONE  | Nearest neighbor.  | 
601e41f4b71Sopenharmony_ci| OH_PixelMap_AntiAliasing_LOW  | Bilinear interpolation.  | 
602e41f4b71Sopenharmony_ci| OH_PixelMap_AntiAliasing_MEDIUM  | Bilinear interpolation with mipmap enabled.  | 
603e41f4b71Sopenharmony_ci| OH_PixelMap_AntiAliasing_HIGH  | Cubic convolution.  | 
604e41f4b71Sopenharmony_ci
605e41f4b71Sopenharmony_ci
606e41f4b71Sopenharmony_ci## Function Description
607e41f4b71Sopenharmony_ci
608e41f4b71Sopenharmony_ci
609e41f4b71Sopenharmony_ci### OH_AccessPixels()
610e41f4b71Sopenharmony_ci
611e41f4b71Sopenharmony_ci```
612e41f4b71Sopenharmony_ciint32_t OHOS::Media::OH_AccessPixels (napi_env env, napi_value value, void ** addrPtr )
613e41f4b71Sopenharmony_ci```
614e41f4b71Sopenharmony_ci
615e41f4b71Sopenharmony_ci**Description**
616e41f4b71Sopenharmony_ci
617e41f4b71Sopenharmony_ciObtains the memory address of a **PixelMap** object and locks the memory.
618e41f4b71Sopenharmony_ci
619e41f4b71Sopenharmony_ci**\*addrPtr** is the memory address obtained. After finishing the access, you must use **OH_UnAccessPixels** to unlock the memory. Then the memory cannot be accessed or operated.
620e41f4b71Sopenharmony_ci
621e41f4b71Sopenharmony_ci**Deprecated from**: 10
622e41f4b71Sopenharmony_ci
623e41f4b71Sopenharmony_ci**Since**: 8
624e41f4b71Sopenharmony_ci
625e41f4b71Sopenharmony_ci**Parameters**
626e41f4b71Sopenharmony_ci
627e41f4b71Sopenharmony_ci| Name| Description| 
628e41f4b71Sopenharmony_ci| -------- | -------- |
629e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
630e41f4b71Sopenharmony_ci| value | **PixelMap** object at the application layer. | 
631e41f4b71Sopenharmony_ci| addrPtr | Double pointer to the memory address. | 
632e41f4b71Sopenharmony_ci
633e41f4b71Sopenharmony_ci**See**
634e41f4b71Sopenharmony_ci
635e41f4b71Sopenharmony_ciUnAccessPixels
636e41f4b71Sopenharmony_ci
637e41f4b71Sopenharmony_ci**Returns**
638e41f4b71Sopenharmony_ci
639e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful; returns an error code otherwise.
640e41f4b71Sopenharmony_ci
641e41f4b71Sopenharmony_ci
642e41f4b71Sopenharmony_ci### OH_GetImageInfo()
643e41f4b71Sopenharmony_ci
644e41f4b71Sopenharmony_ci```
645e41f4b71Sopenharmony_ciint32_t OH_GetImageInfo (napi_env env, napi_value value, OhosPixelMapInfo * info )
646e41f4b71Sopenharmony_ci```
647e41f4b71Sopenharmony_ci
648e41f4b71Sopenharmony_ci**Description**
649e41f4b71Sopenharmony_ci
650e41f4b71Sopenharmony_ciObtains the information about a **PixelMap** object and stores the information to the [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) struct.
651e41f4b71Sopenharmony_ci
652e41f4b71Sopenharmony_ci**Deprecated from**: 10
653e41f4b71Sopenharmony_ci
654e41f4b71Sopenharmony_ci**Since**: 8
655e41f4b71Sopenharmony_ci
656e41f4b71Sopenharmony_ci**Parameters**
657e41f4b71Sopenharmony_ci
658e41f4b71Sopenharmony_ci| Name| Description| 
659e41f4b71Sopenharmony_ci| -------- | -------- |
660e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
661e41f4b71Sopenharmony_ci| value | **PixelMap** object at the application layer. | 
662e41f4b71Sopenharmony_ci| info | Pointer to the object that stores the information obtained. For details, see [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md). | 
663e41f4b71Sopenharmony_ci
664e41f4b71Sopenharmony_ci**Returns**
665e41f4b71Sopenharmony_ci
666e41f4b71Sopenharmony_ciReturns **0** if the information is obtained and stored successfully; returns an error code otherwise.
667e41f4b71Sopenharmony_ci
668e41f4b71Sopenharmony_ci**See**
669e41f4b71Sopenharmony_ci
670e41f4b71Sopenharmony_ci[OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md)
671e41f4b71Sopenharmony_ci
672e41f4b71Sopenharmony_ci
673e41f4b71Sopenharmony_ci### OH_Image_ClipRect()
674e41f4b71Sopenharmony_ci
675e41f4b71Sopenharmony_ci```
676e41f4b71Sopenharmony_ciint32_t OH_Image_ClipRect (const ImageNative * native, struct OhosImageRect * rect )
677e41f4b71Sopenharmony_ci```
678e41f4b71Sopenharmony_ci
679e41f4b71Sopenharmony_ci**Description**
680e41f4b71Sopenharmony_ci
681e41f4b71Sopenharmony_ciObtains [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) of an **ImageNative** object.
682e41f4b71Sopenharmony_ci
683e41f4b71Sopenharmony_ci**Since**: 10
684e41f4b71Sopenharmony_ci
685e41f4b71Sopenharmony_ci**Parameters**
686e41f4b71Sopenharmony_ci
687e41f4b71Sopenharmony_ci| Name| Description| 
688e41f4b71Sopenharmony_ci| -------- | -------- |
689e41f4b71Sopenharmony_ci| native | Pointer to an **ImageNative** object. | 
690e41f4b71Sopenharmony_ci| rect | Pointer to the [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md) object obtained. | 
691e41f4b71Sopenharmony_ci
692e41f4b71Sopenharmony_ci**Returns**
693e41f4b71Sopenharmony_ci
694e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
695e41f4b71Sopenharmony_ci
696e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
697e41f4b71Sopenharmony_ci
698e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
699e41f4b71Sopenharmony_ci
700e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
701e41f4b71Sopenharmony_ci
702e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
703e41f4b71Sopenharmony_ci
704e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
705e41f4b71Sopenharmony_ci
706e41f4b71Sopenharmony_ci**See**
707e41f4b71Sopenharmony_ci
708e41f4b71Sopenharmony_ci[ImageNative](image.md#imagenative), [OhosImageRect](_o_h_o_s_1_1_media_1_1_ohos_image_rect.md)
709e41f4b71Sopenharmony_ci
710e41f4b71Sopenharmony_ci
711e41f4b71Sopenharmony_ci### OH_Image_Format()
712e41f4b71Sopenharmony_ci
713e41f4b71Sopenharmony_ci```
714e41f4b71Sopenharmony_ciint32_t OH_Image_Format (const ImageNative * native, int32_t * format )
715e41f4b71Sopenharmony_ci```
716e41f4b71Sopenharmony_ci
717e41f4b71Sopenharmony_ci**Description**
718e41f4b71Sopenharmony_ci
719e41f4b71Sopenharmony_ciObtains the format of an **ImageNative** object.
720e41f4b71Sopenharmony_ci
721e41f4b71Sopenharmony_ci**Since**: 10
722e41f4b71Sopenharmony_ci
723e41f4b71Sopenharmony_ci**Parameters**
724e41f4b71Sopenharmony_ci
725e41f4b71Sopenharmony_ci| Name| Description| 
726e41f4b71Sopenharmony_ci| -------- | -------- |
727e41f4b71Sopenharmony_ci| native | Pointer to an **ImageNative** object. | 
728e41f4b71Sopenharmony_ci| format | Pointer to the image format obtained. | 
729e41f4b71Sopenharmony_ci
730e41f4b71Sopenharmony_ci**Returns**
731e41f4b71Sopenharmony_ci
732e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
733e41f4b71Sopenharmony_ci
734e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
735e41f4b71Sopenharmony_ci
736e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
737e41f4b71Sopenharmony_ci
738e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
739e41f4b71Sopenharmony_ci
740e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
741e41f4b71Sopenharmony_ci
742e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
743e41f4b71Sopenharmony_ci
744e41f4b71Sopenharmony_ci
745e41f4b71Sopenharmony_ci**See**
746e41f4b71Sopenharmony_ci
747e41f4b71Sopenharmony_ci[ImageNative](image.md#imagenative)
748e41f4b71Sopenharmony_ci
749e41f4b71Sopenharmony_ci
750e41f4b71Sopenharmony_ci### OH_Image_GetComponent()
751e41f4b71Sopenharmony_ci
752e41f4b71Sopenharmony_ci```
753e41f4b71Sopenharmony_ciint32_t OH_Image_GetComponent (const ImageNative * native, int32_t componentType, struct OhosImageComponent * componentNative )
754e41f4b71Sopenharmony_ci```
755e41f4b71Sopenharmony_ci
756e41f4b71Sopenharmony_ci**Description**
757e41f4b71Sopenharmony_ci
758e41f4b71Sopenharmony_ciObtains [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) of an **ImageNative** object.
759e41f4b71Sopenharmony_ci
760e41f4b71Sopenharmony_ci**Since**: 10
761e41f4b71Sopenharmony_ci
762e41f4b71Sopenharmony_ci**Parameters**
763e41f4b71Sopenharmony_ci
764e41f4b71Sopenharmony_ci| Name| Description| 
765e41f4b71Sopenharmony_ci| -------- | -------- |
766e41f4b71Sopenharmony_ci| native | Pointer to an **ImageNative** object. | 
767e41f4b71Sopenharmony_ci| componentType | Type of the component. | 
768e41f4b71Sopenharmony_ci| componentNative | Pointer to the [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md) object obtained. | 
769e41f4b71Sopenharmony_ci
770e41f4b71Sopenharmony_ci**Returns**
771e41f4b71Sopenharmony_ci
772e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
773e41f4b71Sopenharmony_ci
774e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
775e41f4b71Sopenharmony_ci
776e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
777e41f4b71Sopenharmony_ci
778e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
779e41f4b71Sopenharmony_ci
780e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
781e41f4b71Sopenharmony_ci
782e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
783e41f4b71Sopenharmony_ci
784e41f4b71Sopenharmony_ci**See**
785e41f4b71Sopenharmony_ci
786e41f4b71Sopenharmony_ci[ImageNative](image.md#imagenative), [OhosImageComponent](_o_h_o_s_1_1_media_1_1_ohos_image_component.md)
787e41f4b71Sopenharmony_ci
788e41f4b71Sopenharmony_ci
789e41f4b71Sopenharmony_ci### OH_Image_InitImageNative()
790e41f4b71Sopenharmony_ci
791e41f4b71Sopenharmony_ci```
792e41f4b71Sopenharmony_ciImageNative* OH_Image_InitImageNative (napi_env env, napi_value source )
793e41f4b71Sopenharmony_ci```
794e41f4b71Sopenharmony_ci
795e41f4b71Sopenharmony_ci**Description**
796e41f4b71Sopenharmony_ci
797e41f4b71Sopenharmony_ciParses an **ImageNative** object from an **Image** object at the JavaScript native layer.
798e41f4b71Sopenharmony_ci
799e41f4b71Sopenharmony_ci**Since**: 10
800e41f4b71Sopenharmony_ci
801e41f4b71Sopenharmony_ci**Parameters**
802e41f4b71Sopenharmony_ci
803e41f4b71Sopenharmony_ci| Name| Description| 
804e41f4b71Sopenharmony_ci| -------- | -------- |
805e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
806e41f4b71Sopenharmony_ci| source | **Image** object at the JavaScript native layer. | 
807e41f4b71Sopenharmony_ci
808e41f4b71Sopenharmony_ci**Returns**
809e41f4b71Sopenharmony_ci
810e41f4b71Sopenharmony_ciReturns a pointer to the **ImageNative** object if the operation is successful; returns a null pointer otherwise.
811e41f4b71Sopenharmony_ci
812e41f4b71Sopenharmony_ci**See**
813e41f4b71Sopenharmony_ci
814e41f4b71Sopenharmony_ci[ImageNative](image.md#imagenative), [OH_Image_Release](image.md#oh_image_release)
815e41f4b71Sopenharmony_ci
816e41f4b71Sopenharmony_ci
817e41f4b71Sopenharmony_ci### OH_Image_Receiver_CreateImageReceiver()
818e41f4b71Sopenharmony_ci
819e41f4b71Sopenharmony_ci```
820e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_CreateImageReceiver (napi_env env, struct OhosImageReceiverInfo info, napi_value * res )
821e41f4b71Sopenharmony_ci```
822e41f4b71Sopenharmony_ci
823e41f4b71Sopenharmony_ci**Description**
824e41f4b71Sopenharmony_ci
825e41f4b71Sopenharmony_ciCreates an **ImageReceiver** object at the application layer.
826e41f4b71Sopenharmony_ci
827e41f4b71Sopenharmony_ci**Since**: 10
828e41f4b71Sopenharmony_ci
829e41f4b71Sopenharmony_ci**Parameters**
830e41f4b71Sopenharmony_ci
831e41f4b71Sopenharmony_ci| Name| Description| 
832e41f4b71Sopenharmony_ci| -------- | -------- |
833e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
834e41f4b71Sopenharmony_ci| info | Options for setting the **ImageReceiver** object. | 
835e41f4b71Sopenharmony_ci| res | Pointer to the **ImageReceiver** object at the application layer. | 
836e41f4b71Sopenharmony_ci
837e41f4b71Sopenharmony_ci**Returns**
838e41f4b71Sopenharmony_ci
839e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
840e41f4b71Sopenharmony_ci
841e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
842e41f4b71Sopenharmony_ci
843e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
844e41f4b71Sopenharmony_ci
845e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
846e41f4b71Sopenharmony_ci
847e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
848e41f4b71Sopenharmony_ci
849e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
850e41f4b71Sopenharmony_ci
851e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_SURFACE_FAILED** if the surface fails to be created.
852e41f4b71Sopenharmony_ci
853e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED** if the buffer fails to be allocated to the surface.
854e41f4b71Sopenharmony_ci
855e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_SURFACE_FAILED** if the surface fails to be obtained.
856e41f4b71Sopenharmony_ci
857e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT** if the media RTSP surface is not supported.
858e41f4b71Sopenharmony_ci
859e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
860e41f4b71Sopenharmony_ci
861e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MEDIA_DATA_UNSUPPORT** if the media type is not supported.
862e41f4b71Sopenharmony_ci
863e41f4b71Sopenharmony_ci
864e41f4b71Sopenharmony_ci**See**
865e41f4b71Sopenharmony_ci
866e41f4b71Sopenharmony_ci[OhosImageReceiverInfo](_ohos_image_receiver_info.md)
867e41f4b71Sopenharmony_ci
868e41f4b71Sopenharmony_ci
869e41f4b71Sopenharmony_ci### OH_Image_Receiver_GetCapacity()
870e41f4b71Sopenharmony_ci
871e41f4b71Sopenharmony_ci```
872e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_GetCapacity (const ImageReceiverNative * native, int32_t * capacity )
873e41f4b71Sopenharmony_ci```
874e41f4b71Sopenharmony_ci
875e41f4b71Sopenharmony_ci**Description**
876e41f4b71Sopenharmony_ci
877e41f4b71Sopenharmony_ciObtains the capacity of the image receiver through an [ImageReceiverNative](#imagereceivernative) object.
878e41f4b71Sopenharmony_ci
879e41f4b71Sopenharmony_ci**Since**: 10
880e41f4b71Sopenharmony_ci
881e41f4b71Sopenharmony_ci**Parameters**
882e41f4b71Sopenharmony_ci
883e41f4b71Sopenharmony_ci| Name| Description| 
884e41f4b71Sopenharmony_ci| -------- | -------- |
885e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
886e41f4b71Sopenharmony_ci| capacity | Pointer to the capacity obtained. | 
887e41f4b71Sopenharmony_ci
888e41f4b71Sopenharmony_ci**Returns**
889e41f4b71Sopenharmony_ci
890e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
891e41f4b71Sopenharmony_ci
892e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
893e41f4b71Sopenharmony_ci
894e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
895e41f4b71Sopenharmony_ci
896e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
897e41f4b71Sopenharmony_ci
898e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
899e41f4b71Sopenharmony_ci
900e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
901e41f4b71Sopenharmony_ci
902e41f4b71Sopenharmony_ci
903e41f4b71Sopenharmony_ci**See**
904e41f4b71Sopenharmony_ci
905e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative), [OhosImageSize](_ohos_image_size.md)
906e41f4b71Sopenharmony_ci
907e41f4b71Sopenharmony_ci
908e41f4b71Sopenharmony_ci### OH_Image_Receiver_GetFormat()
909e41f4b71Sopenharmony_ci
910e41f4b71Sopenharmony_ci```
911e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_GetFormat (const ImageReceiverNative * native, int32_t * format )
912e41f4b71Sopenharmony_ci```
913e41f4b71Sopenharmony_ci
914e41f4b71Sopenharmony_ci**Description**
915e41f4b71Sopenharmony_ci
916e41f4b71Sopenharmony_ciObtains the format of the image receiver through an [ImageReceiverNative](#imagereceivernative) object.
917e41f4b71Sopenharmony_ci
918e41f4b71Sopenharmony_ci**Since**: 10
919e41f4b71Sopenharmony_ci
920e41f4b71Sopenharmony_ci**Parameters**
921e41f4b71Sopenharmony_ci
922e41f4b71Sopenharmony_ci| Name| Description| 
923e41f4b71Sopenharmony_ci| -------- | -------- |
924e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
925e41f4b71Sopenharmony_ci| format | Pointer to the format obtained. | 
926e41f4b71Sopenharmony_ci
927e41f4b71Sopenharmony_ci**Returns**
928e41f4b71Sopenharmony_ci
929e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
930e41f4b71Sopenharmony_ci
931e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
932e41f4b71Sopenharmony_ci
933e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
934e41f4b71Sopenharmony_ci
935e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
936e41f4b71Sopenharmony_ci
937e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
938e41f4b71Sopenharmony_ci
939e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
940e41f4b71Sopenharmony_ci
941e41f4b71Sopenharmony_ci
942e41f4b71Sopenharmony_ci**See**
943e41f4b71Sopenharmony_ci
944e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative)
945e41f4b71Sopenharmony_ci
946e41f4b71Sopenharmony_ci
947e41f4b71Sopenharmony_ci### OH_Image_Receiver_GetReceivingSurfaceId()
948e41f4b71Sopenharmony_ci
949e41f4b71Sopenharmony_ci```
950e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_GetReceivingSurfaceId (const ImageReceiverNative * native, char * id, size_t len )
951e41f4b71Sopenharmony_ci```
952e41f4b71Sopenharmony_ci
953e41f4b71Sopenharmony_ci**Description**
954e41f4b71Sopenharmony_ci
955e41f4b71Sopenharmony_ciObtains the receiver ID through an [ImageReceiverNative](#imagereceivernative) object.
956e41f4b71Sopenharmony_ci
957e41f4b71Sopenharmony_ci**Since**: 10
958e41f4b71Sopenharmony_ci
959e41f4b71Sopenharmony_ci**Parameters**
960e41f4b71Sopenharmony_ci
961e41f4b71Sopenharmony_ci| Name| Description| 
962e41f4b71Sopenharmony_ci| -------- | -------- |
963e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
964e41f4b71Sopenharmony_ci| id | Pointer to the buffer that stores the ID string obtained. | 
965e41f4b71Sopenharmony_ci| len | Size of the buffer. | 
966e41f4b71Sopenharmony_ci
967e41f4b71Sopenharmony_ci**Returns**
968e41f4b71Sopenharmony_ci
969e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
970e41f4b71Sopenharmony_ci
971e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
972e41f4b71Sopenharmony_ci
973e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
974e41f4b71Sopenharmony_ci
975e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
976e41f4b71Sopenharmony_ci
977e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
978e41f4b71Sopenharmony_ci
979e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
980e41f4b71Sopenharmony_ci
981e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_SURFACE_FAILED** if the surface fails to be obtained.
982e41f4b71Sopenharmony_ci
983e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
984e41f4b71Sopenharmony_ci
985e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MEDIA_DATA_UNSUPPORT** if the media type is not supported.
986e41f4b71Sopenharmony_ci
987e41f4b71Sopenharmony_ci
988e41f4b71Sopenharmony_ci**See**
989e41f4b71Sopenharmony_ci
990e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative)
991e41f4b71Sopenharmony_ci
992e41f4b71Sopenharmony_ci
993e41f4b71Sopenharmony_ci### OH_Image_Receiver_GetSize()
994e41f4b71Sopenharmony_ci
995e41f4b71Sopenharmony_ci```
996e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_GetSize (const ImageReceiverNative * native, struct OhosImageSize * size )
997e41f4b71Sopenharmony_ci```
998e41f4b71Sopenharmony_ci
999e41f4b71Sopenharmony_ci**Description**
1000e41f4b71Sopenharmony_ci
1001e41f4b71Sopenharmony_ciObtains the size of the image receiver through an [ImageReceiverNative](#imagereceivernative) object.
1002e41f4b71Sopenharmony_ci
1003e41f4b71Sopenharmony_ci**Since**: 10
1004e41f4b71Sopenharmony_ci
1005e41f4b71Sopenharmony_ci**Parameters**
1006e41f4b71Sopenharmony_ci
1007e41f4b71Sopenharmony_ci| Name| Description| 
1008e41f4b71Sopenharmony_ci| -------- | -------- |
1009e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
1010e41f4b71Sopenharmony_ci| size | Pointer to the [OhosImageSize](_ohos_image_size.md) object obtained. | 
1011e41f4b71Sopenharmony_ci
1012e41f4b71Sopenharmony_ci**Returns**
1013e41f4b71Sopenharmony_ci
1014e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1015e41f4b71Sopenharmony_ci
1016e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1017e41f4b71Sopenharmony_ci
1018e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1019e41f4b71Sopenharmony_ci
1020e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1021e41f4b71Sopenharmony_ci
1022e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1023e41f4b71Sopenharmony_ci
1024e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
1025e41f4b71Sopenharmony_ci
1026e41f4b71Sopenharmony_ci**See**
1027e41f4b71Sopenharmony_ci
1028e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative), [OH_Image_Receiver_On_Callback](#oh_image_receiver_on_callback)
1029e41f4b71Sopenharmony_ci
1030e41f4b71Sopenharmony_ci
1031e41f4b71Sopenharmony_ci### OH_Image_Receiver_InitImageReceiverNative()
1032e41f4b71Sopenharmony_ci
1033e41f4b71Sopenharmony_ci```
1034e41f4b71Sopenharmony_ciImageReceiverNative* OH_Image_Receiver_InitImageReceiverNative (napi_env env, napi_value source )
1035e41f4b71Sopenharmony_ci```
1036e41f4b71Sopenharmony_ci
1037e41f4b71Sopenharmony_ci**Description**
1038e41f4b71Sopenharmony_ci
1039e41f4b71Sopenharmony_ciInitializes an [ImageReceiverNative](#imagereceivernative) object through an **ImageReceiver** object.
1040e41f4b71Sopenharmony_ci
1041e41f4b71Sopenharmony_ci**Since**: 10
1042e41f4b71Sopenharmony_ci
1043e41f4b71Sopenharmony_ci**Parameters**
1044e41f4b71Sopenharmony_ci
1045e41f4b71Sopenharmony_ci| Name| Description| 
1046e41f4b71Sopenharmony_ci| -------- | -------- |
1047e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
1048e41f4b71Sopenharmony_ci| source | **ImageReceiver** object. | 
1049e41f4b71Sopenharmony_ci
1050e41f4b71Sopenharmony_ci**Returns**
1051e41f4b71Sopenharmony_ci
1052e41f4b71Sopenharmony_ciReturns a pointer to the [ImageReceiverNative](#imagereceivernative) object obtained if the operation is successful; returns a null pointer otherwise.
1053e41f4b71Sopenharmony_ci
1054e41f4b71Sopenharmony_ci**See**
1055e41f4b71Sopenharmony_ci
1056e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative), [OH_Image_Receiver_Release](#oh_image_receiver_release)
1057e41f4b71Sopenharmony_ci
1058e41f4b71Sopenharmony_ci
1059e41f4b71Sopenharmony_ci### OH_Image_Receiver_On()
1060e41f4b71Sopenharmony_ci
1061e41f4b71Sopenharmony_ci```
1062e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_On (const ImageReceiverNative * native, OH_Image_Receiver_On_Callback callback )
1063e41f4b71Sopenharmony_ci```
1064e41f4b71Sopenharmony_ci
1065e41f4b71Sopenharmony_ci**Description**
1066e41f4b71Sopenharmony_ci
1067e41f4b71Sopenharmony_ciRegisters an [OH_Image_Receiver_On_Callback](#oh_image_receiver_on_callback) callback. This callback is triggered whenever a new image is received.
1068e41f4b71Sopenharmony_ci
1069e41f4b71Sopenharmony_ci**Since**: 10
1070e41f4b71Sopenharmony_ci
1071e41f4b71Sopenharmony_ci**Parameters**
1072e41f4b71Sopenharmony_ci
1073e41f4b71Sopenharmony_ci| Name| Description| 
1074e41f4b71Sopenharmony_ci| -------- | -------- |
1075e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
1076e41f4b71Sopenharmony_ci| callback | [OH_Image_Receiver_On_Callback](#oh_image_receiver_on_callback) callback to register. | 
1077e41f4b71Sopenharmony_ci
1078e41f4b71Sopenharmony_ci**Returns**
1079e41f4b71Sopenharmony_ci
1080e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1081e41f4b71Sopenharmony_ci
1082e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1083e41f4b71Sopenharmony_ci
1084e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1085e41f4b71Sopenharmony_ci
1086e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1087e41f4b71Sopenharmony_ci
1088e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid or a parameter fails to be obtained from the surface.
1089e41f4b71Sopenharmony_ci
1090e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_SURFACE_FAILED** if the surface fails to be obtained.
1091e41f4b71Sopenharmony_ci
1092e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
1093e41f4b71Sopenharmony_ci
1094e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_REGISTER_LISTENER_FAILED** if the listener fails to be registered.
1095e41f4b71Sopenharmony_ci
1096e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_REGISTER_BUFFER_FAILED** if the buffer fails to be registered.
1097e41f4b71Sopenharmony_ci
1098e41f4b71Sopenharmony_ci
1099e41f4b71Sopenharmony_ci**See**
1100e41f4b71Sopenharmony_ci
1101e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative)
1102e41f4b71Sopenharmony_ci
1103e41f4b71Sopenharmony_ci
1104e41f4b71Sopenharmony_ci### OH_Image_Receiver_ReadLatestImage()
1105e41f4b71Sopenharmony_ci
1106e41f4b71Sopenharmony_ci```
1107e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_ReadLatestImage (const ImageReceiverNative * native, napi_value * image )
1108e41f4b71Sopenharmony_ci```
1109e41f4b71Sopenharmony_ci
1110e41f4b71Sopenharmony_ci**Description**
1111e41f4b71Sopenharmony_ci
1112e41f4b71Sopenharmony_ciObtains the latest image through an [ImageReceiverNative](#imagereceivernative) object.
1113e41f4b71Sopenharmony_ci
1114e41f4b71Sopenharmony_ci**Since**: 10
1115e41f4b71Sopenharmony_ci
1116e41f4b71Sopenharmony_ci**Parameters**
1117e41f4b71Sopenharmony_ci
1118e41f4b71Sopenharmony_ci| Name| Description| 
1119e41f4b71Sopenharmony_ci| -------- | -------- |
1120e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
1121e41f4b71Sopenharmony_ci| image | Pointer to an **Image** object at the application layer. | 
1122e41f4b71Sopenharmony_ci
1123e41f4b71Sopenharmony_ci**Returns**
1124e41f4b71Sopenharmony_ci
1125e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1126e41f4b71Sopenharmony_ci
1127e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1128e41f4b71Sopenharmony_ci
1129e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1130e41f4b71Sopenharmony_ci
1131e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1132e41f4b71Sopenharmony_ci
1133e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1134e41f4b71Sopenharmony_ci
1135e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
1136e41f4b71Sopenharmony_ci
1137e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_SURFACE_FAILED** if the surface fails to be created.
1138e41f4b71Sopenharmony_ci
1139e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED** if the buffer fails to be allocated to the surface.
1140e41f4b71Sopenharmony_ci
1141e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_SURFACE_FAILED** if the surface fails to be obtained.
1142e41f4b71Sopenharmony_ci
1143e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT** if the media RTSP surface is not supported.
1144e41f4b71Sopenharmony_ci
1145e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
1146e41f4b71Sopenharmony_ci
1147e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED** if the buffer fails to be requested.
1148e41f4b71Sopenharmony_ci
1149e41f4b71Sopenharmony_ci
1150e41f4b71Sopenharmony_ci**See**
1151e41f4b71Sopenharmony_ci
1152e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative)
1153e41f4b71Sopenharmony_ci
1154e41f4b71Sopenharmony_ci
1155e41f4b71Sopenharmony_ci### OH_Image_Receiver_ReadNextImage()
1156e41f4b71Sopenharmony_ci
1157e41f4b71Sopenharmony_ci```
1158e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_ReadNextImage (const ImageReceiverNative * native, napi_value * image )
1159e41f4b71Sopenharmony_ci```
1160e41f4b71Sopenharmony_ci
1161e41f4b71Sopenharmony_ci**Description**
1162e41f4b71Sopenharmony_ci
1163e41f4b71Sopenharmony_ciObtains the next image through an [ImageReceiverNative](#imagereceivernative) object.
1164e41f4b71Sopenharmony_ci
1165e41f4b71Sopenharmony_ci**Since**: 10
1166e41f4b71Sopenharmony_ci
1167e41f4b71Sopenharmony_ci**Parameters**
1168e41f4b71Sopenharmony_ci
1169e41f4b71Sopenharmony_ci| Name| Description| 
1170e41f4b71Sopenharmony_ci| -------- | -------- |
1171e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
1172e41f4b71Sopenharmony_ci| image | Pointer to an **Image** object at the application layer. | 
1173e41f4b71Sopenharmony_ci
1174e41f4b71Sopenharmony_ci**Returns**
1175e41f4b71Sopenharmony_ci
1176e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1177e41f4b71Sopenharmony_ci
1178e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1179e41f4b71Sopenharmony_ci
1180e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1181e41f4b71Sopenharmony_ci
1182e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1183e41f4b71Sopenharmony_ci
1184e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1185e41f4b71Sopenharmony_ci
1186e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
1187e41f4b71Sopenharmony_ci
1188e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_SURFACE_FAILED** if the surface fails to be created.
1189e41f4b71Sopenharmony_ci
1190e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED** if the buffer fails to be allocated to the surface.
1191e41f4b71Sopenharmony_ci
1192e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_SURFACE_FAILED** if the surface fails to be obtained.
1193e41f4b71Sopenharmony_ci
1194e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT** if the media RTSP surface is not supported.
1195e41f4b71Sopenharmony_ci
1196e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
1197e41f4b71Sopenharmony_ci
1198e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED** if the buffer fails to be requested.
1199e41f4b71Sopenharmony_ci
1200e41f4b71Sopenharmony_ci**See**
1201e41f4b71Sopenharmony_ci
1202e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative)
1203e41f4b71Sopenharmony_ci
1204e41f4b71Sopenharmony_ci
1205e41f4b71Sopenharmony_ci### OH_Image_Receiver_Release()
1206e41f4b71Sopenharmony_ci
1207e41f4b71Sopenharmony_ci```
1208e41f4b71Sopenharmony_ciint32_t OH_Image_Receiver_Release (ImageReceiverNative * native)
1209e41f4b71Sopenharmony_ci```
1210e41f4b71Sopenharmony_ci
1211e41f4b71Sopenharmony_ci**Description**
1212e41f4b71Sopenharmony_ci
1213e41f4b71Sopenharmony_ciReleases an [ImageReceiverNative](#imagereceivernative) object. Note: This function is not used to release an **ImageReceiver** object.
1214e41f4b71Sopenharmony_ci
1215e41f4b71Sopenharmony_ci**Since**: 10
1216e41f4b71Sopenharmony_ci
1217e41f4b71Sopenharmony_ci**Parameters**
1218e41f4b71Sopenharmony_ci
1219e41f4b71Sopenharmony_ci| Name| Description| 
1220e41f4b71Sopenharmony_ci| -------- | -------- |
1221e41f4b71Sopenharmony_ci| native | Pointer to an [ImageReceiverNative](#imagereceivernative) object. | 
1222e41f4b71Sopenharmony_ci
1223e41f4b71Sopenharmony_ci**Returns**
1224e41f4b71Sopenharmony_ci
1225e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1226e41f4b71Sopenharmony_ci
1227e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1228e41f4b71Sopenharmony_ci
1229e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1230e41f4b71Sopenharmony_ci
1231e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1232e41f4b71Sopenharmony_ci
1233e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1234e41f4b71Sopenharmony_ci
1235e41f4b71Sopenharmony_ci
1236e41f4b71Sopenharmony_ci**See**
1237e41f4b71Sopenharmony_ci
1238e41f4b71Sopenharmony_ci[ImageReceiverNative](#imagereceivernative)
1239e41f4b71Sopenharmony_ci
1240e41f4b71Sopenharmony_ci
1241e41f4b71Sopenharmony_ci### OH_Image_Release()
1242e41f4b71Sopenharmony_ci
1243e41f4b71Sopenharmony_ci```
1244e41f4b71Sopenharmony_ciint32_t OH_Image_Release (ImageNative * native)
1245e41f4b71Sopenharmony_ci```
1246e41f4b71Sopenharmony_ci
1247e41f4b71Sopenharmony_ci**Description**
1248e41f4b71Sopenharmony_ci
1249e41f4b71Sopenharmony_ciReleases an **ImageNative** object. Note: This function is not used to release an **Image** object at the JavaScript native API. It is used to release an **ImageNative** object parsed by calling **OH_Image_InitImageNative**.
1250e41f4b71Sopenharmony_ci
1251e41f4b71Sopenharmony_ci**Since**: 10
1252e41f4b71Sopenharmony_ci
1253e41f4b71Sopenharmony_ci**Parameters**
1254e41f4b71Sopenharmony_ci
1255e41f4b71Sopenharmony_ci| Name| Description| 
1256e41f4b71Sopenharmony_ci| -------- | -------- |
1257e41f4b71Sopenharmony_ci| native | Pointer to an **ImageNative** object. | 
1258e41f4b71Sopenharmony_ci
1259e41f4b71Sopenharmony_ci**Returns**
1260e41f4b71Sopenharmony_ci
1261e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1262e41f4b71Sopenharmony_ci
1263e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1264e41f4b71Sopenharmony_ci
1265e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1266e41f4b71Sopenharmony_ci
1267e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1268e41f4b71Sopenharmony_ci
1269e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1270e41f4b71Sopenharmony_ci
1271e41f4b71Sopenharmony_ci**See**
1272e41f4b71Sopenharmony_ci
1273e41f4b71Sopenharmony_ci[ImageNative](image.md#imagenative), [OH_Image_InitImageNative](image.md#oh_image_initimagenative)
1274e41f4b71Sopenharmony_ci
1275e41f4b71Sopenharmony_ci
1276e41f4b71Sopenharmony_ci### OH_Image_Size()
1277e41f4b71Sopenharmony_ci
1278e41f4b71Sopenharmony_ci```
1279e41f4b71Sopenharmony_ciint32_t OH_Image_Size (const ImageNative * native, struct OhosImageSize * size )
1280e41f4b71Sopenharmony_ci```
1281e41f4b71Sopenharmony_ci
1282e41f4b71Sopenharmony_ci**Description**
1283e41f4b71Sopenharmony_ci
1284e41f4b71Sopenharmony_ciObtains [OhosImageSize](_ohos_image_size.md) of an **ImageNative** object.
1285e41f4b71Sopenharmony_ci
1286e41f4b71Sopenharmony_ci**Since**: 10
1287e41f4b71Sopenharmony_ci
1288e41f4b71Sopenharmony_ci**Parameters**
1289e41f4b71Sopenharmony_ci
1290e41f4b71Sopenharmony_ci| Name| Description| 
1291e41f4b71Sopenharmony_ci| -------- | -------- |
1292e41f4b71Sopenharmony_ci| native | Pointer to an **ImageNative** object. | 
1293e41f4b71Sopenharmony_ci| size | Pointer to the [OhosImageSize](_ohos_image_size.md) object obtained. | 
1294e41f4b71Sopenharmony_ci
1295e41f4b71Sopenharmony_ci**Returns**
1296e41f4b71Sopenharmony_ci
1297e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1298e41f4b71Sopenharmony_ci
1299e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1300e41f4b71Sopenharmony_ci
1301e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1302e41f4b71Sopenharmony_ci
1303e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1304e41f4b71Sopenharmony_ci
1305e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED** if parameters fail to be obtained from the surface.
1306e41f4b71Sopenharmony_ci
1307e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1308e41f4b71Sopenharmony_ci
1309e41f4b71Sopenharmony_ci**See**
1310e41f4b71Sopenharmony_ci
1311e41f4b71Sopenharmony_ci[ImageNative](image.md#imagenative), [OhosImageSize](_ohos_image_size.md)
1312e41f4b71Sopenharmony_ci
1313e41f4b71Sopenharmony_ci
1314e41f4b71Sopenharmony_ci### OH_ImagePacker_Create()
1315e41f4b71Sopenharmony_ci
1316e41f4b71Sopenharmony_ci```
1317e41f4b71Sopenharmony_ciint32_t OH_ImagePacker_Create (napi_env env, napi_value * res )
1318e41f4b71Sopenharmony_ci```
1319e41f4b71Sopenharmony_ci
1320e41f4b71Sopenharmony_ci**Description**
1321e41f4b71Sopenharmony_ci
1322e41f4b71Sopenharmony_ciObtains an **ImagePacker** object at the JavaScript native layer.
1323e41f4b71Sopenharmony_ci
1324e41f4b71Sopenharmony_ci**Since**: 11
1325e41f4b71Sopenharmony_ci
1326e41f4b71Sopenharmony_ci**Parameters**
1327e41f4b71Sopenharmony_ci
1328e41f4b71Sopenharmony_ci| Name| Description| 
1329e41f4b71Sopenharmony_ci| -------- | -------- |
1330e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1331e41f4b71Sopenharmony_ci| res | Pointer to an **ImagePacker** object at the JavaScript native layer. | 
1332e41f4b71Sopenharmony_ci
1333e41f4b71Sopenharmony_ci**Returns**
1334e41f4b71Sopenharmony_ci
1335e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1336e41f4b71Sopenharmony_ci
1337e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1338e41f4b71Sopenharmony_ci
1339e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1340e41f4b71Sopenharmony_ci
1341e41f4b71Sopenharmony_ci
1342e41f4b71Sopenharmony_ci### OH_ImagePacker_InitNative()
1343e41f4b71Sopenharmony_ci
1344e41f4b71Sopenharmony_ci```
1345e41f4b71Sopenharmony_ciImagePacker_Native* OH_ImagePacker_InitNative (napi_env env, napi_value packer )
1346e41f4b71Sopenharmony_ci```
1347e41f4b71Sopenharmony_ci
1348e41f4b71Sopenharmony_ci**Description**
1349e41f4b71Sopenharmony_ci
1350e41f4b71Sopenharmony_ciConverts an **ImagePacker** object at the JavaScript native layer into an **ImagePacker_Native** object.
1351e41f4b71Sopenharmony_ci
1352e41f4b71Sopenharmony_ci**Since**: 11
1353e41f4b71Sopenharmony_ci
1354e41f4b71Sopenharmony_ci**Parameters**
1355e41f4b71Sopenharmony_ci
1356e41f4b71Sopenharmony_ci| Name| Description| 
1357e41f4b71Sopenharmony_ci| -------- | -------- |
1358e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1359e41f4b71Sopenharmony_ci| packer | **ImagePacker** object at the JavaScript native layer. | 
1360e41f4b71Sopenharmony_ci
1361e41f4b71Sopenharmony_ci**Returns**
1362e41f4b71Sopenharmony_ci
1363e41f4b71Sopenharmony_ciReturns the pointer to an [ImagePacker_Native](#imagepacker_native) object if the operation is successful; returns a null pointer otherwise.
1364e41f4b71Sopenharmony_ci
1365e41f4b71Sopenharmony_ci**See**
1366e41f4b71Sopenharmony_ci
1367e41f4b71Sopenharmony_ci[OH_ImagePacker_Release](#oh_imagepacker_release)
1368e41f4b71Sopenharmony_ci
1369e41f4b71Sopenharmony_ci
1370e41f4b71Sopenharmony_ci### OH_ImagePacker_PackToData()
1371e41f4b71Sopenharmony_ci
1372e41f4b71Sopenharmony_ci```
1373e41f4b71Sopenharmony_ciint32_t OH_ImagePacker_PackToData (ImagePacker_Native * native, napi_value source, ImagePacker_Opts * opts, uint8_t * outData, size_t * size )
1374e41f4b71Sopenharmony_ci```
1375e41f4b71Sopenharmony_ci
1376e41f4b71Sopenharmony_ci**Description**
1377e41f4b71Sopenharmony_ci
1378e41f4b71Sopenharmony_ciPacks a **PixelMap** object or an **ImagePacker** object at the JavaScript native layer to a buffer (defined by **outData**) based on the specified **ImagePacker_Opts** struct.
1379e41f4b71Sopenharmony_ci
1380e41f4b71Sopenharmony_ci**Since**: 11
1381e41f4b71Sopenharmony_ci
1382e41f4b71Sopenharmony_ci**Parameters**
1383e41f4b71Sopenharmony_ci
1384e41f4b71Sopenharmony_ci| Name| Description| 
1385e41f4b71Sopenharmony_ci| -------- | -------- |
1386e41f4b71Sopenharmony_ci| native | Pointer to an **ImagePacker_Native** object. | 
1387e41f4b71Sopenharmony_ci| source | **PixelMap** object or **ImageSource** object at the JavaScript native layer. | 
1388e41f4b71Sopenharmony_ci| opts | Pointer to the packing options. For details, see [ImagePacker_Opts](#imagepacker_opts). | 
1389e41f4b71Sopenharmony_ci| outData | Pointer to the output buffer. | 
1390e41f4b71Sopenharmony_ci| size | Pointer to the size of the buffer. | 
1391e41f4b71Sopenharmony_ci
1392e41f4b71Sopenharmony_ci**Returns**
1393e41f4b71Sopenharmony_ci
1394e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1395e41f4b71Sopenharmony_ci
1396e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1397e41f4b71Sopenharmony_ci
1398e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1399e41f4b71Sopenharmony_ci
1400e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_DATA_ABNORMAL** if the output buffer is abnormal.
1401e41f4b71Sopenharmony_ci
1402e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_MISMATCHED_FORMAT** if the format does not match.
1403e41f4b71Sopenharmony_ci
1404e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_MALLOC_ABNORMAL** if an internal error occurs during buffer memory allocation.
1405e41f4b71Sopenharmony_ci
1406e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_DECODE_ABNORMAL** if an internal error occurs during codec initialization.
1407e41f4b71Sopenharmony_ci
1408e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_ENCODE_FAILED** if an error occurs during encoding.
1409e41f4b71Sopenharmony_ci
1410e41f4b71Sopenharmony_ci**See**
1411e41f4b71Sopenharmony_ci
1412e41f4b71Sopenharmony_ci[OH_ImagePacker_PackToFile](#oh_imagepacker_packtofile)
1413e41f4b71Sopenharmony_ci
1414e41f4b71Sopenharmony_ci
1415e41f4b71Sopenharmony_ci### OH_ImagePacker_PackToFile()
1416e41f4b71Sopenharmony_ci
1417e41f4b71Sopenharmony_ci```
1418e41f4b71Sopenharmony_ciint32_t OH_ImagePacker_PackToFile (ImagePacker_Native * native, napi_value source, ImagePacker_Opts * opts, int fd )
1419e41f4b71Sopenharmony_ci```
1420e41f4b71Sopenharmony_ci
1421e41f4b71Sopenharmony_ci**Description**
1422e41f4b71Sopenharmony_ci
1423e41f4b71Sopenharmony_ciPacks a **PixelMap** object or an **ImagePacker** object at the JavaScript native layer to a file based on the specified **ImagePacker_Opts** struct.
1424e41f4b71Sopenharmony_ci
1425e41f4b71Sopenharmony_ci**Since**: 11
1426e41f4b71Sopenharmony_ci
1427e41f4b71Sopenharmony_ci**Parameters**
1428e41f4b71Sopenharmony_ci
1429e41f4b71Sopenharmony_ci| Name| Description| 
1430e41f4b71Sopenharmony_ci| -------- | -------- |
1431e41f4b71Sopenharmony_ci| native | Pointer to an **ImagePacker_Native** object. | 
1432e41f4b71Sopenharmony_ci| source | **PixelMap** object or **ImageSource** object at the JavaScript native layer. | 
1433e41f4b71Sopenharmony_ci| opts | Pointer to the packing options. For details, see [ImagePacker_Opts](#imagepacker_opts). | 
1434e41f4b71Sopenharmony_ci| fd | File descriptor of the output file. | 
1435e41f4b71Sopenharmony_ci
1436e41f4b71Sopenharmony_ci**Returns**
1437e41f4b71Sopenharmony_ci
1438e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1439e41f4b71Sopenharmony_ci
1440e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1441e41f4b71Sopenharmony_ci
1442e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1443e41f4b71Sopenharmony_ci
1444e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_DATA_ABNORMAL** if the output buffer is abnormal.
1445e41f4b71Sopenharmony_ci
1446e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_MISMATCHED_FORMAT** if the format does not match.
1447e41f4b71Sopenharmony_ci
1448e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_MALLOC_ABNORMAL** if an internal error occurs during buffer memory allocation.
1449e41f4b71Sopenharmony_ci
1450e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_DECODE_ABNORMAL** if an internal error occurs during codec initialization.
1451e41f4b71Sopenharmony_ci
1452e41f4b71Sopenharmony_ciReturns **ERR_IMAGE_ENCODE_FAILED** if an error occurs during encoding.
1453e41f4b71Sopenharmony_ci
1454e41f4b71Sopenharmony_ci**See**
1455e41f4b71Sopenharmony_ci
1456e41f4b71Sopenharmony_ci[OH_ImagePacker_PackToData](#oh_imagepacker_packtodata)
1457e41f4b71Sopenharmony_ci
1458e41f4b71Sopenharmony_ci
1459e41f4b71Sopenharmony_ci### OH_ImagePacker_Release()
1460e41f4b71Sopenharmony_ci
1461e41f4b71Sopenharmony_ci```
1462e41f4b71Sopenharmony_ciint32_t OH_ImagePacker_Release (ImagePacker_Native * native)
1463e41f4b71Sopenharmony_ci```
1464e41f4b71Sopenharmony_ci
1465e41f4b71Sopenharmony_ci**Description**
1466e41f4b71Sopenharmony_ci
1467e41f4b71Sopenharmony_ciReleases an [ImagePacker_Native](#imagepacker_native) object,
1468e41f4b71Sopenharmony_ci
1469e41f4b71Sopenharmony_cirather than the **ImagePacker** object at the JavaScript native layer.
1470e41f4b71Sopenharmony_ci
1471e41f4b71Sopenharmony_ciIt is parsed by calling [OH_ImagePacker_InitNative](#oh_imagepacker_initnative).
1472e41f4b71Sopenharmony_ci
1473e41f4b71Sopenharmony_ci**Since**: 11
1474e41f4b71Sopenharmony_ci
1475e41f4b71Sopenharmony_ci**Parameters**
1476e41f4b71Sopenharmony_ci
1477e41f4b71Sopenharmony_ci| Name| Description| 
1478e41f4b71Sopenharmony_ci| -------- | -------- |
1479e41f4b71Sopenharmony_ci| native | Pointer to an [ImagePacker_Native](#imagepacker_native) object. | 
1480e41f4b71Sopenharmony_ci
1481e41f4b71Sopenharmony_ci**Returns**
1482e41f4b71Sopenharmony_ci
1483e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1484e41f4b71Sopenharmony_ci
1485e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1486e41f4b71Sopenharmony_ci
1487e41f4b71Sopenharmony_ci**See**
1488e41f4b71Sopenharmony_ci
1489e41f4b71Sopenharmony_ci[OH_ImagePacker_InitNative](#oh_imagepacker_initnative)
1490e41f4b71Sopenharmony_ci
1491e41f4b71Sopenharmony_ci
1492e41f4b71Sopenharmony_ci
1493e41f4b71Sopenharmony_ci### OH_ImageSource_Create()
1494e41f4b71Sopenharmony_ci
1495e41f4b71Sopenharmony_ci```
1496e41f4b71Sopenharmony_ciint32_t OH_ImageSource_Create (napi_env env, struct OhosImageSource * src, struct OhosImageSourceOps * ops, napi_value * res )
1497e41f4b71Sopenharmony_ci```
1498e41f4b71Sopenharmony_ci
1499e41f4b71Sopenharmony_ci**Description**
1500e41f4b71Sopenharmony_ci
1501e41f4b71Sopenharmony_ciCreates an **ImageSource** object at the JavaScript native layer based on the specified [OhosImageSource](_ohos_image_source.md) and [OhosImageSourceOps](_ohos_image_source_ops.md) structs.
1502e41f4b71Sopenharmony_ci
1503e41f4b71Sopenharmony_ci**Since**: 10
1504e41f4b71Sopenharmony_ci
1505e41f4b71Sopenharmony_ci**Deprecated from**: 11
1506e41f4b71Sopenharmony_ci
1507e41f4b71Sopenharmony_ci**Substitute**: [OH_ImageSource_CreateFromUri](#oh_imagesource_createfromuri), [OH_ImageSource_CreateFromFd](#oh_imagesource_createfromfd), and [OH_ImageSource_CreateFromData](#oh_imagesource_createfromdata)
1508e41f4b71Sopenharmony_ci
1509e41f4b71Sopenharmony_ci**Parameters**
1510e41f4b71Sopenharmony_ci
1511e41f4b71Sopenharmony_ci| Name| Description| 
1512e41f4b71Sopenharmony_ci| -------- | -------- |
1513e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1514e41f4b71Sopenharmony_ci| src | Pointer to the input resource of the image source. For details, see [OhosImageSource](_ohos_image_source.md). | 
1515e41f4b71Sopenharmony_ci| ops | Pointer to the options for creating the image source. For details, see [OhosImageSourceOps](_ohos_image_source_ops.md). | 
1516e41f4b71Sopenharmony_ci| res | Pointer to an **ImageSource** object at the JavaScript native layer. | 
1517e41f4b71Sopenharmony_ci
1518e41f4b71Sopenharmony_ci**Returns**
1519e41f4b71Sopenharmony_ci
1520e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1521e41f4b71Sopenharmony_ci
1522e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1523e41f4b71Sopenharmony_ci
1524e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1525e41f4b71Sopenharmony_ci
1526e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1527e41f4b71Sopenharmony_ci
1528e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1529e41f4b71Sopenharmony_ci
1530e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SOURCE_DATA_INCOMPLETE** if the image source data is incomplete.
1531e41f4b71Sopenharmony_ci
1532e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SOURCE_DATA** if the image source data is incorrect.
1533e41f4b71Sopenharmony_ci
1534e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
1535e41f4b71Sopenharmony_ci
1536e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_TOO_LARGE** if the image is too large.
1537e41f4b71Sopenharmony_ci
1538e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
1539e41f4b71Sopenharmony_ci
1540e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
1541e41f4b71Sopenharmony_ci
1542e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
1543e41f4b71Sopenharmony_ci
1544e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
1545e41f4b71Sopenharmony_ci
1546e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_FILE_DAMAGED** if the file is damaged.
1547e41f4b71Sopenharmony_ci
1548e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_FILE_FD_ERROR** if the file descriptor is incorrect.
1549e41f4b71Sopenharmony_ci
1550e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_STREAM_SIZE_ERROR** if the data stream is incorrect.
1551e41f4b71Sopenharmony_ci
1552e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SEEK_FAILED** if seeking the file fails.
1553e41f4b71Sopenharmony_ci
1554e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PEEK_FAILED** if peeking the file fails.
1555e41f4b71Sopenharmony_ci
1556e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_FREAD_FAILED** if reading the file fails.
1557e41f4b71Sopenharmony_ci
1558e41f4b71Sopenharmony_ci**See**
1559e41f4b71Sopenharmony_ci
1560e41f4b71Sopenharmony_ci[OhosImageSource](_ohos_image_source.md), [OhosImageSourceOps](_ohos_image_source_ops.md)
1561e41f4b71Sopenharmony_ci
1562e41f4b71Sopenharmony_ci
1563e41f4b71Sopenharmony_ci
1564e41f4b71Sopenharmony_ci### OH_ImageSource_CreateFromData()
1565e41f4b71Sopenharmony_ci
1566e41f4b71Sopenharmony_ci```
1567e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreateFromData (napi_env env, uint8_t * data, size_t dataSize, struct OhosImageSourceOps * ops, napi_value * res )
1568e41f4b71Sopenharmony_ci```
1569e41f4b71Sopenharmony_ci
1570e41f4b71Sopenharmony_ci**Description**
1571e41f4b71Sopenharmony_ci
1572e41f4b71Sopenharmony_ciCreates an **ImageSource** object at the JavaScript native layer based on the specified image source buffer resource (defined by **data**) and [OhosImageSourceOps](_ohos_image_source_ops.md) struct.
1573e41f4b71Sopenharmony_ci
1574e41f4b71Sopenharmony_ci**Since**: 11
1575e41f4b71Sopenharmony_ci
1576e41f4b71Sopenharmony_ci**Parameters**
1577e41f4b71Sopenharmony_ci
1578e41f4b71Sopenharmony_ci| Name| Description| 
1579e41f4b71Sopenharmony_ci| -------- | -------- |
1580e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1581e41f4b71Sopenharmony_ci| data | Pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted. | 
1582e41f4b71Sopenharmony_ci| dataSize | Size of the image source buffer. | 
1583e41f4b71Sopenharmony_ci| ops | Pointer to the options for creating the image source. For details, see [OhosImageSourceOps](_ohos_image_source_ops.md). | 
1584e41f4b71Sopenharmony_ci| res | Pointer to an **ImageSource** object at the JavaScript native layer. | 
1585e41f4b71Sopenharmony_ci
1586e41f4b71Sopenharmony_ci**Returns**
1587e41f4b71Sopenharmony_ci
1588e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1589e41f4b71Sopenharmony_ci
1590e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1591e41f4b71Sopenharmony_ci
1592e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1593e41f4b71Sopenharmony_ci
1594e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1595e41f4b71Sopenharmony_ci
1596e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1597e41f4b71Sopenharmony_ci
1598e41f4b71Sopenharmony_ci**See**
1599e41f4b71Sopenharmony_ci
1600e41f4b71Sopenharmony_ci[OhosImageSourceOps](_ohos_image_source_ops.md)
1601e41f4b71Sopenharmony_ci
1602e41f4b71Sopenharmony_ci
1603e41f4b71Sopenharmony_ci### OH_ImageSource_CreateFromFd()
1604e41f4b71Sopenharmony_ci
1605e41f4b71Sopenharmony_ci```
1606e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreateFromFd (napi_env env, int32_t fd, struct OhosImageSourceOps * ops, napi_value * res )
1607e41f4b71Sopenharmony_ci```
1608e41f4b71Sopenharmony_ci
1609e41f4b71Sopenharmony_ci**Description**
1610e41f4b71Sopenharmony_ci
1611e41f4b71Sopenharmony_ciCreates an **ImageSource** object at the JavaScript native layer based on the specified file descriptor and [OhosImageSourceOps](_ohos_image_source_ops.md) struct.
1612e41f4b71Sopenharmony_ci
1613e41f4b71Sopenharmony_ci**Since**: 11
1614e41f4b71Sopenharmony_ci
1615e41f4b71Sopenharmony_ci**Parameters**
1616e41f4b71Sopenharmony_ci
1617e41f4b71Sopenharmony_ci| Name| Description| 
1618e41f4b71Sopenharmony_ci| -------- | -------- |
1619e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1620e41f4b71Sopenharmony_ci| fd | Descriptor of the image source. | 
1621e41f4b71Sopenharmony_ci| ops | Pointer to the options for creating the image source. For details, see [OhosImageSourceOps](_ohos_image_source_ops.md). | 
1622e41f4b71Sopenharmony_ci| res | Pointer to an **ImageSource** object at the JavaScript native layer. | 
1623e41f4b71Sopenharmony_ci
1624e41f4b71Sopenharmony_ci**Returns**
1625e41f4b71Sopenharmony_ci
1626e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1627e41f4b71Sopenharmony_ci
1628e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1629e41f4b71Sopenharmony_ci
1630e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1631e41f4b71Sopenharmony_ci
1632e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1633e41f4b71Sopenharmony_ci
1634e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1635e41f4b71Sopenharmony_ci
1636e41f4b71Sopenharmony_ci**See**
1637e41f4b71Sopenharmony_ci
1638e41f4b71Sopenharmony_ci[OhosImageSourceOps](_ohos_image_source_ops.md)
1639e41f4b71Sopenharmony_ci
1640e41f4b71Sopenharmony_ci
1641e41f4b71Sopenharmony_ci### OH_ImageSource_CreateFromRawFile()
1642e41f4b71Sopenharmony_ci
1643e41f4b71Sopenharmony_ci```
1644e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreateFromRawFile (napi_env env, RawFileDescriptor rawFile, struct OhosImageSourceOps * ops, napi_value * res )
1645e41f4b71Sopenharmony_ci```
1646e41f4b71Sopenharmony_ci
1647e41f4b71Sopenharmony_ci**Description**
1648e41f4b71Sopenharmony_ci
1649e41f4b71Sopenharmony_ciCreates an **ImageSource** object at the JavaScript native layer based on the specified raw file descriptor and [OhosImageSourceOps](_ohos_image_source_ops.md) struct.
1650e41f4b71Sopenharmony_ci
1651e41f4b71Sopenharmony_ci**Since**: 11
1652e41f4b71Sopenharmony_ci
1653e41f4b71Sopenharmony_ci**Parameters**
1654e41f4b71Sopenharmony_ci
1655e41f4b71Sopenharmony_ci| Name| Description| 
1656e41f4b71Sopenharmony_ci| -------- | -------- |
1657e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1658e41f4b71Sopenharmony_ci| rawFile | Descriptor of the image source resource. | 
1659e41f4b71Sopenharmony_ci| ops | Pointer to the options for creating the image source. For details, see [OhosImageSourceOps](_ohos_image_source_ops.md). | 
1660e41f4b71Sopenharmony_ci| res | Pointer to an **ImageSource** object at the JavaScript native layer. | 
1661e41f4b71Sopenharmony_ci
1662e41f4b71Sopenharmony_ci**Returns**
1663e41f4b71Sopenharmony_ci
1664e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1665e41f4b71Sopenharmony_ci
1666e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1667e41f4b71Sopenharmony_ci
1668e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1669e41f4b71Sopenharmony_ci
1670e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1671e41f4b71Sopenharmony_ci
1672e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1673e41f4b71Sopenharmony_ci
1674e41f4b71Sopenharmony_ci**See**
1675e41f4b71Sopenharmony_ci
1676e41f4b71Sopenharmony_ci[OhosImageSourceOps](_ohos_image_source_ops.md)
1677e41f4b71Sopenharmony_ci
1678e41f4b71Sopenharmony_ci
1679e41f4b71Sopenharmony_ci### OH_ImageSource_CreateFromUri()
1680e41f4b71Sopenharmony_ci
1681e41f4b71Sopenharmony_ci```
1682e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreateFromUri (napi_env env, char * uri, size_t size, struct OhosImageSourceOps * ops, napi_value * res )
1683e41f4b71Sopenharmony_ci```
1684e41f4b71Sopenharmony_ci
1685e41f4b71Sopenharmony_ci**Description**
1686e41f4b71Sopenharmony_ci
1687e41f4b71Sopenharmony_ciCreates an **ImageSource** object at the JavaScript native layer based on the specified URI and [OhosImageSourceOps](_ohos_image_source_ops.md) struct.
1688e41f4b71Sopenharmony_ci
1689e41f4b71Sopenharmony_ci**Since**: 11
1690e41f4b71Sopenharmony_ci
1691e41f4b71Sopenharmony_ci**Parameters**
1692e41f4b71Sopenharmony_ci
1693e41f4b71Sopenharmony_ci| Name| Description| 
1694e41f4b71Sopenharmony_ci| -------- | -------- |
1695e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1696e41f4b71Sopenharmony_ci| uri | Pointer to the image source URI. Only a file URI or Base64 URI is accepted. Currently, only absolute paths are supported. |
1697e41f4b71Sopenharmony_ci| size | Length of the image source URI. | 
1698e41f4b71Sopenharmony_ci| ops | Pointer to the options for creating the image source. For details, see [OhosImageSourceOps](_ohos_image_source_ops.md). | 
1699e41f4b71Sopenharmony_ci| res | Pointer to an **ImageSource** object at the JavaScript native layer. | 
1700e41f4b71Sopenharmony_ci
1701e41f4b71Sopenharmony_ci**Returns**
1702e41f4b71Sopenharmony_ci
1703e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1704e41f4b71Sopenharmony_ci
1705e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1706e41f4b71Sopenharmony_ci
1707e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1708e41f4b71Sopenharmony_ci
1709e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1710e41f4b71Sopenharmony_ci
1711e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1712e41f4b71Sopenharmony_ci
1713e41f4b71Sopenharmony_ci**See**
1714e41f4b71Sopenharmony_ci
1715e41f4b71Sopenharmony_ci[OhosImageSourceOps](_ohos_image_source_ops.md)
1716e41f4b71Sopenharmony_ci
1717e41f4b71Sopenharmony_ci
1718e41f4b71Sopenharmony_ci### OH_ImageSource_CreateIncremental()
1719e41f4b71Sopenharmony_ci
1720e41f4b71Sopenharmony_ci```
1721e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreateIncremental (napi_env env, struct OhosImageSource * source, struct OhosImageSourceOps * ops, napi_value * res )
1722e41f4b71Sopenharmony_ci```
1723e41f4b71Sopenharmony_ci
1724e41f4b71Sopenharmony_ci**Description**
1725e41f4b71Sopenharmony_ci
1726e41f4b71Sopenharmony_ciCreates an **ImageSource** object at the JavaScript native layer based on the specified [OhosImageSource](_ohos_image_source.md) and [OhosImageSourceOps](_ohos_image_source_ops.md) structs. The image source data will be updated through **OH_ImageSource_UpdateData**.
1727e41f4b71Sopenharmony_ci
1728e41f4b71Sopenharmony_ci**Since**: 10
1729e41f4b71Sopenharmony_ci
1730e41f4b71Sopenharmony_ci
1731e41f4b71Sopenharmony_ci**Deprecated from**: 11
1732e41f4b71Sopenharmony_ci
1733e41f4b71Sopenharmony_ci**Substitute**: [OH_ImageSource_CreateIncrementalFromData](#oh_imagesource_createincrementalfromdata)
1734e41f4b71Sopenharmony_ci
1735e41f4b71Sopenharmony_ci**Parameters**
1736e41f4b71Sopenharmony_ci
1737e41f4b71Sopenharmony_ci| Name| Description| 
1738e41f4b71Sopenharmony_ci| -------- | -------- |
1739e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1740e41f4b71Sopenharmony_ci| src | Pointer to the input resource of the image source. Only the buffer type is accepted. For details, see [OhosImageSource](_ohos_image_source.md). | 
1741e41f4b71Sopenharmony_ci| ops | Pointer to the options for creating the image source. For details, see [OhosImageSourceOps](_ohos_image_source_ops.md). | 
1742e41f4b71Sopenharmony_ci| res | Pointer to an **ImageSource** object at the JavaScript native layer. | 
1743e41f4b71Sopenharmony_ci
1744e41f4b71Sopenharmony_ci**Returns**
1745e41f4b71Sopenharmony_ci
1746e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1747e41f4b71Sopenharmony_ci
1748e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1749e41f4b71Sopenharmony_ci
1750e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1751e41f4b71Sopenharmony_ci
1752e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1753e41f4b71Sopenharmony_ci
1754e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1755e41f4b71Sopenharmony_ci
1756e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SOURCE_DATA_INCOMPLETE** if the image source data is incomplete.
1757e41f4b71Sopenharmony_ci
1758e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SOURCE_DATA** if the image source data is incorrect.
1759e41f4b71Sopenharmony_ci
1760e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
1761e41f4b71Sopenharmony_ci
1762e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_TOO_LARGE** if the image is too large.
1763e41f4b71Sopenharmony_ci
1764e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
1765e41f4b71Sopenharmony_ci
1766e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
1767e41f4b71Sopenharmony_ci
1768e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
1769e41f4b71Sopenharmony_ci
1770e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
1771e41f4b71Sopenharmony_ci
1772e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_FILE_DAMAGED** if the file is damaged.
1773e41f4b71Sopenharmony_ci
1774e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_FILE_FD_ERROR** if the file descriptor is incorrect.
1775e41f4b71Sopenharmony_ci
1776e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_STREAM_SIZE_ERROR** if the data stream is incorrect.
1777e41f4b71Sopenharmony_ci
1778e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SEEK_FAILED** if seeking the file fails.
1779e41f4b71Sopenharmony_ci
1780e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PEEK_FAILED** if peeking the file fails.
1781e41f4b71Sopenharmony_ci
1782e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_FREAD_FAILED** if reading the file fails.
1783e41f4b71Sopenharmony_ci
1784e41f4b71Sopenharmony_ci**See**
1785e41f4b71Sopenharmony_ci
1786e41f4b71Sopenharmony_ci[OhosImageSource](_ohos_image_source.md), [OhosImageSourceOps](_ohos_image_source_ops.md), [OH_ImageSource_UpdateData](#oh_imagesource_updatedata)
1787e41f4b71Sopenharmony_ci
1788e41f4b71Sopenharmony_ci
1789e41f4b71Sopenharmony_ci### OH_ImageSource_CreateIncrementalFromData()
1790e41f4b71Sopenharmony_ci
1791e41f4b71Sopenharmony_ci```
1792e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreateIncrementalFromData (napi_env env, uint8_t * data, size_t dataSize, struct OhosImageSourceOps * ops, napi_value * res )
1793e41f4b71Sopenharmony_ci```
1794e41f4b71Sopenharmony_ci
1795e41f4b71Sopenharmony_ci**Description**
1796e41f4b71Sopenharmony_ci
1797e41f4b71Sopenharmony_ciCreates an **ImageSource** object of the incremental type at the JavaScript native layer based on the specified image source buffer resource (defined by **data**) and [OhosImageSourceOps](_ohos_image_source_ops.md) struct. The image data is updated through **OH_ImageSource_UpdateData**. 
1798e41f4b71Sopenharmony_ci
1799e41f4b71Sopenharmony_ci**Since**: 11
1800e41f4b71Sopenharmony_ci
1801e41f4b71Sopenharmony_ci**Parameters**
1802e41f4b71Sopenharmony_ci
1803e41f4b71Sopenharmony_ci| Name| Description| 
1804e41f4b71Sopenharmony_ci| -------- | -------- |
1805e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
1806e41f4b71Sopenharmony_ci| data | Pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted. | 
1807e41f4b71Sopenharmony_ci| dataSize | Size of the image source buffer. | 
1808e41f4b71Sopenharmony_ci| ops | Pointer to the options for creating the image source. For details, see [OhosImageSourceOps](_ohos_image_source_ops.md). | 
1809e41f4b71Sopenharmony_ci| res | Pointer to an **ImageSource** object at the JavaScript native layer. | 
1810e41f4b71Sopenharmony_ci
1811e41f4b71Sopenharmony_ci**Returns**
1812e41f4b71Sopenharmony_ci
1813e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1814e41f4b71Sopenharmony_ci
1815e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1816e41f4b71Sopenharmony_ci
1817e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1818e41f4b71Sopenharmony_ci
1819e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1820e41f4b71Sopenharmony_ci
1821e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1822e41f4b71Sopenharmony_ci
1823e41f4b71Sopenharmony_ci**See**
1824e41f4b71Sopenharmony_ci
1825e41f4b71Sopenharmony_ci[OhosImageSourceOps](_ohos_image_source_ops.md)
1826e41f4b71Sopenharmony_ci
1827e41f4b71Sopenharmony_ci
1828e41f4b71Sopenharmony_ci### OH_ImageSource_CreatePixelMap()
1829e41f4b71Sopenharmony_ci
1830e41f4b71Sopenharmony_ci```
1831e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreatePixelMap (const ImageSourceNative * native, struct OhosImageDecodingOps * ops, napi_value * res )
1832e41f4b71Sopenharmony_ci```
1833e41f4b71Sopenharmony_ci
1834e41f4b71Sopenharmony_ci**Description**
1835e41f4b71Sopenharmony_ci
1836e41f4b71Sopenharmony_ciDecodes an **ImageSourceNative** object to obtain a **PixelMap** object at the JavaScript native layer based on the specified [OhosImageDecodingOps](_ohos_image_decoding_ops.md) struct.
1837e41f4b71Sopenharmony_ci
1838e41f4b71Sopenharmony_ci**Since**: 10
1839e41f4b71Sopenharmony_ci
1840e41f4b71Sopenharmony_ci**Parameters**
1841e41f4b71Sopenharmony_ci
1842e41f4b71Sopenharmony_ci| Name| Description| 
1843e41f4b71Sopenharmony_ci| -------- | -------- |
1844e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
1845e41f4b71Sopenharmony_ci| ops | Pointer to the options for decoding the image source. For details, see [OhosImageDecodingOps](_ohos_image_decoding_ops.md). | 
1846e41f4b71Sopenharmony_ci| res | Pointer to a **PixelMap** object at the JavaScript native layer. | 
1847e41f4b71Sopenharmony_ci
1848e41f4b71Sopenharmony_ci**Returns**
1849e41f4b71Sopenharmony_ci
1850e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1851e41f4b71Sopenharmony_ci
1852e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
1853e41f4b71Sopenharmony_ci
1854e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1855e41f4b71Sopenharmony_ci
1856e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1857e41f4b71Sopenharmony_ci
1858e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1859e41f4b71Sopenharmony_ci
1860e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
1861e41f4b71Sopenharmony_ci
1862e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
1863e41f4b71Sopenharmony_ci
1864e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
1865e41f4b71Sopenharmony_ci
1866e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
1867e41f4b71Sopenharmony_ci
1868e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_ENCODER_FAILED** if the encoder fails to be created.
1869e41f4b71Sopenharmony_ci
1870e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
1871e41f4b71Sopenharmony_ci
1872e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
1873e41f4b71Sopenharmony_ci
1874e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
1875e41f4b71Sopenharmony_ci
1876e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
1877e41f4b71Sopenharmony_ci
1878e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
1879e41f4b71Sopenharmony_ci
1880e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
1881e41f4b71Sopenharmony_ci
1882e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
1883e41f4b71Sopenharmony_ci
1884e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
1885e41f4b71Sopenharmony_ci
1886e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INIT_ABNORMAL** if the image fails to be initialized.
1887e41f4b71Sopenharmony_ci
1888e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
1889e41f4b71Sopenharmony_ci
1890e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
1891e41f4b71Sopenharmony_ci
1892e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
1893e41f4b71Sopenharmony_ci
1894e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
1895e41f4b71Sopenharmony_ci
1896e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ENCODE_FAILED** if the image fails to be encoded.
1897e41f4b71Sopenharmony_ci
1898e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_UNSUPPORT** if hardware decoding is not supported.
1899e41f4b71Sopenharmony_ci
1900e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_FAILED** if hardware decoding fails.
1901e41f4b71Sopenharmony_ci
1902e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_IPC** if IPC fails.
1903e41f4b71Sopenharmony_ci
1904e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
1905e41f4b71Sopenharmony_ci
1906e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
1907e41f4b71Sopenharmony_ci
1908e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
1909e41f4b71Sopenharmony_ci
1910e41f4b71Sopenharmony_ci**See**
1911e41f4b71Sopenharmony_ci
1912e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OhosImageDecodingOps](_ohos_image_decoding_ops.md)
1913e41f4b71Sopenharmony_ci
1914e41f4b71Sopenharmony_ci
1915e41f4b71Sopenharmony_ci### OH_ImageSource_CreatePixelMapList()
1916e41f4b71Sopenharmony_ci
1917e41f4b71Sopenharmony_ci```
1918e41f4b71Sopenharmony_ciint32_t OH_ImageSource_CreatePixelMapList (const ImageSourceNative * native, struct OhosImageDecodingOps * ops, napi_value * res )
1919e41f4b71Sopenharmony_ci```
1920e41f4b71Sopenharmony_ci
1921e41f4b71Sopenharmony_ci**Description**
1922e41f4b71Sopenharmony_ci
1923e41f4b71Sopenharmony_ciDecodes an **ImageSourceNative** object to obtain all **PixelMap** objects at the JavaScript native layer based on the specified [OhosImageDecodingOps](_ohos_image_decoding_ops.md) struct.
1924e41f4b71Sopenharmony_ci
1925e41f4b71Sopenharmony_ci
1926e41f4b71Sopenharmony_ci**Since**: 10
1927e41f4b71Sopenharmony_ci
1928e41f4b71Sopenharmony_ci**Parameters**
1929e41f4b71Sopenharmony_ci
1930e41f4b71Sopenharmony_ci| Name| Description| 
1931e41f4b71Sopenharmony_ci| -------- | -------- |
1932e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
1933e41f4b71Sopenharmony_ci| ops | Pointer to the options for decoding the image source. For details, see [OhosImageDecodingOps](_ohos_image_decoding_ops.md). | 
1934e41f4b71Sopenharmony_ci| res | Pointer to **PixelMap** objects at the JavaScript native layer. | 
1935e41f4b71Sopenharmony_ci
1936e41f4b71Sopenharmony_ci**Returns**
1937e41f4b71Sopenharmony_ci
1938e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
1939e41f4b71Sopenharmony_ci
1940e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
1941e41f4b71Sopenharmony_ci
1942e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
1943e41f4b71Sopenharmony_ci
1944e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
1945e41f4b71Sopenharmony_ci
1946e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
1947e41f4b71Sopenharmony_ci
1948e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
1949e41f4b71Sopenharmony_ci
1950e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
1951e41f4b71Sopenharmony_ci
1952e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
1953e41f4b71Sopenharmony_ci
1954e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
1955e41f4b71Sopenharmony_ci
1956e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_ENCODER_FAILED** if the encoder fails to be created.
1957e41f4b71Sopenharmony_ci
1958e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
1959e41f4b71Sopenharmony_ci
1960e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
1961e41f4b71Sopenharmony_ci
1962e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
1963e41f4b71Sopenharmony_ci
1964e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
1965e41f4b71Sopenharmony_ci
1966e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
1967e41f4b71Sopenharmony_ci
1968e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
1969e41f4b71Sopenharmony_ci
1970e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
1971e41f4b71Sopenharmony_ci
1972e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
1973e41f4b71Sopenharmony_ci
1974e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INIT_ABNORMAL** if the image fails to be initialized.
1975e41f4b71Sopenharmony_ci
1976e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
1977e41f4b71Sopenharmony_ci
1978e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
1979e41f4b71Sopenharmony_ci
1980e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
1981e41f4b71Sopenharmony_ci
1982e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
1983e41f4b71Sopenharmony_ci
1984e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ENCODE_FAILED** if the image fails to be encoded.
1985e41f4b71Sopenharmony_ci
1986e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_UNSUPPORT** if hardware decoding is not supported.
1987e41f4b71Sopenharmony_ci
1988e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_FAILED** if hardware decoding fails.
1989e41f4b71Sopenharmony_ci
1990e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_IPC** if IPC fails.
1991e41f4b71Sopenharmony_ci
1992e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
1993e41f4b71Sopenharmony_ci
1994e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
1995e41f4b71Sopenharmony_ci
1996e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
1997e41f4b71Sopenharmony_ci
1998e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
1999e41f4b71Sopenharmony_ci
2000e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
2001e41f4b71Sopenharmony_ci
2002e41f4b71Sopenharmony_ci**See**
2003e41f4b71Sopenharmony_ci
2004e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OhosImageDecodingOps](_ohos_image_decoding_ops.md)
2005e41f4b71Sopenharmony_ci
2006e41f4b71Sopenharmony_ci
2007e41f4b71Sopenharmony_ci### OH_ImageSource_GetDelayTime()
2008e41f4b71Sopenharmony_ci
2009e41f4b71Sopenharmony_ci```
2010e41f4b71Sopenharmony_ciint32_t OH_ImageSource_GetDelayTime (const ImageSourceNative * native, struct OhosImageSourceDelayTimeList * res )
2011e41f4b71Sopenharmony_ci```
2012e41f4b71Sopenharmony_ci
2013e41f4b71Sopenharmony_ci**Description**
2014e41f4b71Sopenharmony_ci
2015e41f4b71Sopenharmony_ciObtains the delay time list from an **ImageSourceNative** object (such as GIF image source).
2016e41f4b71Sopenharmony_ci
2017e41f4b71Sopenharmony_ci**Since**: 10
2018e41f4b71Sopenharmony_ci
2019e41f4b71Sopenharmony_ci**Parameters**
2020e41f4b71Sopenharmony_ci
2021e41f4b71Sopenharmony_ci| Name| Description| 
2022e41f4b71Sopenharmony_ci| -------- | -------- |
2023e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
2024e41f4b71Sopenharmony_ci| res | Pointer to the [OhosImageSourceDelayTimeList](_ohos_image_source_delay_time_list.md) object obtained. When the input **delayTimeList** is a null pointer and **size** is **0**, the size of the delay time list is returned through **size** in **res**. To obtain the complete delay time list, a space greater than **size** is required. | 
2025e41f4b71Sopenharmony_ci
2026e41f4b71Sopenharmony_ci**Returns**
2027e41f4b71Sopenharmony_ci
2028e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2029e41f4b71Sopenharmony_ci
2030e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2031e41f4b71Sopenharmony_ci
2032e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2033e41f4b71Sopenharmony_ci
2034e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2035e41f4b71Sopenharmony_ci
2036e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2037e41f4b71Sopenharmony_ci
2038e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2039e41f4b71Sopenharmony_ci
2040e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2041e41f4b71Sopenharmony_ci
2042e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2043e41f4b71Sopenharmony_ci
2044e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2045e41f4b71Sopenharmony_ci
2046e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2047e41f4b71Sopenharmony_ci
2048e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2049e41f4b71Sopenharmony_ci
2050e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2051e41f4b71Sopenharmony_ci
2052e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
2053e41f4b71Sopenharmony_ci
2054e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2055e41f4b71Sopenharmony_ci
2056e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2057e41f4b71Sopenharmony_ci
2058e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2059e41f4b71Sopenharmony_ci
2060e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
2061e41f4b71Sopenharmony_ci
2062e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
2063e41f4b71Sopenharmony_ci
2064e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
2065e41f4b71Sopenharmony_ci
2066e41f4b71Sopenharmony_ci**See**
2067e41f4b71Sopenharmony_ci
2068e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OhosImageSourceDelayTimeList](_ohos_image_source_delay_time_list.md)
2069e41f4b71Sopenharmony_ci
2070e41f4b71Sopenharmony_ci
2071e41f4b71Sopenharmony_ci### OH_ImageSource_GetFrameCount()
2072e41f4b71Sopenharmony_ci
2073e41f4b71Sopenharmony_ci```
2074e41f4b71Sopenharmony_ciint32_t OH_ImageSource_GetFrameCount (const ImageSourceNative * native, uint32_t * res )
2075e41f4b71Sopenharmony_ci```
2076e41f4b71Sopenharmony_ci
2077e41f4b71Sopenharmony_ci**Description**
2078e41f4b71Sopenharmony_ci
2079e41f4b71Sopenharmony_ciObtains the number of frames from an **ImageSourceNative** object.
2080e41f4b71Sopenharmony_ci
2081e41f4b71Sopenharmony_ci**Since**: 10
2082e41f4b71Sopenharmony_ci
2083e41f4b71Sopenharmony_ci**Parameters**
2084e41f4b71Sopenharmony_ci
2085e41f4b71Sopenharmony_ci| Name| Description| 
2086e41f4b71Sopenharmony_ci| -------- | -------- |
2087e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
2088e41f4b71Sopenharmony_ci| res | Pointer to the frame count. | 
2089e41f4b71Sopenharmony_ci
2090e41f4b71Sopenharmony_ci**Returns**
2091e41f4b71Sopenharmony_ci
2092e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2093e41f4b71Sopenharmony_ci
2094e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2095e41f4b71Sopenharmony_ci
2096e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2097e41f4b71Sopenharmony_ci
2098e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2099e41f4b71Sopenharmony_ci
2100e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2101e41f4b71Sopenharmony_ci
2102e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2103e41f4b71Sopenharmony_ci
2104e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2105e41f4b71Sopenharmony_ci
2106e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2107e41f4b71Sopenharmony_ci
2108e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2109e41f4b71Sopenharmony_ci
2110e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2111e41f4b71Sopenharmony_ci
2112e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2113e41f4b71Sopenharmony_ci
2114e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2115e41f4b71Sopenharmony_ci
2116e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
2117e41f4b71Sopenharmony_ci
2118e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2119e41f4b71Sopenharmony_ci
2120e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2121e41f4b71Sopenharmony_ci
2122e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2123e41f4b71Sopenharmony_ci
2124e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
2125e41f4b71Sopenharmony_ci
2126e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
2127e41f4b71Sopenharmony_ci
2128e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
2129e41f4b71Sopenharmony_ci
2130e41f4b71Sopenharmony_ci**See**
2131e41f4b71Sopenharmony_ci
2132e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative)
2133e41f4b71Sopenharmony_ci
2134e41f4b71Sopenharmony_ci
2135e41f4b71Sopenharmony_ci### OH_ImageSource_GetImageInfo()
2136e41f4b71Sopenharmony_ci
2137e41f4b71Sopenharmony_ci```
2138e41f4b71Sopenharmony_ciint32_t OH_ImageSource_GetImageInfo (const ImageSourceNative * native, int32_t index, struct OhosImageSourceInfo * info )
2139e41f4b71Sopenharmony_ci```
2140e41f4b71Sopenharmony_ci
2141e41f4b71Sopenharmony_ci**Description**
2142e41f4b71Sopenharmony_ci
2143e41f4b71Sopenharmony_ciObtains image source information from an **ImageSourceNative** object by index.
2144e41f4b71Sopenharmony_ci
2145e41f4b71Sopenharmony_ci**Since**: 10
2146e41f4b71Sopenharmony_ci
2147e41f4b71Sopenharmony_ci**Parameters**
2148e41f4b71Sopenharmony_ci
2149e41f4b71Sopenharmony_ci| Name| Description| 
2150e41f4b71Sopenharmony_ci| -------- | -------- |
2151e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
2152e41f4b71Sopenharmony_ci| index | Index. | 
2153e41f4b71Sopenharmony_ci| info | Pointer to the [OhosImageSourceInfo](_ohos_image_source_info.md) object obtained. | 
2154e41f4b71Sopenharmony_ci
2155e41f4b71Sopenharmony_ci**Returns**
2156e41f4b71Sopenharmony_ci
2157e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2158e41f4b71Sopenharmony_ci
2159e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2160e41f4b71Sopenharmony_ci
2161e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2162e41f4b71Sopenharmony_ci
2163e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2164e41f4b71Sopenharmony_ci
2165e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2166e41f4b71Sopenharmony_ci
2167e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2168e41f4b71Sopenharmony_ci
2169e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2170e41f4b71Sopenharmony_ci
2171e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2172e41f4b71Sopenharmony_ci
2173e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2174e41f4b71Sopenharmony_ci
2175e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2176e41f4b71Sopenharmony_ci
2177e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2178e41f4b71Sopenharmony_ci
2179e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2180e41f4b71Sopenharmony_ci
2181e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
2182e41f4b71Sopenharmony_ci
2183e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2184e41f4b71Sopenharmony_ci
2185e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2186e41f4b71Sopenharmony_ci
2187e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2188e41f4b71Sopenharmony_ci
2189e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
2190e41f4b71Sopenharmony_ci
2191e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
2192e41f4b71Sopenharmony_ci
2193e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
2194e41f4b71Sopenharmony_ci
2195e41f4b71Sopenharmony_ci
2196e41f4b71Sopenharmony_ci**See**
2197e41f4b71Sopenharmony_ci
2198e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OhosImageSourceInfo](_ohos_image_source_info.md)
2199e41f4b71Sopenharmony_ci
2200e41f4b71Sopenharmony_ci
2201e41f4b71Sopenharmony_ci### OH_ImageSource_GetImageProperty()
2202e41f4b71Sopenharmony_ci
2203e41f4b71Sopenharmony_ci```
2204e41f4b71Sopenharmony_ciint32_t OH_ImageSource_GetImageProperty (const ImageSourceNative * native, struct OhosImageSourceProperty * key, struct OhosImageSourceProperty * value )
2205e41f4b71Sopenharmony_ci```
2206e41f4b71Sopenharmony_ci
2207e41f4b71Sopenharmony_ci**Description**
2208e41f4b71Sopenharmony_ci
2209e41f4b71Sopenharmony_ciObtains the value of an image property from an **ImageSourceNative** object.
2210e41f4b71Sopenharmony_ci
2211e41f4b71Sopenharmony_ci**Since**: 10
2212e41f4b71Sopenharmony_ci
2213e41f4b71Sopenharmony_ci**Parameters**
2214e41f4b71Sopenharmony_ci
2215e41f4b71Sopenharmony_ci| Name| Description| 
2216e41f4b71Sopenharmony_ci| -------- | -------- |
2217e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
2218e41f4b71Sopenharmony_ci| key | Pointer to the property. For details, see [OhosImageSourceProperty](_ohos_image_source_property.md). | 
2219e41f4b71Sopenharmony_ci| value | Pointer to the [OhosImageSourceProperty](_ohos_image_source_property.md) object obtained. If the input **value** is a null pointer and **size** is **0**, the size of the property value is returned through **size** in **value**. To obtain the complete property value, a space greater than **size** is required. | 
2220e41f4b71Sopenharmony_ci
2221e41f4b71Sopenharmony_ci**Returns**
2222e41f4b71Sopenharmony_ci
2223e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2224e41f4b71Sopenharmony_ci
2225e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2226e41f4b71Sopenharmony_ci
2227e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2228e41f4b71Sopenharmony_ci
2229e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2230e41f4b71Sopenharmony_ci
2231e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2232e41f4b71Sopenharmony_ci
2233e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2234e41f4b71Sopenharmony_ci
2235e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2236e41f4b71Sopenharmony_ci
2237e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2238e41f4b71Sopenharmony_ci
2239e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2240e41f4b71Sopenharmony_ci
2241e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2242e41f4b71Sopenharmony_ci
2243e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2244e41f4b71Sopenharmony_ci
2245e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2246e41f4b71Sopenharmony_ci
2247e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
2248e41f4b71Sopenharmony_ci
2249e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2250e41f4b71Sopenharmony_ci
2251e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2252e41f4b71Sopenharmony_ci
2253e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2254e41f4b71Sopenharmony_ci
2255e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
2256e41f4b71Sopenharmony_ci
2257e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
2258e41f4b71Sopenharmony_ci
2259e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
2260e41f4b71Sopenharmony_ci
2261e41f4b71Sopenharmony_ci**See**
2262e41f4b71Sopenharmony_ci
2263e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OhosImageSourceProperty](_ohos_image_source_property.md)
2264e41f4b71Sopenharmony_ci
2265e41f4b71Sopenharmony_ci
2266e41f4b71Sopenharmony_ci### OH_ImageSource_GetSupportedFormats()
2267e41f4b71Sopenharmony_ci
2268e41f4b71Sopenharmony_ci```
2269e41f4b71Sopenharmony_ciint32_t OH_ImageSource_GetSupportedFormats (struct OhosImageSourceSupportedFormatList * res)
2270e41f4b71Sopenharmony_ci```
2271e41f4b71Sopenharmony_ci
2272e41f4b71Sopenharmony_ci**Description**
2273e41f4b71Sopenharmony_ci
2274e41f4b71Sopenharmony_ciObtains all supported decoding formats.
2275e41f4b71Sopenharmony_ci
2276e41f4b71Sopenharmony_ci**Since**: 10
2277e41f4b71Sopenharmony_ci
2278e41f4b71Sopenharmony_ci**Parameters**
2279e41f4b71Sopenharmony_ci
2280e41f4b71Sopenharmony_ci| Name| Description| 
2281e41f4b71Sopenharmony_ci| -------- | -------- |
2282e41f4b71Sopenharmony_ci| res | Pointer to the [OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md) struct. If the input **supportedFormatList** is a null pointer and **size** is 0, the size of the supported formats is returned through **size** in **res**.<br>To obtain all formats, a space larger than **size** is required. In addition, sufficient space must be reserved for each format supported.| 
2283e41f4b71Sopenharmony_ci
2284e41f4b71Sopenharmony_ci**Returns**
2285e41f4b71Sopenharmony_ci
2286e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2287e41f4b71Sopenharmony_ci
2288e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2289e41f4b71Sopenharmony_ci
2290e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2291e41f4b71Sopenharmony_ci
2292e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2293e41f4b71Sopenharmony_ci
2294e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2295e41f4b71Sopenharmony_ci
2296e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2297e41f4b71Sopenharmony_ci
2298e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2299e41f4b71Sopenharmony_ci
2300e41f4b71Sopenharmony_ci**See**
2301e41f4b71Sopenharmony_ci
2302e41f4b71Sopenharmony_ci[OhosImageSourceSupportedFormatList](_ohos_image_source_supported_format_list.md), [OhosImageSourceSupportedFormat](_ohos_image_source_supported_format.md)
2303e41f4b71Sopenharmony_ci
2304e41f4b71Sopenharmony_ci
2305e41f4b71Sopenharmony_ci### OH_ImageSource_InitNative()
2306e41f4b71Sopenharmony_ci
2307e41f4b71Sopenharmony_ci```
2308e41f4b71Sopenharmony_ciImageSourceNative* OH_ImageSource_InitNative (napi_env env, napi_value source )
2309e41f4b71Sopenharmony_ci```
2310e41f4b71Sopenharmony_ci
2311e41f4b71Sopenharmony_ci**Description**
2312e41f4b71Sopenharmony_ci
2313e41f4b71Sopenharmony_ciConverts an **ImageSource** object at the JavaScript native layer into an [ImageSourceNative](#imagesourcenative) object.
2314e41f4b71Sopenharmony_ci
2315e41f4b71Sopenharmony_ci**Since**: 10
2316e41f4b71Sopenharmony_ci
2317e41f4b71Sopenharmony_ci**Parameters**
2318e41f4b71Sopenharmony_ci
2319e41f4b71Sopenharmony_ci| Name| Description| 
2320e41f4b71Sopenharmony_ci| -------- | -------- |
2321e41f4b71Sopenharmony_ci| env | Pointer to the JNI environment. | 
2322e41f4b71Sopenharmony_ci| source | Pointer to an **ImageSource** object at the JavaScript native layer. | 
2323e41f4b71Sopenharmony_ci
2324e41f4b71Sopenharmony_ci**Returns**
2325e41f4b71Sopenharmony_ci
2326e41f4b71Sopenharmony_ciReturns a pointer to the [ImageSourceNative](#imagesourcenative) object if the operation is successful; returns a null pointer otherwise.
2327e41f4b71Sopenharmony_ci
2328e41f4b71Sopenharmony_ci**See**
2329e41f4b71Sopenharmony_ci
2330e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OH_ImageSource_Release](#oh_imagesource_release)
2331e41f4b71Sopenharmony_ci
2332e41f4b71Sopenharmony_ci
2333e41f4b71Sopenharmony_ci### OH_ImageSource_ModifyImageProperty()
2334e41f4b71Sopenharmony_ci
2335e41f4b71Sopenharmony_ci```
2336e41f4b71Sopenharmony_ciint32_t OH_ImageSource_ModifyImageProperty (const ImageSourceNative * native, struct OhosImageSourceProperty * key, struct OhosImageSourceProperty * value )
2337e41f4b71Sopenharmony_ci```
2338e41f4b71Sopenharmony_ci
2339e41f4b71Sopenharmony_ci**Description**
2340e41f4b71Sopenharmony_ci
2341e41f4b71Sopenharmony_ciModifies the value of an image property of an **ImageSourceNative** object.
2342e41f4b71Sopenharmony_ci
2343e41f4b71Sopenharmony_ci**Since**: 10
2344e41f4b71Sopenharmony_ci
2345e41f4b71Sopenharmony_ci**Parameters**
2346e41f4b71Sopenharmony_ci
2347e41f4b71Sopenharmony_ci| Name| Description| 
2348e41f4b71Sopenharmony_ci| -------- | -------- |
2349e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
2350e41f4b71Sopenharmony_ci| key | Pointer to the property. For details, see [OhosImageSourceProperty](_ohos_image_source_property.md). | 
2351e41f4b71Sopenharmony_ci| value | Pointer to the new value of the property. | 
2352e41f4b71Sopenharmony_ci
2353e41f4b71Sopenharmony_ci**Returns**
2354e41f4b71Sopenharmony_ci
2355e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2356e41f4b71Sopenharmony_ci
2357e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2358e41f4b71Sopenharmony_ci
2359e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2360e41f4b71Sopenharmony_ci
2361e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2362e41f4b71Sopenharmony_ci
2363e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2364e41f4b71Sopenharmony_ci
2365e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2366e41f4b71Sopenharmony_ci
2367e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2368e41f4b71Sopenharmony_ci
2369e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2370e41f4b71Sopenharmony_ci
2371e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2372e41f4b71Sopenharmony_ci
2373e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2374e41f4b71Sopenharmony_ci
2375e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2376e41f4b71Sopenharmony_ci
2377e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2378e41f4b71Sopenharmony_ci
2379e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
2380e41f4b71Sopenharmony_ci
2381e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2382e41f4b71Sopenharmony_ci
2383e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2384e41f4b71Sopenharmony_ci
2385e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2386e41f4b71Sopenharmony_ci
2387e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
2388e41f4b71Sopenharmony_ci
2389e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_EXIF_UNSUPPORT** if EXIF is not supported for image decoding.
2390e41f4b71Sopenharmony_ci
2391e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PROPERTY_NOT_EXIST** if the image property does not exist.
2392e41f4b71Sopenharmony_ci
2393e41f4b71Sopenharmony_ci**See**
2394e41f4b71Sopenharmony_ci
2395e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OhosImageSourceProperty](_ohos_image_source_property.md)
2396e41f4b71Sopenharmony_ci
2397e41f4b71Sopenharmony_ci
2398e41f4b71Sopenharmony_ci### OH_ImageSource_Release()
2399e41f4b71Sopenharmony_ci
2400e41f4b71Sopenharmony_ci```
2401e41f4b71Sopenharmony_ciint32_t OH_ImageSource_Release (ImageSourceNative * native)
2402e41f4b71Sopenharmony_ci```
2403e41f4b71Sopenharmony_ci
2404e41f4b71Sopenharmony_ci**Description**
2405e41f4b71Sopenharmony_ci
2406e41f4b71Sopenharmony_ciReleases an **ImageSourceNative** object.
2407e41f4b71Sopenharmony_ci
2408e41f4b71Sopenharmony_ci**Since**: 10
2409e41f4b71Sopenharmony_ci
2410e41f4b71Sopenharmony_ci**Parameters**
2411e41f4b71Sopenharmony_ci
2412e41f4b71Sopenharmony_ci| Name| Description| 
2413e41f4b71Sopenharmony_ci| -------- | -------- |
2414e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
2415e41f4b71Sopenharmony_ci
2416e41f4b71Sopenharmony_ci**Returns**
2417e41f4b71Sopenharmony_ci
2418e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2419e41f4b71Sopenharmony_ci
2420e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2421e41f4b71Sopenharmony_ci
2422e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2423e41f4b71Sopenharmony_ci
2424e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2425e41f4b71Sopenharmony_ci
2426e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2427e41f4b71Sopenharmony_ci
2428e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2429e41f4b71Sopenharmony_ci
2430e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2431e41f4b71Sopenharmony_ci
2432e41f4b71Sopenharmony_ci**See**
2433e41f4b71Sopenharmony_ci
2434e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OH_ImageSource_Create](#oh_imagesource_create), [OH_ImageSource_CreateIncremental](#oh_imagesource_createincremental)
2435e41f4b71Sopenharmony_ci
2436e41f4b71Sopenharmony_ci
2437e41f4b71Sopenharmony_ci### OH_ImageSource_UpdateData()
2438e41f4b71Sopenharmony_ci
2439e41f4b71Sopenharmony_ci```
2440e41f4b71Sopenharmony_ciint32_t OH_ImageSource_UpdateData (const ImageSourceNative * native, struct OhosImageSourceUpdateData * data )
2441e41f4b71Sopenharmony_ci```
2442e41f4b71Sopenharmony_ci
2443e41f4b71Sopenharmony_ci**Description**
2444e41f4b71Sopenharmony_ci
2445e41f4b71Sopenharmony_ciUpdates the data of an **ImageSourceNative** object.
2446e41f4b71Sopenharmony_ci
2447e41f4b71Sopenharmony_ci**Since**: 10
2448e41f4b71Sopenharmony_ci
2449e41f4b71Sopenharmony_ci**Parameters**
2450e41f4b71Sopenharmony_ci
2451e41f4b71Sopenharmony_ci| Name| Description| 
2452e41f4b71Sopenharmony_ci| -------- | -------- |
2453e41f4b71Sopenharmony_ci| native | Pointer to an [ImageSourceNative](#imagesourcenative) object. | 
2454e41f4b71Sopenharmony_ci| data | Pointer to the update data. For details, see [OhosImageSourceUpdateData](_ohos_image_source_update_data.md). | 
2455e41f4b71Sopenharmony_ci
2456e41f4b71Sopenharmony_ci**Returns**
2457e41f4b71Sopenharmony_ci
2458e41f4b71Sopenharmony_ci
2459e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful.
2460e41f4b71Sopenharmony_ci
2461e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2462e41f4b71Sopenharmony_ci
2463e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2464e41f4b71Sopenharmony_ci
2465e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2466e41f4b71Sopenharmony_ci
2467e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2468e41f4b71Sopenharmony_ci
2469e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2470e41f4b71Sopenharmony_ci
2471e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2472e41f4b71Sopenharmony_ci
2473e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2474e41f4b71Sopenharmony_ci
2475e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_ENCODER_FAILED** if the encoder fails to be created.
2476e41f4b71Sopenharmony_ci
2477e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2478e41f4b71Sopenharmony_ci
2479e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2480e41f4b71Sopenharmony_ci
2481e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2482e41f4b71Sopenharmony_ci
2483e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
2484e41f4b71Sopenharmony_ci
2485e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
2486e41f4b71Sopenharmony_ci
2487e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2488e41f4b71Sopenharmony_ci
2489e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
2490e41f4b71Sopenharmony_ci
2491e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the image type is not supported.
2492e41f4b71Sopenharmony_ci
2493e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INIT_ABNORMAL** if the image fails to be initialized.
2494e41f4b71Sopenharmony_ci
2495e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
2496e41f4b71Sopenharmony_ci
2497e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2498e41f4b71Sopenharmony_ci
2499e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2500e41f4b71Sopenharmony_ci
2501e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2502e41f4b71Sopenharmony_ci
2503e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ENCODE_FAILED** if the image fails to be encoded.
2504e41f4b71Sopenharmony_ci
2505e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_UNSUPPORT** if hardware decoding is not supported.
2506e41f4b71Sopenharmony_ci
2507e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_FAILED** if hardware decoding fails.
2508e41f4b71Sopenharmony_ci
2509e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_IPC** if IPC fails.
2510e41f4b71Sopenharmony_ci
2511e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if the index is invalid.
2512e41f4b71Sopenharmony_ci
2513e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
2514e41f4b71Sopenharmony_ci
2515e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
2516e41f4b71Sopenharmony_ci
2517e41f4b71Sopenharmony_ci
2518e41f4b71Sopenharmony_ci**See**
2519e41f4b71Sopenharmony_ci
2520e41f4b71Sopenharmony_ci[ImageSourceNative](#imagesourcenative), [OhosImageSourceUpdateData](_ohos_image_source_update_data.md)
2521e41f4b71Sopenharmony_ci
2522e41f4b71Sopenharmony_ci
2523e41f4b71Sopenharmony_ci### OH_PixelMap_AccessPixels()
2524e41f4b71Sopenharmony_ci
2525e41f4b71Sopenharmony_ci```
2526e41f4b71Sopenharmony_ciint32_t OH_PixelMap_AccessPixels (const NativePixelMap * native, void ** addr )
2527e41f4b71Sopenharmony_ci```
2528e41f4b71Sopenharmony_ci
2529e41f4b71Sopenharmony_ci**Description**
2530e41f4b71Sopenharmony_ci
2531e41f4b71Sopenharmony_ciObtains the memory address of a **NativePixelMap** object and locks the memory.
2532e41f4b71Sopenharmony_ci
2533e41f4b71Sopenharmony_ci**Since**: 10
2534e41f4b71Sopenharmony_ci
2535e41f4b71Sopenharmony_ci**Parameters**
2536e41f4b71Sopenharmony_ci
2537e41f4b71Sopenharmony_ci| Name| Description| 
2538e41f4b71Sopenharmony_ci| -------- | -------- |
2539e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
2540e41f4b71Sopenharmony_ci| addr | Double pointer to the memory address. | 
2541e41f4b71Sopenharmony_ci
2542e41f4b71Sopenharmony_ci**Returns**
2543e41f4b71Sopenharmony_ci
2544e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2545e41f4b71Sopenharmony_ci
2546e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
2547e41f4b71Sopenharmony_ci
2548e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2549e41f4b71Sopenharmony_ci
2550e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2551e41f4b71Sopenharmony_ci
2552e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2553e41f4b71Sopenharmony_ci
2554e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2555e41f4b71Sopenharmony_ci
2556e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2557e41f4b71Sopenharmony_ci
2558e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2559e41f4b71Sopenharmony_ci
2560e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2561e41f4b71Sopenharmony_ci
2562e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2563e41f4b71Sopenharmony_ci
2564e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
2565e41f4b71Sopenharmony_ci
2566e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
2567e41f4b71Sopenharmony_ci
2568e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
2569e41f4b71Sopenharmony_ci
2570e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
2571e41f4b71Sopenharmony_ci
2572e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
2573e41f4b71Sopenharmony_ci
2574e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2575e41f4b71Sopenharmony_ci
2576e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2577e41f4b71Sopenharmony_ci
2578e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2579e41f4b71Sopenharmony_ci
2580e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
2581e41f4b71Sopenharmony_ci
2582e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
2583e41f4b71Sopenharmony_ci
2584e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
2585e41f4b71Sopenharmony_ci
2586e41f4b71Sopenharmony_ci
2587e41f4b71Sopenharmony_ci
2588e41f4b71Sopenharmony_ci
2589e41f4b71Sopenharmony_ci### OH_PixelMap_CreateAlphaPixelMap()
2590e41f4b71Sopenharmony_ci
2591e41f4b71Sopenharmony_ci```
2592e41f4b71Sopenharmony_ciint32_t OH_PixelMap_CreateAlphaPixelMap (napi_env env, napi_value source, napi_value * alpha )
2593e41f4b71Sopenharmony_ci```
2594e41f4b71Sopenharmony_ci
2595e41f4b71Sopenharmony_ci**Description**
2596e41f4b71Sopenharmony_ci
2597e41f4b71Sopenharmony_ciCreates a **PixelMap** object that contains only alpha channel information.
2598e41f4b71Sopenharmony_ci
2599e41f4b71Sopenharmony_ci**Since**: 10
2600e41f4b71Sopenharmony_ci
2601e41f4b71Sopenharmony_ci**Parameters**
2602e41f4b71Sopenharmony_ci
2603e41f4b71Sopenharmony_ci| Name| Description| 
2604e41f4b71Sopenharmony_ci| -------- | -------- |
2605e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
2606e41f4b71Sopenharmony_ci| source | Options for setting the **PixelMap** object. | 
2607e41f4b71Sopenharmony_ci| alpha | Pointer to the alpha channel. | 
2608e41f4b71Sopenharmony_ci
2609e41f4b71Sopenharmony_ci**Returns**
2610e41f4b71Sopenharmony_ci
2611e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2612e41f4b71Sopenharmony_ci
2613e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
2614e41f4b71Sopenharmony_ci
2615e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2616e41f4b71Sopenharmony_ci
2617e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2618e41f4b71Sopenharmony_ci
2619e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2620e41f4b71Sopenharmony_ci
2621e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2622e41f4b71Sopenharmony_ci
2623e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2624e41f4b71Sopenharmony_ci
2625e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2626e41f4b71Sopenharmony_ci
2627e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2628e41f4b71Sopenharmony_ci
2629e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_ENCODER_FAILED** if the encoder fails to be created.
2630e41f4b71Sopenharmony_ci
2631e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2632e41f4b71Sopenharmony_ci
2633e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2634e41f4b71Sopenharmony_ci
2635e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2636e41f4b71Sopenharmony_ci
2637e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
2638e41f4b71Sopenharmony_ci
2639e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
2640e41f4b71Sopenharmony_ci
2641e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2642e41f4b71Sopenharmony_ci
2643e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
2644e41f4b71Sopenharmony_ci
2645e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
2646e41f4b71Sopenharmony_ci
2647e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INIT_ABNORMAL** if the image fails to be initialized.
2648e41f4b71Sopenharmony_ci
2649e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
2650e41f4b71Sopenharmony_ci
2651e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2652e41f4b71Sopenharmony_ci
2653e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2654e41f4b71Sopenharmony_ci
2655e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2656e41f4b71Sopenharmony_ci
2657e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ENCODE_FAILED** if the image fails to be encoded.
2658e41f4b71Sopenharmony_ci
2659e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_UNSUPPORT** if hardware decoding is not supported.
2660e41f4b71Sopenharmony_ci
2661e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_FAILED** if hardware decoding fails.
2662e41f4b71Sopenharmony_ci
2663e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_IPC** if IPC fails.
2664e41f4b71Sopenharmony_ci
2665e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
2666e41f4b71Sopenharmony_ci
2667e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
2668e41f4b71Sopenharmony_ci
2669e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
2670e41f4b71Sopenharmony_ci
2671e41f4b71Sopenharmony_ci
2672e41f4b71Sopenharmony_ci### OH_PixelMap_CreatePixelMap()
2673e41f4b71Sopenharmony_ci
2674e41f4b71Sopenharmony_ci```
2675e41f4b71Sopenharmony_ciint32_t OH_PixelMap_CreatePixelMap (napi_env env, OhosPixelMapCreateOps info, void * buf, size_t len, napi_value * res )
2676e41f4b71Sopenharmony_ci```
2677e41f4b71Sopenharmony_ci
2678e41f4b71Sopenharmony_ci**Description**
2679e41f4b71Sopenharmony_ci
2680e41f4b71Sopenharmony_ciCreates a **PixelMap** object. Currently, only BGRA input streams are supported. The buffer passed in by this API does not support the stride.
2681e41f4b71Sopenharmony_ci
2682e41f4b71Sopenharmony_ci**Since**: 10
2683e41f4b71Sopenharmony_ci
2684e41f4b71Sopenharmony_ci**Parameters**
2685e41f4b71Sopenharmony_ci
2686e41f4b71Sopenharmony_ci| Name| Description| 
2687e41f4b71Sopenharmony_ci| -------- | -------- |
2688e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
2689e41f4b71Sopenharmony_ci| info |Options for setting the **PixelMap** object. | 
2690e41f4b71Sopenharmony_ci| buf | Pointer to the buffer of the image. | 
2691e41f4b71Sopenharmony_ci| len | Image size. | 
2692e41f4b71Sopenharmony_ci| res | Pointer to the **PixelMap** object at the application layer. | 
2693e41f4b71Sopenharmony_ci
2694e41f4b71Sopenharmony_ci**Returns**
2695e41f4b71Sopenharmony_ci
2696e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2697e41f4b71Sopenharmony_ci
2698e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
2699e41f4b71Sopenharmony_ci
2700e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2701e41f4b71Sopenharmony_ci
2702e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2703e41f4b71Sopenharmony_ci
2704e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2705e41f4b71Sopenharmony_ci
2706e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2707e41f4b71Sopenharmony_ci
2708e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2709e41f4b71Sopenharmony_ci
2710e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_HEAD_ABNORMAL** if an error occurs during decoding of the image header.
2711e41f4b71Sopenharmony_ci
2712e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_DECODER_FAILED** if the decoder fails to be created.
2713e41f4b71Sopenharmony_ci
2714e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CREATE_ENCODER_FAILED** if the encoder fails to be created.
2715e41f4b71Sopenharmony_ci
2716e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2717e41f4b71Sopenharmony_ci
2718e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2719e41f4b71Sopenharmony_ci
2720e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2721e41f4b71Sopenharmony_ci
2722e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
2723e41f4b71Sopenharmony_ci
2724e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
2725e41f4b71Sopenharmony_ci
2726e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_ABNORMAL** if image decoding fails.
2727e41f4b71Sopenharmony_ci
2728e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
2729e41f4b71Sopenharmony_ci
2730e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
2731e41f4b71Sopenharmony_ci
2732e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INIT_ABNORMAL** if the image fails to be initialized.
2733e41f4b71Sopenharmony_ci
2734e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
2735e41f4b71Sopenharmony_ci
2736e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2737e41f4b71Sopenharmony_ci
2738e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2739e41f4b71Sopenharmony_ci
2740e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2741e41f4b71Sopenharmony_ci
2742e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ENCODE_FAILED** if the image fails to be encoded.
2743e41f4b71Sopenharmony_ci
2744e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_UNSUPPORT** if hardware decoding is not supported.
2745e41f4b71Sopenharmony_ci
2746e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_HW_DECODE_FAILED** if hardware decoding fails.
2747e41f4b71Sopenharmony_ci
2748e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_IPC** if IPC fails.
2749e41f4b71Sopenharmony_ci
2750e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
2751e41f4b71Sopenharmony_ci
2752e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
2753e41f4b71Sopenharmony_ci
2754e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
2755e41f4b71Sopenharmony_ci
2756e41f4b71Sopenharmony_ci
2757e41f4b71Sopenharmony_ci
2758e41f4b71Sopenharmony_ci### OH_PixelMap_CreatePixelMapWithStride()
2759e41f4b71Sopenharmony_ci
2760e41f4b71Sopenharmony_ci```
2761e41f4b71Sopenharmony_ciint32_t OH_PixelMap_CreatePixelMapWithStride (napi_env env, OhosPixelMapCreateOps info, void * buf, size_t len, int32_t rowStride, napi_value * res )
2762e41f4b71Sopenharmony_ci```
2763e41f4b71Sopenharmony_ci
2764e41f4b71Sopenharmony_ci**Description**
2765e41f4b71Sopenharmony_ci
2766e41f4b71Sopenharmony_ciCreates a **PixelMap** object. Currently, only BGRA input streams are supported. For a pixel map in RGBA format (with the size greater than 512\*512), DMA memory is used by default.
2767e41f4b71Sopenharmony_ci
2768e41f4b71Sopenharmony_ci**Since**: 12
2769e41f4b71Sopenharmony_ci
2770e41f4b71Sopenharmony_ci**Parameters**
2771e41f4b71Sopenharmony_ci
2772e41f4b71Sopenharmony_ci| Name| Description| 
2773e41f4b71Sopenharmony_ci| -------- | -------- |
2774e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
2775e41f4b71Sopenharmony_ci| info | Options for setting the **PixelMap** object. | 
2776e41f4b71Sopenharmony_ci| buf | Pointer to the buffer of the image. | 
2777e41f4b71Sopenharmony_ci| len | Buffer size. | 
2778e41f4b71Sopenharmony_ci| rowStride | Row stride. The stride is the actual memory size occupied by each row of the image, in bytes. Stride = Width \*Number of bytes per pixel + Padding, where padding refers to the extra space added at the end of each row for memory alignment purposes. | 
2779e41f4b71Sopenharmony_ci| res | Pointer to the **PixelMap** object at the application layer. | 
2780e41f4b71Sopenharmony_ci
2781e41f4b71Sopenharmony_ci**Returns**
2782e41f4b71Sopenharmony_ci
2783e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2784e41f4b71Sopenharmony_ci
2785e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
2786e41f4b71Sopenharmony_ci
2787e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2788e41f4b71Sopenharmony_ci
2789e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2790e41f4b71Sopenharmony_ci
2791e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2792e41f4b71Sopenharmony_ci
2793e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2794e41f4b71Sopenharmony_ci
2795e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2796e41f4b71Sopenharmony_ci
2797e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
2798e41f4b71Sopenharmony_ci
2799e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
2800e41f4b71Sopenharmony_ci
2801e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2802e41f4b71Sopenharmony_ci
2803e41f4b71Sopenharmony_ci
2804e41f4b71Sopenharmony_ci
2805e41f4b71Sopenharmony_ci### OH_PixelMap_Crop()
2806e41f4b71Sopenharmony_ci
2807e41f4b71Sopenharmony_ci```
2808e41f4b71Sopenharmony_ciint32_t OH_PixelMap_Crop (const NativePixelMap * native, int32_t x, int32_t y, int32_t width, int32_t height )
2809e41f4b71Sopenharmony_ci```
2810e41f4b71Sopenharmony_ci
2811e41f4b71Sopenharmony_ci**Description**
2812e41f4b71Sopenharmony_ci
2813e41f4b71Sopenharmony_ciCrops a **NativePixelMap** object.
2814e41f4b71Sopenharmony_ci
2815e41f4b71Sopenharmony_ci**Since**: 10
2816e41f4b71Sopenharmony_ci
2817e41f4b71Sopenharmony_ci**Parameters**
2818e41f4b71Sopenharmony_ci
2819e41f4b71Sopenharmony_ci| Name| Description| 
2820e41f4b71Sopenharmony_ci| -------- | -------- |
2821e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
2822e41f4b71Sopenharmony_ci| x | X-coordinate of the upper left corner of the target image. | 
2823e41f4b71Sopenharmony_ci| y | Y-coordinate of the upper left corner of the target image. | 
2824e41f4b71Sopenharmony_ci| width | Width of the cropped region. | 
2825e41f4b71Sopenharmony_ci| height | Height of the cropped region. | 
2826e41f4b71Sopenharmony_ci
2827e41f4b71Sopenharmony_ci**Returns**
2828e41f4b71Sopenharmony_ci
2829e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2830e41f4b71Sopenharmony_ci
2831e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
2832e41f4b71Sopenharmony_ci
2833e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2834e41f4b71Sopenharmony_ci
2835e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2836e41f4b71Sopenharmony_ci
2837e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2838e41f4b71Sopenharmony_ci
2839e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2840e41f4b71Sopenharmony_ci
2841e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2842e41f4b71Sopenharmony_ci
2843e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2844e41f4b71Sopenharmony_ci
2845e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2846e41f4b71Sopenharmony_ci
2847e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2848e41f4b71Sopenharmony_ci
2849e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
2850e41f4b71Sopenharmony_ci
2851e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
2852e41f4b71Sopenharmony_ci
2853e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
2854e41f4b71Sopenharmony_ci
2855e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
2856e41f4b71Sopenharmony_ci
2857e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
2858e41f4b71Sopenharmony_ci
2859e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2860e41f4b71Sopenharmony_ci
2861e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2862e41f4b71Sopenharmony_ci
2863e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2864e41f4b71Sopenharmony_ci
2865e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
2866e41f4b71Sopenharmony_ci
2867e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
2868e41f4b71Sopenharmony_ci
2869e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
2870e41f4b71Sopenharmony_ci
2871e41f4b71Sopenharmony_ci
2872e41f4b71Sopenharmony_ci
2873e41f4b71Sopenharmony_ci
2874e41f4b71Sopenharmony_ci### OH_PixelMap_Flip()
2875e41f4b71Sopenharmony_ci
2876e41f4b71Sopenharmony_ci```
2877e41f4b71Sopenharmony_ciint32_t OH_PixelMap_Flip (const NativePixelMap * native, int32_t x, int32_t y )
2878e41f4b71Sopenharmony_ci```
2879e41f4b71Sopenharmony_ci
2880e41f4b71Sopenharmony_ci**Description**
2881e41f4b71Sopenharmony_ci
2882e41f4b71Sopenharmony_ciFlips a **NativePixelMap** object.
2883e41f4b71Sopenharmony_ci
2884e41f4b71Sopenharmony_ci**Since**: 10
2885e41f4b71Sopenharmony_ci
2886e41f4b71Sopenharmony_ci**Parameters**
2887e41f4b71Sopenharmony_ci
2888e41f4b71Sopenharmony_ci| Name| Description| 
2889e41f4b71Sopenharmony_ci| -------- | -------- |
2890e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
2891e41f4b71Sopenharmony_ci| x | Whether to flip around the x axis. | 
2892e41f4b71Sopenharmony_ci| y | Whether to flip around the y axis. | 
2893e41f4b71Sopenharmony_ci
2894e41f4b71Sopenharmony_ci**Returns**
2895e41f4b71Sopenharmony_ci
2896e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2897e41f4b71Sopenharmony_ci
2898e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
2899e41f4b71Sopenharmony_ci
2900e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2901e41f4b71Sopenharmony_ci
2902e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2903e41f4b71Sopenharmony_ci
2904e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2905e41f4b71Sopenharmony_ci
2906e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
2907e41f4b71Sopenharmony_ci
2908e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
2909e41f4b71Sopenharmony_ci
2910e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
2911e41f4b71Sopenharmony_ci
2912e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
2913e41f4b71Sopenharmony_ci
2914e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2915e41f4b71Sopenharmony_ci
2916e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
2917e41f4b71Sopenharmony_ci
2918e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
2919e41f4b71Sopenharmony_ci
2920e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
2921e41f4b71Sopenharmony_ci
2922e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
2923e41f4b71Sopenharmony_ci
2924e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
2925e41f4b71Sopenharmony_ci
2926e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
2927e41f4b71Sopenharmony_ci
2928e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
2929e41f4b71Sopenharmony_ci
2930e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
2931e41f4b71Sopenharmony_ci
2932e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
2933e41f4b71Sopenharmony_ci
2934e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
2935e41f4b71Sopenharmony_ci
2936e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
2937e41f4b71Sopenharmony_ci
2938e41f4b71Sopenharmony_ci
2939e41f4b71Sopenharmony_ci
2940e41f4b71Sopenharmony_ci### OH_PixelMap_GetBytesNumberPerRow()
2941e41f4b71Sopenharmony_ci
2942e41f4b71Sopenharmony_ci```
2943e41f4b71Sopenharmony_ciint32_t OH_PixelMap_GetBytesNumberPerRow (const NativePixelMap * native, int32_t * num )
2944e41f4b71Sopenharmony_ci```
2945e41f4b71Sopenharmony_ci
2946e41f4b71Sopenharmony_ci**Description**
2947e41f4b71Sopenharmony_ci
2948e41f4b71Sopenharmony_ciObtains the number of bytes per row of a **NativePixelMap** object.
2949e41f4b71Sopenharmony_ci
2950e41f4b71Sopenharmony_ci**Since**: 10
2951e41f4b71Sopenharmony_ci
2952e41f4b71Sopenharmony_ci**Parameters**
2953e41f4b71Sopenharmony_ci
2954e41f4b71Sopenharmony_ci| Name| Description| 
2955e41f4b71Sopenharmony_ci| -------- | -------- |
2956e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
2957e41f4b71Sopenharmony_ci| num | Pointer to the number of bytes per row. | 
2958e41f4b71Sopenharmony_ci
2959e41f4b71Sopenharmony_ci**Returns**
2960e41f4b71Sopenharmony_ci
2961e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
2962e41f4b71Sopenharmony_ci
2963e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
2964e41f4b71Sopenharmony_ci
2965e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
2966e41f4b71Sopenharmony_ci
2967e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
2968e41f4b71Sopenharmony_ci
2969e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
2970e41f4b71Sopenharmony_ci
2971e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
2972e41f4b71Sopenharmony_ci
2973e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
2974e41f4b71Sopenharmony_ci
2975e41f4b71Sopenharmony_ci
2976e41f4b71Sopenharmony_ci
2977e41f4b71Sopenharmony_ci
2978e41f4b71Sopenharmony_ci### OH_PixelMap_GetDensity()
2979e41f4b71Sopenharmony_ci
2980e41f4b71Sopenharmony_ci```
2981e41f4b71Sopenharmony_ciint32_t OH_PixelMap_GetDensity (const NativePixelMap * native, int32_t * density )
2982e41f4b71Sopenharmony_ci```
2983e41f4b71Sopenharmony_ci
2984e41f4b71Sopenharmony_ci**Description**
2985e41f4b71Sopenharmony_ci
2986e41f4b71Sopenharmony_ciObtains the pixel density of a **NativePixelMap** object.
2987e41f4b71Sopenharmony_ci
2988e41f4b71Sopenharmony_ci**Since**: 10
2989e41f4b71Sopenharmony_ci
2990e41f4b71Sopenharmony_ci**Parameters**
2991e41f4b71Sopenharmony_ci
2992e41f4b71Sopenharmony_ci| Name| Description| 
2993e41f4b71Sopenharmony_ci| -------- | -------- |
2994e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
2995e41f4b71Sopenharmony_ci| density | Pointer to the pixel density. | 
2996e41f4b71Sopenharmony_ci
2997e41f4b71Sopenharmony_ci**Returns**
2998e41f4b71Sopenharmony_ci
2999e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3000e41f4b71Sopenharmony_ci
3001e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3002e41f4b71Sopenharmony_ci
3003e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3004e41f4b71Sopenharmony_ci
3005e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3006e41f4b71Sopenharmony_ci
3007e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3008e41f4b71Sopenharmony_ci
3009e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3010e41f4b71Sopenharmony_ci
3011e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3012e41f4b71Sopenharmony_ci
3013e41f4b71Sopenharmony_ci
3014e41f4b71Sopenharmony_ci
3015e41f4b71Sopenharmony_ci
3016e41f4b71Sopenharmony_ci### OH_PixelMap_GetImageInfo()
3017e41f4b71Sopenharmony_ci
3018e41f4b71Sopenharmony_ci```
3019e41f4b71Sopenharmony_ciint32_t OH_PixelMap_GetImageInfo (const NativePixelMap * native, OhosPixelMapInfos * info )
3020e41f4b71Sopenharmony_ci```
3021e41f4b71Sopenharmony_ci
3022e41f4b71Sopenharmony_ci**Description**
3023e41f4b71Sopenharmony_ci
3024e41f4b71Sopenharmony_ciObtains the image information of a **NativePixelMap** object.
3025e41f4b71Sopenharmony_ci
3026e41f4b71Sopenharmony_ci**Since**: 10
3027e41f4b71Sopenharmony_ci
3028e41f4b71Sopenharmony_ci**Parameters**
3029e41f4b71Sopenharmony_ci
3030e41f4b71Sopenharmony_ci| Name| Description| 
3031e41f4b71Sopenharmony_ci| -------- | -------- |
3032e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3033e41f4b71Sopenharmony_ci| info | Pointer to the image information. | 
3034e41f4b71Sopenharmony_ci
3035e41f4b71Sopenharmony_ci**Returns**
3036e41f4b71Sopenharmony_ci
3037e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3038e41f4b71Sopenharmony_ci
3039e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3040e41f4b71Sopenharmony_ci
3041e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3042e41f4b71Sopenharmony_ci
3043e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3044e41f4b71Sopenharmony_ci
3045e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3046e41f4b71Sopenharmony_ci
3047e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
3048e41f4b71Sopenharmony_ci
3049e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
3050e41f4b71Sopenharmony_ci
3051e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
3052e41f4b71Sopenharmony_ci
3053e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
3054e41f4b71Sopenharmony_ci
3055e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3056e41f4b71Sopenharmony_ci
3057e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
3058e41f4b71Sopenharmony_ci
3059e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
3060e41f4b71Sopenharmony_ci
3061e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
3062e41f4b71Sopenharmony_ci
3063e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
3064e41f4b71Sopenharmony_ci
3065e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
3066e41f4b71Sopenharmony_ci
3067e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
3068e41f4b71Sopenharmony_ci
3069e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
3070e41f4b71Sopenharmony_ci
3071e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
3072e41f4b71Sopenharmony_ci
3073e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3074e41f4b71Sopenharmony_ci
3075e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
3076e41f4b71Sopenharmony_ci
3077e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
3078e41f4b71Sopenharmony_ci
3079e41f4b71Sopenharmony_ci**See**
3080e41f4b71Sopenharmony_ci
3081e41f4b71Sopenharmony_ci[OhosPixelMapInfos](_ohos_pixel_map_infos.md)
3082e41f4b71Sopenharmony_ci
3083e41f4b71Sopenharmony_ci
3084e41f4b71Sopenharmony_ci### OH_PixelMap_GetIsEditable()
3085e41f4b71Sopenharmony_ci
3086e41f4b71Sopenharmony_ci```
3087e41f4b71Sopenharmony_ciint32_t OH_PixelMap_GetIsEditable (const NativePixelMap * native, int32_t * editable )
3088e41f4b71Sopenharmony_ci```
3089e41f4b71Sopenharmony_ci
3090e41f4b71Sopenharmony_ci**Description**
3091e41f4b71Sopenharmony_ci
3092e41f4b71Sopenharmony_ciChecks whether a **NativePixelMap** object is editable.
3093e41f4b71Sopenharmony_ci
3094e41f4b71Sopenharmony_ci**Since**: 10
3095e41f4b71Sopenharmony_ci
3096e41f4b71Sopenharmony_ci**Parameters**
3097e41f4b71Sopenharmony_ci
3098e41f4b71Sopenharmony_ci| Name| Description| 
3099e41f4b71Sopenharmony_ci| -------- | -------- |
3100e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3101e41f4b71Sopenharmony_ci| editable | Pointer to the editing type of the **NativePixelMap** object. | 
3102e41f4b71Sopenharmony_ci
3103e41f4b71Sopenharmony_ci**Returns**
3104e41f4b71Sopenharmony_ci
3105e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3106e41f4b71Sopenharmony_ci
3107e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3108e41f4b71Sopenharmony_ci
3109e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3110e41f4b71Sopenharmony_ci
3111e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3112e41f4b71Sopenharmony_ci
3113e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3114e41f4b71Sopenharmony_ci
3115e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3116e41f4b71Sopenharmony_ci
3117e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3118e41f4b71Sopenharmony_ci
3119e41f4b71Sopenharmony_ci
3120e41f4b71Sopenharmony_ci
3121e41f4b71Sopenharmony_ci
3122e41f4b71Sopenharmony_ci### OH_PixelMap_InitNativePixelMap()
3123e41f4b71Sopenharmony_ci
3124e41f4b71Sopenharmony_ci```
3125e41f4b71Sopenharmony_ciNativePixelMap* OH_PixelMap_InitNativePixelMap (napi_env env, napi_value source )
3126e41f4b71Sopenharmony_ci```
3127e41f4b71Sopenharmony_ci
3128e41f4b71Sopenharmony_ci**Description**
3129e41f4b71Sopenharmony_ci
3130e41f4b71Sopenharmony_ciInitializes a **PixelMap** object.
3131e41f4b71Sopenharmony_ci
3132e41f4b71Sopenharmony_ci**Since**: 10
3133e41f4b71Sopenharmony_ci
3134e41f4b71Sopenharmony_ci**Parameters**
3135e41f4b71Sopenharmony_ci
3136e41f4b71Sopenharmony_ci| Name| Description| 
3137e41f4b71Sopenharmony_ci| -------- | -------- |
3138e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
3139e41f4b71Sopenharmony_ci| source | Options for setting the **PixelMap** object. | 
3140e41f4b71Sopenharmony_ci
3141e41f4b71Sopenharmony_ci**Returns**
3142e41f4b71Sopenharmony_ci
3143e41f4b71Sopenharmony_ciReturns a pointer to the **NativePixelMap** object if the operation is successful; returns an error code otherwise.
3144e41f4b71Sopenharmony_ci
3145e41f4b71Sopenharmony_ci
3146e41f4b71Sopenharmony_ci### OH_PixelMap_IsSupportAlpha()
3147e41f4b71Sopenharmony_ci
3148e41f4b71Sopenharmony_ci```
3149e41f4b71Sopenharmony_ciint32_t OH_PixelMap_IsSupportAlpha (const NativePixelMap * native, int32_t * alpha )
3150e41f4b71Sopenharmony_ci```
3151e41f4b71Sopenharmony_ci
3152e41f4b71Sopenharmony_ci**Description**
3153e41f4b71Sopenharmony_ci
3154e41f4b71Sopenharmony_ciChecks whether a **NativePixelMap** object supports alpha channels.
3155e41f4b71Sopenharmony_ci
3156e41f4b71Sopenharmony_ci**Since**: 10
3157e41f4b71Sopenharmony_ci
3158e41f4b71Sopenharmony_ci**Parameters**
3159e41f4b71Sopenharmony_ci
3160e41f4b71Sopenharmony_ci| Name| Description| 
3161e41f4b71Sopenharmony_ci| -------- | -------- |
3162e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3163e41f4b71Sopenharmony_ci| alpha | Pointer to the support for alpha channels. | 
3164e41f4b71Sopenharmony_ci
3165e41f4b71Sopenharmony_ci**Returns**
3166e41f4b71Sopenharmony_ci
3167e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3168e41f4b71Sopenharmony_ci
3169e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3170e41f4b71Sopenharmony_ci
3171e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3172e41f4b71Sopenharmony_ci
3173e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3174e41f4b71Sopenharmony_ci
3175e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3176e41f4b71Sopenharmony_ci
3177e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3178e41f4b71Sopenharmony_ci
3179e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3180e41f4b71Sopenharmony_ci
3181e41f4b71Sopenharmony_ci
3182e41f4b71Sopenharmony_ci
3183e41f4b71Sopenharmony_ci
3184e41f4b71Sopenharmony_ci### OH_PixelMap_Rotate()
3185e41f4b71Sopenharmony_ci
3186e41f4b71Sopenharmony_ci```
3187e41f4b71Sopenharmony_ciint32_t OH_PixelMap_Rotate (const NativePixelMap * native, float angle )
3188e41f4b71Sopenharmony_ci```
3189e41f4b71Sopenharmony_ci
3190e41f4b71Sopenharmony_ci**Description**
3191e41f4b71Sopenharmony_ci
3192e41f4b71Sopenharmony_ciRotates a **NativePixelMap** object.
3193e41f4b71Sopenharmony_ci
3194e41f4b71Sopenharmony_ci**Since**: 10
3195e41f4b71Sopenharmony_ci
3196e41f4b71Sopenharmony_ci**Parameters**
3197e41f4b71Sopenharmony_ci
3198e41f4b71Sopenharmony_ci| Name| Description| 
3199e41f4b71Sopenharmony_ci| -------- | -------- |
3200e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3201e41f4b71Sopenharmony_ci| angle | Angle to rotate. | 
3202e41f4b71Sopenharmony_ci
3203e41f4b71Sopenharmony_ci**Returns**
3204e41f4b71Sopenharmony_ci
3205e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3206e41f4b71Sopenharmony_ci
3207e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3208e41f4b71Sopenharmony_ci
3209e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3210e41f4b71Sopenharmony_ci
3211e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3212e41f4b71Sopenharmony_ci
3213e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3214e41f4b71Sopenharmony_ci
3215e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
3216e41f4b71Sopenharmony_ci
3217e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
3218e41f4b71Sopenharmony_ci
3219e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
3220e41f4b71Sopenharmony_ci
3221e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
3222e41f4b71Sopenharmony_ci
3223e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3224e41f4b71Sopenharmony_ci
3225e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
3226e41f4b71Sopenharmony_ci
3227e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
3228e41f4b71Sopenharmony_ci
3229e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
3230e41f4b71Sopenharmony_ci
3231e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
3232e41f4b71Sopenharmony_ci
3233e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
3234e41f4b71Sopenharmony_ci
3235e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
3236e41f4b71Sopenharmony_ci
3237e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
3238e41f4b71Sopenharmony_ci
3239e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
3240e41f4b71Sopenharmony_ci
3241e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3242e41f4b71Sopenharmony_ci
3243e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
3244e41f4b71Sopenharmony_ci
3245e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
3246e41f4b71Sopenharmony_ci
3247e41f4b71Sopenharmony_ci
3248e41f4b71Sopenharmony_ci
3249e41f4b71Sopenharmony_ci
3250e41f4b71Sopenharmony_ci### OH_PixelMap_Scale()
3251e41f4b71Sopenharmony_ci
3252e41f4b71Sopenharmony_ci```
3253e41f4b71Sopenharmony_ciint32_t OH_PixelMap_Scale (const NativePixelMap * native, float x, float y )
3254e41f4b71Sopenharmony_ci```
3255e41f4b71Sopenharmony_ci
3256e41f4b71Sopenharmony_ci**Description**
3257e41f4b71Sopenharmony_ci
3258e41f4b71Sopenharmony_ciScales a **NativePixelMap** object.
3259e41f4b71Sopenharmony_ci
3260e41f4b71Sopenharmony_ci**Since**: 10
3261e41f4b71Sopenharmony_ci
3262e41f4b71Sopenharmony_ci**Parameters**
3263e41f4b71Sopenharmony_ci
3264e41f4b71Sopenharmony_ci| Name| Description| 
3265e41f4b71Sopenharmony_ci| -------- | -------- |
3266e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3267e41f4b71Sopenharmony_ci| x | Scale ratio of the width. | 
3268e41f4b71Sopenharmony_ci| y | Scale ratio of the height. | 
3269e41f4b71Sopenharmony_ci
3270e41f4b71Sopenharmony_ci**Returns**
3271e41f4b71Sopenharmony_ci
3272e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3273e41f4b71Sopenharmony_ci
3274e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3275e41f4b71Sopenharmony_ci
3276e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3277e41f4b71Sopenharmony_ci
3278e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3279e41f4b71Sopenharmony_ci
3280e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3281e41f4b71Sopenharmony_ci
3282e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
3283e41f4b71Sopenharmony_ci
3284e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
3285e41f4b71Sopenharmony_ci
3286e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
3287e41f4b71Sopenharmony_ci
3288e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
3289e41f4b71Sopenharmony_ci
3290e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3291e41f4b71Sopenharmony_ci
3292e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
3293e41f4b71Sopenharmony_ci
3294e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
3295e41f4b71Sopenharmony_ci
3296e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
3297e41f4b71Sopenharmony_ci
3298e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
3299e41f4b71Sopenharmony_ci
3300e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INIT_ABNORMAL** if the image fails to be initialized.
3301e41f4b71Sopenharmony_ci
3302e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
3303e41f4b71Sopenharmony_ci
3304e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
3305e41f4b71Sopenharmony_ci
3306e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
3307e41f4b71Sopenharmony_ci
3308e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
3309e41f4b71Sopenharmony_ci
3310e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3311e41f4b71Sopenharmony_ci
3312e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
3313e41f4b71Sopenharmony_ci
3314e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
3315e41f4b71Sopenharmony_ci
3316e41f4b71Sopenharmony_ci
3317e41f4b71Sopenharmony_ci
3318e41f4b71Sopenharmony_ci### OH_PixelMap_ScaleWithAntiAliasing()
3319e41f4b71Sopenharmony_ci
3320e41f4b71Sopenharmony_ci```
3321e41f4b71Sopenharmony_ciint32_t OH_PixelMap_ScaleWithAntiAliasing (const NativePixelMap * native, float x, float y, OH_PixelMap_AntiAliasingLevel level )
3322e41f4b71Sopenharmony_ci```
3323e41f4b71Sopenharmony_ci
3324e41f4b71Sopenharmony_ci**Description**
3325e41f4b71Sopenharmony_ci
3326e41f4b71Sopenharmony_ciScales an image based on the specified antialiasing level, width, and height.
3327e41f4b71Sopenharmony_ci
3328e41f4b71Sopenharmony_ci**Since**: 12
3329e41f4b71Sopenharmony_ci
3330e41f4b71Sopenharmony_ci**Parameters**
3331e41f4b71Sopenharmony_ci
3332e41f4b71Sopenharmony_ci| Name| Description| 
3333e41f4b71Sopenharmony_ci| -------- | -------- |
3334e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3335e41f4b71Sopenharmony_ci| x | Scale ratio of the width. | 
3336e41f4b71Sopenharmony_ci| y | Scale ratio of the height. | 
3337e41f4b71Sopenharmony_ci| level | Antialiasing level. | 
3338e41f4b71Sopenharmony_ci
3339e41f4b71Sopenharmony_ci**Returns**
3340e41f4b71Sopenharmony_ci
3341e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3342e41f4b71Sopenharmony_ci
3343e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3344e41f4b71Sopenharmony_ci
3345e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3346e41f4b71Sopenharmony_ci
3347e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3348e41f4b71Sopenharmony_ci
3349e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
3350e41f4b71Sopenharmony_ci
3351e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
3352e41f4b71Sopenharmony_ci
3353e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
3354e41f4b71Sopenharmony_ci
3355e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
3356e41f4b71Sopenharmony_ci
3357e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
3358e41f4b71Sopenharmony_ci
3359e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
3360e41f4b71Sopenharmony_ci
3361e41f4b71Sopenharmony_ci
3362e41f4b71Sopenharmony_ci
3363e41f4b71Sopenharmony_ci### OH_PixelMap_SetAlphaAble()
3364e41f4b71Sopenharmony_ci
3365e41f4b71Sopenharmony_ci```
3366e41f4b71Sopenharmony_ciint32_t OH_PixelMap_SetAlphaAble (const NativePixelMap * native, int32_t alpha )
3367e41f4b71Sopenharmony_ci```
3368e41f4b71Sopenharmony_ci
3369e41f4b71Sopenharmony_ci**Description**
3370e41f4b71Sopenharmony_ci
3371e41f4b71Sopenharmony_ciSets an alpha channel for a **NativePixelMap** object.
3372e41f4b71Sopenharmony_ci
3373e41f4b71Sopenharmony_ci**Since**: 10
3374e41f4b71Sopenharmony_ci
3375e41f4b71Sopenharmony_ci**Parameters**
3376e41f4b71Sopenharmony_ci
3377e41f4b71Sopenharmony_ci| Name| Description| 
3378e41f4b71Sopenharmony_ci| -------- | -------- |
3379e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3380e41f4b71Sopenharmony_ci| alpha | Alpha channel to set. | 
3381e41f4b71Sopenharmony_ci
3382e41f4b71Sopenharmony_ci**Returns**
3383e41f4b71Sopenharmony_ci
3384e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3385e41f4b71Sopenharmony_ci
3386e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3387e41f4b71Sopenharmony_ci
3388e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3389e41f4b71Sopenharmony_ci
3390e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3391e41f4b71Sopenharmony_ci
3392e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3393e41f4b71Sopenharmony_ci
3394e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3395e41f4b71Sopenharmony_ci
3396e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3397e41f4b71Sopenharmony_ci
3398e41f4b71Sopenharmony_ci
3399e41f4b71Sopenharmony_ci
3400e41f4b71Sopenharmony_ci### OH_PixelMap_SetDensity()
3401e41f4b71Sopenharmony_ci
3402e41f4b71Sopenharmony_ci```
3403e41f4b71Sopenharmony_ciint32_t OH_PixelMap_SetDensity (const NativePixelMap * native, int32_t density )
3404e41f4b71Sopenharmony_ci```
3405e41f4b71Sopenharmony_ci
3406e41f4b71Sopenharmony_ci**Description**
3407e41f4b71Sopenharmony_ci
3408e41f4b71Sopenharmony_ciSets the pixel density for a **NativePixelMap** object.
3409e41f4b71Sopenharmony_ci
3410e41f4b71Sopenharmony_ci**Since**: 10
3411e41f4b71Sopenharmony_ci
3412e41f4b71Sopenharmony_ci**Parameters**
3413e41f4b71Sopenharmony_ci
3414e41f4b71Sopenharmony_ci| Name| Description| 
3415e41f4b71Sopenharmony_ci| -------- | -------- |
3416e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3417e41f4b71Sopenharmony_ci| density | Pixel density to set. | 
3418e41f4b71Sopenharmony_ci
3419e41f4b71Sopenharmony_ci**Returns**
3420e41f4b71Sopenharmony_ci
3421e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3422e41f4b71Sopenharmony_ci
3423e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3424e41f4b71Sopenharmony_ci
3425e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3426e41f4b71Sopenharmony_ci
3427e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3428e41f4b71Sopenharmony_ci
3429e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3430e41f4b71Sopenharmony_ci
3431e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3432e41f4b71Sopenharmony_ci
3433e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3434e41f4b71Sopenharmony_ci
3435e41f4b71Sopenharmony_ci
3436e41f4b71Sopenharmony_ci
3437e41f4b71Sopenharmony_ci
3438e41f4b71Sopenharmony_ci### OH_PixelMap_SetOpacity()
3439e41f4b71Sopenharmony_ci
3440e41f4b71Sopenharmony_ci```
3441e41f4b71Sopenharmony_ciint32_t OH_PixelMap_SetOpacity (const NativePixelMap * native, float opacity )
3442e41f4b71Sopenharmony_ci```
3443e41f4b71Sopenharmony_ci
3444e41f4b71Sopenharmony_ci**Description**
3445e41f4b71Sopenharmony_ci
3446e41f4b71Sopenharmony_ciSets the opacity for a **NativePixelMap** object.
3447e41f4b71Sopenharmony_ci
3448e41f4b71Sopenharmony_ci**Since**: 10
3449e41f4b71Sopenharmony_ci
3450e41f4b71Sopenharmony_ci**Parameters**
3451e41f4b71Sopenharmony_ci
3452e41f4b71Sopenharmony_ci| Name| Description| 
3453e41f4b71Sopenharmony_ci| -------- | -------- |
3454e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3455e41f4b71Sopenharmony_ci| opacity | Opacity to set. | 
3456e41f4b71Sopenharmony_ci
3457e41f4b71Sopenharmony_ci**Returns**
3458e41f4b71Sopenharmony_ci
3459e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3460e41f4b71Sopenharmony_ci
3461e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3462e41f4b71Sopenharmony_ci
3463e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3464e41f4b71Sopenharmony_ci
3465e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3466e41f4b71Sopenharmony_ci
3467e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3468e41f4b71Sopenharmony_ci
3469e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3470e41f4b71Sopenharmony_ci
3471e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3472e41f4b71Sopenharmony_ci
3473e41f4b71Sopenharmony_ci
3474e41f4b71Sopenharmony_ci### OH_PixelMap_Translate()
3475e41f4b71Sopenharmony_ci
3476e41f4b71Sopenharmony_ci```
3477e41f4b71Sopenharmony_ciint32_t OH_PixelMap_Translate (const NativePixelMap * native, float x, float y )
3478e41f4b71Sopenharmony_ci```
3479e41f4b71Sopenharmony_ci
3480e41f4b71Sopenharmony_ci**Description**
3481e41f4b71Sopenharmony_ci
3482e41f4b71Sopenharmony_ciTranslates a **NativePixelMap** object.
3483e41f4b71Sopenharmony_ci
3484e41f4b71Sopenharmony_ci**Since**: 10
3485e41f4b71Sopenharmony_ci
3486e41f4b71Sopenharmony_ci**Parameters**
3487e41f4b71Sopenharmony_ci
3488e41f4b71Sopenharmony_ci| Name| Description| 
3489e41f4b71Sopenharmony_ci| -------- | -------- |
3490e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3491e41f4b71Sopenharmony_ci| x | Horizontal distance to translate. | 
3492e41f4b71Sopenharmony_ci| y | Vertical distance to translate. | 
3493e41f4b71Sopenharmony_ci
3494e41f4b71Sopenharmony_ci**Returns**
3495e41f4b71Sopenharmony_ci
3496e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3497e41f4b71Sopenharmony_ci
3498e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3499e41f4b71Sopenharmony_ci
3500e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3501e41f4b71Sopenharmony_ci
3502e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3503e41f4b71Sopenharmony_ci
3504e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3505e41f4b71Sopenharmony_ci
3506e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
3507e41f4b71Sopenharmony_ci
3508e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
3509e41f4b71Sopenharmony_ci
3510e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
3511e41f4b71Sopenharmony_ci
3512e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
3513e41f4b71Sopenharmony_ci
3514e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3515e41f4b71Sopenharmony_ci
3516e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
3517e41f4b71Sopenharmony_ci
3518e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
3519e41f4b71Sopenharmony_ci
3520e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
3521e41f4b71Sopenharmony_ci
3522e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
3523e41f4b71Sopenharmony_ci
3524e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
3525e41f4b71Sopenharmony_ci
3526e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
3527e41f4b71Sopenharmony_ci
3528e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
3529e41f4b71Sopenharmony_ci
3530e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
3531e41f4b71Sopenharmony_ci
3532e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3533e41f4b71Sopenharmony_ci
3534e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
3535e41f4b71Sopenharmony_ci
3536e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
3537e41f4b71Sopenharmony_ci
3538e41f4b71Sopenharmony_ci
3539e41f4b71Sopenharmony_ci
3540e41f4b71Sopenharmony_ci
3541e41f4b71Sopenharmony_ci### OH_PixelMap_UnAccessPixels()
3542e41f4b71Sopenharmony_ci
3543e41f4b71Sopenharmony_ci```
3544e41f4b71Sopenharmony_ciint32_t OH_PixelMap_UnAccessPixels (const NativePixelMap * native)
3545e41f4b71Sopenharmony_ci```
3546e41f4b71Sopenharmony_ci
3547e41f4b71Sopenharmony_ci**Description**
3548e41f4b71Sopenharmony_ci
3549e41f4b71Sopenharmony_ciUnlocks the memory of a **NativePixelMap** object. This function is used with [OH_PixelMap_AccessPixels](#oh_pixelmap_accesspixels) in pairs.
3550e41f4b71Sopenharmony_ci
3551e41f4b71Sopenharmony_ci**Since**: 10
3552e41f4b71Sopenharmony_ci
3553e41f4b71Sopenharmony_ci**Parameters**
3554e41f4b71Sopenharmony_ci
3555e41f4b71Sopenharmony_ci| Name| Description| 
3556e41f4b71Sopenharmony_ci| -------- | -------- |
3557e41f4b71Sopenharmony_ci| native | Pointer to a **NativePixelMap** object. | 
3558e41f4b71Sopenharmony_ci
3559e41f4b71Sopenharmony_ci**Returns**
3560e41f4b71Sopenharmony_ci
3561e41f4b71Sopenharmony_ciFor details, see [IRNdkErrCode](#irndkerrcode-1).
3562e41f4b71Sopenharmony_ci
3563e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_SUCCESS** if the operation is successful.
3564e41f4b71Sopenharmony_ci
3565e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_BAD_PARAMETER** if a parameter is incorrect.
3566e41f4b71Sopenharmony_ci
3567e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_JNI_ENV_ABNORMAL** if the JNI environment is abnormal.
3568e41f4b71Sopenharmony_ci
3569e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INVALID_PARAMETER** if a parameter is invalid.
3570e41f4b71Sopenharmony_ci
3571e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_GET_DATA_ABNORMAL** if an error occurs during image data retrieval.
3572e41f4b71Sopenharmony_ci
3573e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DECODE_FAILED** if decoding fails.
3574e41f4b71Sopenharmony_ci
3575e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CHECK_FORMAT_ERROR** if the format check fails.
3576e41f4b71Sopenharmony_ci
3577e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_THIRDPART_SKIA_ERROR** if skia decoding fails.
3578e41f4b71Sopenharmony_ci
3579e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_ABNORMAL** if the input image data is incorrect.
3580e41f4b71Sopenharmony_ci
3581e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST** if sharing the memory fails.
3582e41f4b71Sopenharmony_ci
3583e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL** if the data in the shared memory is abnormal.
3584e41f4b71Sopenharmony_ci
3585e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_MALLOC_ABNORMAL** if an error occurs during memory allocation.
3586e41f4b71Sopenharmony_ci
3587e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_DATA_UNSUPPORT** if the attribute is invalid or the image data is not supported.
3588e41f4b71Sopenharmony_ci
3589e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_CROP** if cropping fails.
3590e41f4b71Sopenharmony_ci
3591e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_UNKNOWN_FORMAT** if the image format is unknown.
3592e41f4b71Sopenharmony_ci
3593e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_REGISTER_FAILED** if the plug-in fails to be registered.
3594e41f4b71Sopenharmony_ci
3595e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_PLUGIN_CREATE_FAILED** if the plug-in fails to be created.
3596e41f4b71Sopenharmony_ci
3597e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_INDEX_INVALID** if a parameter is invalid.
3598e41f4b71Sopenharmony_ci
3599e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALPHA_TYPE_ERROR** if the alpha type is incorrect.
3600e41f4b71Sopenharmony_ci
3601e41f4b71Sopenharmony_ciReturns **IMAGE_RESULT_ALLOCATER_TYPE_ERROR** if the memory allocation type is incorrect.
3602e41f4b71Sopenharmony_ci
3603e41f4b71Sopenharmony_ci
3604e41f4b71Sopenharmony_ci
3605e41f4b71Sopenharmony_ci
3606e41f4b71Sopenharmony_ci### OH_UnAccessPixels()
3607e41f4b71Sopenharmony_ci
3608e41f4b71Sopenharmony_ci```
3609e41f4b71Sopenharmony_ciint32_t OH_UnAccessPixels (napi_env env, napi_value value )
3610e41f4b71Sopenharmony_ci```
3611e41f4b71Sopenharmony_ci
3612e41f4b71Sopenharmony_ci**Description**
3613e41f4b71Sopenharmony_ci
3614e41f4b71Sopenharmony_ciUnlocks the memory of a **PixelMap** object. This function is used with **OH_AccessPixels** in pairs.
3615e41f4b71Sopenharmony_ci
3616e41f4b71Sopenharmony_ci**Deprecated from**: 10
3617e41f4b71Sopenharmony_ci
3618e41f4b71Sopenharmony_ci**Since**: 8
3619e41f4b71Sopenharmony_ci
3620e41f4b71Sopenharmony_ci**Parameters**
3621e41f4b71Sopenharmony_ci
3622e41f4b71Sopenharmony_ci| Name| Description| 
3623e41f4b71Sopenharmony_ci| -------- | -------- |
3624e41f4b71Sopenharmony_ci| env | Pointer to the NAPI environment. | 
3625e41f4b71Sopenharmony_ci| value | **PixelMap** object at the application layer. | 
3626e41f4b71Sopenharmony_ci
3627e41f4b71Sopenharmony_ci**Returns**
3628e41f4b71Sopenharmony_ci
3629e41f4b71Sopenharmony_ciReturns **OHOS_IMAGE_RESULT_SUCCESS** if the operation is successful; returns an error code otherwise.
3630e41f4b71Sopenharmony_ci
3631e41f4b71Sopenharmony_ci
3632e41f4b71Sopenharmony_ci
3633e41f4b71Sopenharmony_ci
3634e41f4b71Sopenharmony_ci## Variable Description
3635e41f4b71Sopenharmony_ci
3636e41f4b71Sopenharmony_ci
3637e41f4b71Sopenharmony_ci### alphaType
3638e41f4b71Sopenharmony_ci
3639e41f4b71Sopenharmony_ci```
3640e41f4b71Sopenharmony_ciint32_t OhosImageSourceInfo::alphaType
3641e41f4b71Sopenharmony_ci```
3642e41f4b71Sopenharmony_ci
3643e41f4b71Sopenharmony_ci**Description**
3644e41f4b71Sopenharmony_ci
3645e41f4b71Sopenharmony_ciDefines the alpha type of the image source.
3646e41f4b71Sopenharmony_ci
3647e41f4b71Sopenharmony_ci
3648e41f4b71Sopenharmony_ci
3649e41f4b71Sopenharmony_ci### buffer [1/2]
3650e41f4b71Sopenharmony_ci
3651e41f4b71Sopenharmony_ci```
3652e41f4b71Sopenharmony_ciuint8_t* OhosImageSource::buffer = nullptr
3653e41f4b71Sopenharmony_ci```
3654e41f4b71Sopenharmony_ci
3655e41f4b71Sopenharmony_ci**Description**
3656e41f4b71Sopenharmony_ci
3657e41f4b71Sopenharmony_ciDefines a pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted.
3658e41f4b71Sopenharmony_ci
3659e41f4b71Sopenharmony_ci**Since**: 10
3660e41f4b71Sopenharmony_ci
3661e41f4b71Sopenharmony_ci### buffer [2/2]
3662e41f4b71Sopenharmony_ci
3663e41f4b71Sopenharmony_ci```
3664e41f4b71Sopenharmony_ciuint8_t* OhosImageSourceUpdateData::buffer = nullptr
3665e41f4b71Sopenharmony_ci```
3666e41f4b71Sopenharmony_ci
3667e41f4b71Sopenharmony_ci**Description**
3668e41f4b71Sopenharmony_ci
3669e41f4b71Sopenharmony_ciDefines a pointer to the buffer for storing the update data.
3670e41f4b71Sopenharmony_ci
3671e41f4b71Sopenharmony_ci**Since**: 10
3672e41f4b71Sopenharmony_ci
3673e41f4b71Sopenharmony_ci
3674e41f4b71Sopenharmony_ci### bufferSize [1/2]
3675e41f4b71Sopenharmony_ci
3676e41f4b71Sopenharmony_ci```
3677e41f4b71Sopenharmony_cisize_t OhosImageSource::bufferSize = 0
3678e41f4b71Sopenharmony_ci```
3679e41f4b71Sopenharmony_ci
3680e41f4b71Sopenharmony_ci**Description**
3681e41f4b71Sopenharmony_ci
3682e41f4b71Sopenharmony_ciDefines the size of the image source buffer.
3683e41f4b71Sopenharmony_ci
3684e41f4b71Sopenharmony_ci
3685e41f4b71Sopenharmony_ci### bufferSize [2/2]
3686e41f4b71Sopenharmony_ci
3687e41f4b71Sopenharmony_ci```
3688e41f4b71Sopenharmony_cisize_t OhosImageSourceUpdateData::bufferSize = 0
3689e41f4b71Sopenharmony_ci```
3690e41f4b71Sopenharmony_ci
3691e41f4b71Sopenharmony_ci**Description**
3692e41f4b71Sopenharmony_ci
3693e41f4b71Sopenharmony_ciDefines the size of the buffer.
3694e41f4b71Sopenharmony_ci
3695e41f4b71Sopenharmony_ci**Since**: 10
3696e41f4b71Sopenharmony_ci
3697e41f4b71Sopenharmony_ci
3698e41f4b71Sopenharmony_ci### colorSpace
3699e41f4b71Sopenharmony_ci
3700e41f4b71Sopenharmony_ci```
3701e41f4b71Sopenharmony_ciint32_t OhosImageSourceInfo::colorSpace
3702e41f4b71Sopenharmony_ci```
3703e41f4b71Sopenharmony_ci
3704e41f4b71Sopenharmony_ci**Description**
3705e41f4b71Sopenharmony_ci
3706e41f4b71Sopenharmony_ciDefines the color space of the image source.
3707e41f4b71Sopenharmony_ci
3708e41f4b71Sopenharmony_ci**Since**: 10
3709e41f4b71Sopenharmony_ci
3710e41f4b71Sopenharmony_ci
3711e41f4b71Sopenharmony_ci### delayTimeList
3712e41f4b71Sopenharmony_ci
3713e41f4b71Sopenharmony_ci```
3714e41f4b71Sopenharmony_ciint32_t* OhosImageSourceDelayTimeList::delayTimeList
3715e41f4b71Sopenharmony_ci```
3716e41f4b71Sopenharmony_ci
3717e41f4b71Sopenharmony_ci**Description**
3718e41f4b71Sopenharmony_ci
3719e41f4b71Sopenharmony_ciDefines a pointer to the head of the image source delay time list.
3720e41f4b71Sopenharmony_ci
3721e41f4b71Sopenharmony_ci**Since**: 10
3722e41f4b71Sopenharmony_ci
3723e41f4b71Sopenharmony_ci
3724e41f4b71Sopenharmony_ci### density [1/2]
3725e41f4b71Sopenharmony_ci
3726e41f4b71Sopenharmony_ci```
3727e41f4b71Sopenharmony_ciint32_t OhosImageSourceOps::density
3728e41f4b71Sopenharmony_ci```
3729e41f4b71Sopenharmony_ci
3730e41f4b71Sopenharmony_ci**Description**
3731e41f4b71Sopenharmony_ci
3732e41f4b71Sopenharmony_ciDefines the pixel density of the image source.
3733e41f4b71Sopenharmony_ci
3734e41f4b71Sopenharmony_ci**Since**: 10
3735e41f4b71Sopenharmony_ci
3736e41f4b71Sopenharmony_ci
3737e41f4b71Sopenharmony_ci### density [2/2]
3738e41f4b71Sopenharmony_ci
3739e41f4b71Sopenharmony_ci```
3740e41f4b71Sopenharmony_ciint32_t OhosImageSourceInfo::density
3741e41f4b71Sopenharmony_ci```
3742e41f4b71Sopenharmony_ci
3743e41f4b71Sopenharmony_ci**Description**
3744e41f4b71Sopenharmony_ci
3745e41f4b71Sopenharmony_ciDefines the image density of the image source. It is set in [OH_ImageSource_Create](#oh_imagesource_create).
3746e41f4b71Sopenharmony_ci
3747e41f4b71Sopenharmony_ci**Since**: 10
3748e41f4b71Sopenharmony_ci
3749e41f4b71Sopenharmony_ci
3750e41f4b71Sopenharmony_ci### editable
3751e41f4b71Sopenharmony_ci
3752e41f4b71Sopenharmony_ci```
3753e41f4b71Sopenharmony_ciint8_t OhosImageDecodingOps::editable
3754e41f4b71Sopenharmony_ci```
3755e41f4b71Sopenharmony_ci
3756e41f4b71Sopenharmony_ci**Description**
3757e41f4b71Sopenharmony_ci
3758e41f4b71Sopenharmony_ciDefines whether the output pixel map is editable.
3759e41f4b71Sopenharmony_ci
3760e41f4b71Sopenharmony_ci**Since**: 10
3761e41f4b71Sopenharmony_ci
3762e41f4b71Sopenharmony_ci
3763e41f4b71Sopenharmony_ci### fd
3764e41f4b71Sopenharmony_ci
3765e41f4b71Sopenharmony_ci```
3766e41f4b71Sopenharmony_ciint32_t OhosImageSource::fd = -1
3767e41f4b71Sopenharmony_ci```
3768e41f4b71Sopenharmony_ci
3769e41f4b71Sopenharmony_ci**Description**
3770e41f4b71Sopenharmony_ci
3771e41f4b71Sopenharmony_ciDefines the descriptor of the image source.
3772e41f4b71Sopenharmony_ci
3773e41f4b71Sopenharmony_ci**Since**: 10
3774e41f4b71Sopenharmony_ci
3775e41f4b71Sopenharmony_ci
3776e41f4b71Sopenharmony_ci### fitDensity
3777e41f4b71Sopenharmony_ci
3778e41f4b71Sopenharmony_ci```
3779e41f4b71Sopenharmony_ciint32_t OhosImageDecodingOps::fitDensity
3780e41f4b71Sopenharmony_ci```
3781e41f4b71Sopenharmony_ci
3782e41f4b71Sopenharmony_ci**Description**
3783e41f4b71Sopenharmony_ci
3784e41f4b71Sopenharmony_ciDefines the pixel density of the output pixel map.
3785e41f4b71Sopenharmony_ci
3786e41f4b71Sopenharmony_ci**Since**: 10
3787e41f4b71Sopenharmony_ci
3788e41f4b71Sopenharmony_ci
3789e41f4b71Sopenharmony_ci### format
3790e41f4b71Sopenharmony_ci
3791e41f4b71Sopenharmony_ci```
3792e41f4b71Sopenharmony_cichar* OhosImageSourceSupportedFormat::format = nullptr
3793e41f4b71Sopenharmony_ci```
3794e41f4b71Sopenharmony_ci
3795e41f4b71Sopenharmony_ci**Description**
3796e41f4b71Sopenharmony_ci
3797e41f4b71Sopenharmony_ciDefines a pointer to the head of the format string.
3798e41f4b71Sopenharmony_ci
3799e41f4b71Sopenharmony_ci**Since**: 10
3800e41f4b71Sopenharmony_ci
3801e41f4b71Sopenharmony_ci
3802e41f4b71Sopenharmony_ci### height
3803e41f4b71Sopenharmony_ci
3804e41f4b71Sopenharmony_ci```
3805e41f4b71Sopenharmony_ciint32_t OhosImageRegion::height
3806e41f4b71Sopenharmony_ci```
3807e41f4b71Sopenharmony_ci
3808e41f4b71Sopenharmony_ci**Description**
3809e41f4b71Sopenharmony_ci
3810e41f4b71Sopenharmony_ciDefines the height of the region, in pixels.
3811e41f4b71Sopenharmony_ci
3812e41f4b71Sopenharmony_ci**Since**: 10
3813e41f4b71Sopenharmony_ci
3814e41f4b71Sopenharmony_ci### index
3815e41f4b71Sopenharmony_ci
3816e41f4b71Sopenharmony_ci```
3817e41f4b71Sopenharmony_ciuint32_t OhosImageDecodingOps::index
3818e41f4b71Sopenharmony_ci```
3819e41f4b71Sopenharmony_ci
3820e41f4b71Sopenharmony_ci**Description**
3821e41f4b71Sopenharmony_ci
3822e41f4b71Sopenharmony_ciDefines the index of the output pixel map.
3823e41f4b71Sopenharmony_ci
3824e41f4b71Sopenharmony_ci**Since**: 10
3825e41f4b71Sopenharmony_ci
3826e41f4b71Sopenharmony_ci
3827e41f4b71Sopenharmony_ci### isCompleted
3828e41f4b71Sopenharmony_ci
3829e41f4b71Sopenharmony_ci```
3830e41f4b71Sopenharmony_ciint8_t OhosImageSourceUpdateData::isCompleted = 0
3831e41f4b71Sopenharmony_ci```
3832e41f4b71Sopenharmony_ci
3833e41f4b71Sopenharmony_ci**Description**
3834e41f4b71Sopenharmony_ci
3835e41f4b71Sopenharmony_ciDefines whether the image source data update is completed.
3836e41f4b71Sopenharmony_ci
3837e41f4b71Sopenharmony_ci**Since**: 10
3838e41f4b71Sopenharmony_ci
3839e41f4b71Sopenharmony_ci
3840e41f4b71Sopenharmony_ci### offset
3841e41f4b71Sopenharmony_ci
3842e41f4b71Sopenharmony_ci```
3843e41f4b71Sopenharmony_ciuint32_t OhosImageSourceUpdateData::offset = 0
3844e41f4b71Sopenharmony_ci```
3845e41f4b71Sopenharmony_ci
3846e41f4b71Sopenharmony_ci**Description**
3847e41f4b71Sopenharmony_ci
3848e41f4b71Sopenharmony_ciDefines the offset of the update data in the buffer.
3849e41f4b71Sopenharmony_ci
3850e41f4b71Sopenharmony_ci**Since**: 10
3851e41f4b71Sopenharmony_ci
3852e41f4b71Sopenharmony_ci
3853e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE
3854e41f4b71Sopenharmony_ci
3855e41f4b71Sopenharmony_ci```
3856e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"
3857e41f4b71Sopenharmony_ci```
3858e41f4b71Sopenharmony_ci
3859e41f4b71Sopenharmony_ci**Description**
3860e41f4b71Sopenharmony_ci
3861e41f4b71Sopenharmony_ciDefines a pointer to bits per sample, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3862e41f4b71Sopenharmony_ci
3863e41f4b71Sopenharmony_ci**Since**: 10
3864e41f4b71Sopenharmony_ci
3865e41f4b71Sopenharmony_ci
3866e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL
3867e41f4b71Sopenharmony_ci
3868e41f4b71Sopenharmony_ci```
3869e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel"
3870e41f4b71Sopenharmony_ci```
3871e41f4b71Sopenharmony_ci
3872e41f4b71Sopenharmony_ci**Description**
3873e41f4b71Sopenharmony_ci
3874e41f4b71Sopenharmony_ciDefines a pointer to the compressed bits per pixel, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3875e41f4b71Sopenharmony_ci
3876e41f4b71Sopenharmony_ci**Since**: 10
3877e41f4b71Sopenharmony_ci
3878e41f4b71Sopenharmony_ci
3879e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL
3880e41f4b71Sopenharmony_ci
3881e41f4b71Sopenharmony_ci```
3882e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"
3883e41f4b71Sopenharmony_ci```
3884e41f4b71Sopenharmony_ci
3885e41f4b71Sopenharmony_ci**Description**
3886e41f4b71Sopenharmony_ci
3887e41f4b71Sopenharmony_ciDefines a pointer to the created date and time, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3888e41f4b71Sopenharmony_ci
3889e41f4b71Sopenharmony_ci**Since**: 10
3890e41f4b71Sopenharmony_ci
3891e41f4b71Sopenharmony_ci
3892e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_EXPOSURE_TIME
3893e41f4b71Sopenharmony_ci
3894e41f4b71Sopenharmony_ci```
3895e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"
3896e41f4b71Sopenharmony_ci```
3897e41f4b71Sopenharmony_ci
3898e41f4b71Sopenharmony_ci**Description**
3899e41f4b71Sopenharmony_ci
3900e41f4b71Sopenharmony_ciDefines a pointer to the exposure time, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3901e41f4b71Sopenharmony_ci
3902e41f4b71Sopenharmony_ci**Since**: 10
3903e41f4b71Sopenharmony_ci
3904e41f4b71Sopenharmony_ci
3905e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_F_NUMBER
3906e41f4b71Sopenharmony_ci
3907e41f4b71Sopenharmony_ci```
3908e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"
3909e41f4b71Sopenharmony_ci```
3910e41f4b71Sopenharmony_ci
3911e41f4b71Sopenharmony_ci**Description**
3912e41f4b71Sopenharmony_ci
3913e41f4b71Sopenharmony_ciDefines a pointer to the f-number of the image, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3914e41f4b71Sopenharmony_ci
3915e41f4b71Sopenharmony_ci**Since**: 10
3916e41f4b71Sopenharmony_ci
3917e41f4b71Sopenharmony_ci
3918e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_GPS_LATITUDE
3919e41f4b71Sopenharmony_ci
3920e41f4b71Sopenharmony_ci```
3921e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"
3922e41f4b71Sopenharmony_ci```
3923e41f4b71Sopenharmony_ci
3924e41f4b71Sopenharmony_ci**Description**
3925e41f4b71Sopenharmony_ci
3926e41f4b71Sopenharmony_ciDefines a pointer to the GPS latitude, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3927e41f4b71Sopenharmony_ci
3928e41f4b71Sopenharmony_ci**Since**: 10
3929e41f4b71Sopenharmony_ci
3930e41f4b71Sopenharmony_ci
3931e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF
3932e41f4b71Sopenharmony_ci
3933e41f4b71Sopenharmony_ci```
3934e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"
3935e41f4b71Sopenharmony_ci```
3936e41f4b71Sopenharmony_ci
3937e41f4b71Sopenharmony_ci**Description**
3938e41f4b71Sopenharmony_ci
3939e41f4b71Sopenharmony_ciDefines a pointer to the GPS latitude reference information, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3940e41f4b71Sopenharmony_ci
3941e41f4b71Sopenharmony_ci**Since**: 10
3942e41f4b71Sopenharmony_ci
3943e41f4b71Sopenharmony_ci
3944e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_GPS_LONGITUDE
3945e41f4b71Sopenharmony_ci
3946e41f4b71Sopenharmony_ci```
3947e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"
3948e41f4b71Sopenharmony_ci```
3949e41f4b71Sopenharmony_ci
3950e41f4b71Sopenharmony_ci**Description**
3951e41f4b71Sopenharmony_ci
3952e41f4b71Sopenharmony_ciDefines a pointer to the GPS longitude, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3953e41f4b71Sopenharmony_ci
3954e41f4b71Sopenharmony_ci**Since**: 10
3955e41f4b71Sopenharmony_ci
3956e41f4b71Sopenharmony_ci
3957e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF
3958e41f4b71Sopenharmony_ci
3959e41f4b71Sopenharmony_ci```
3960e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"
3961e41f4b71Sopenharmony_ci```
3962e41f4b71Sopenharmony_ci
3963e41f4b71Sopenharmony_ci**Description**
3964e41f4b71Sopenharmony_ci
3965e41f4b71Sopenharmony_ciDefines a pointer to the GPS longitude reference information, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3966e41f4b71Sopenharmony_ci
3967e41f4b71Sopenharmony_ci
3968e41f4b71Sopenharmony_ci**Since**: 10
3969e41f4b71Sopenharmony_ci
3970e41f4b71Sopenharmony_ci
3971e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_IMAGE_LENGTH
3972e41f4b71Sopenharmony_ci
3973e41f4b71Sopenharmony_ci```
3974e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"
3975e41f4b71Sopenharmony_ci```
3976e41f4b71Sopenharmony_ci
3977e41f4b71Sopenharmony_ci**Description**
3978e41f4b71Sopenharmony_ci
3979e41f4b71Sopenharmony_ciDefines a pointer to the image length, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3980e41f4b71Sopenharmony_ci
3981e41f4b71Sopenharmony_ci**Since**: 10
3982e41f4b71Sopenharmony_ci
3983e41f4b71Sopenharmony_ci
3984e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_IMAGE_WIDTH
3985e41f4b71Sopenharmony_ci
3986e41f4b71Sopenharmony_ci```
3987e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"
3988e41f4b71Sopenharmony_ci```
3989e41f4b71Sopenharmony_ci
3990e41f4b71Sopenharmony_ci**Description**
3991e41f4b71Sopenharmony_ci
3992e41f4b71Sopenharmony_ciDefines a pointer to the image width, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
3993e41f4b71Sopenharmony_ci
3994e41f4b71Sopenharmony_ci
3995e41f4b71Sopenharmony_ci**Since**: 10
3996e41f4b71Sopenharmony_ci
3997e41f4b71Sopenharmony_ci
3998e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS
3999e41f4b71Sopenharmony_ci
4000e41f4b71Sopenharmony_ci```
4001e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"
4002e41f4b71Sopenharmony_ci```
4003e41f4b71Sopenharmony_ci
4004e41f4b71Sopenharmony_ci**Description**
4005e41f4b71Sopenharmony_ci
4006e41f4b71Sopenharmony_ciDefines a pointer to the ISO speed ratings, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
4007e41f4b71Sopenharmony_ci
4008e41f4b71Sopenharmony_ci**Since**: 10
4009e41f4b71Sopenharmony_ci
4010e41f4b71Sopenharmony_ci
4011e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_ORIENTATION
4012e41f4b71Sopenharmony_ci
4013e41f4b71Sopenharmony_ci```
4014e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"
4015e41f4b71Sopenharmony_ci```
4016e41f4b71Sopenharmony_ci
4017e41f4b71Sopenharmony_ci**Description**
4018e41f4b71Sopenharmony_ci
4019e41f4b71Sopenharmony_ciDefines a pointer to the orientation, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
4020e41f4b71Sopenharmony_ci
4021e41f4b71Sopenharmony_ci**Since**: 10
4022e41f4b71Sopenharmony_ci
4023e41f4b71Sopenharmony_ci
4024e41f4b71Sopenharmony_ci### OHOS_IMAGE_PROPERTY_SCENE_TYPE
4025e41f4b71Sopenharmony_ci
4026e41f4b71Sopenharmony_ci```
4027e41f4b71Sopenharmony_ciconst char* OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"
4028e41f4b71Sopenharmony_ci```
4029e41f4b71Sopenharmony_ci
4030e41f4b71Sopenharmony_ci**Description**
4031e41f4b71Sopenharmony_ci
4032e41f4b71Sopenharmony_ciDefines a pointer to the scene type, one of the image properties. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesource_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesource_modifyimageproperty).
4033e41f4b71Sopenharmony_ci
4034e41f4b71Sopenharmony_ci**Since**: 10
4035e41f4b71Sopenharmony_ci
4036e41f4b71Sopenharmony_ci
4037e41f4b71Sopenharmony_ci### pixelFormat [1/3]
4038e41f4b71Sopenharmony_ci
4039e41f4b71Sopenharmony_ci```
4040e41f4b71Sopenharmony_ciint32_t OhosImageSourceOps::pixelFormat
4041e41f4b71Sopenharmony_ci```
4042e41f4b71Sopenharmony_ci
4043e41f4b71Sopenharmony_ci**Description**
4044e41f4b71Sopenharmony_ci
4045e41f4b71Sopenharmony_ciDefines the pixel format of the image source. It is usually used to describe the YUV buffer.
4046e41f4b71Sopenharmony_ci
4047e41f4b71Sopenharmony_ci**Since**: 10
4048e41f4b71Sopenharmony_ci
4049e41f4b71Sopenharmony_ci
4050e41f4b71Sopenharmony_ci### pixelFormat [2/3]
4051e41f4b71Sopenharmony_ci
4052e41f4b71Sopenharmony_ci```
4053e41f4b71Sopenharmony_ciint32_t OhosImageDecodingOps::pixelFormat
4054e41f4b71Sopenharmony_ci```
4055e41f4b71Sopenharmony_ci
4056e41f4b71Sopenharmony_ci**Description**
4057e41f4b71Sopenharmony_ci
4058e41f4b71Sopenharmony_ciDefines the pixel format of the output pixel map.
4059e41f4b71Sopenharmony_ci
4060e41f4b71Sopenharmony_ci**Since**: 10
4061e41f4b71Sopenharmony_ci
4062e41f4b71Sopenharmony_ci
4063e41f4b71Sopenharmony_ci### pixelFormat [3/3]
4064e41f4b71Sopenharmony_ci
4065e41f4b71Sopenharmony_ci```
4066e41f4b71Sopenharmony_ciint32_t OhosImageSourceInfo::pixelFormat
4067e41f4b71Sopenharmony_ci```
4068e41f4b71Sopenharmony_ci
4069e41f4b71Sopenharmony_ci**Description**
4070e41f4b71Sopenharmony_ci
4071e41f4b71Sopenharmony_ciDefines the pixel format of the image source. It is set in [OH_ImageSource_Create](#oh_imagesource_create).
4072e41f4b71Sopenharmony_ci
4073e41f4b71Sopenharmony_ci**Since**: 10
4074e41f4b71Sopenharmony_ci
4075e41f4b71Sopenharmony_ci
4076e41f4b71Sopenharmony_ci### region
4077e41f4b71Sopenharmony_ci
4078e41f4b71Sopenharmony_ci```
4079e41f4b71Sopenharmony_cistruct OhosImageRegion OhosImageDecodingOps::region
4080e41f4b71Sopenharmony_ci```
4081e41f4b71Sopenharmony_ci
4082e41f4b71Sopenharmony_ci**Description**
4083e41f4b71Sopenharmony_ci
4084e41f4b71Sopenharmony_ciDefines the region of the output pixel map.
4085e41f4b71Sopenharmony_ci
4086e41f4b71Sopenharmony_ci**Since**: 10
4087e41f4b71Sopenharmony_ci
4088e41f4b71Sopenharmony_ci
4089e41f4b71Sopenharmony_ci### rotate
4090e41f4b71Sopenharmony_ci
4091e41f4b71Sopenharmony_ci```
4092e41f4b71Sopenharmony_ciuint32_t OhosImageDecodingOps::rotate
4093e41f4b71Sopenharmony_ci```
4094e41f4b71Sopenharmony_ci
4095e41f4b71Sopenharmony_ci**Description**
4096e41f4b71Sopenharmony_ci
4097e41f4b71Sopenharmony_ciDefines the decoding rotation options.
4098e41f4b71Sopenharmony_ci
4099e41f4b71Sopenharmony_ci**Since**: 10
4100e41f4b71Sopenharmony_ci
4101e41f4b71Sopenharmony_ci
4102e41f4b71Sopenharmony_ci### sampleSize
4103e41f4b71Sopenharmony_ci
4104e41f4b71Sopenharmony_ci```
4105e41f4b71Sopenharmony_ciuint32_t OhosImageDecodingOps::sampleSize
4106e41f4b71Sopenharmony_ci```
4107e41f4b71Sopenharmony_ci
4108e41f4b71Sopenharmony_ci**Description**
4109e41f4b71Sopenharmony_ci
4110e41f4b71Sopenharmony_ciDefines the size of the sample.
4111e41f4b71Sopenharmony_ci
4112e41f4b71Sopenharmony_ci**Since**: 10
4113e41f4b71Sopenharmony_ci
4114e41f4b71Sopenharmony_ci
4115e41f4b71Sopenharmony_ci### size [1/7]
4116e41f4b71Sopenharmony_ci
4117e41f4b71Sopenharmony_ci```
4118e41f4b71Sopenharmony_cistruct OhosImageSize OhosImageSourceOps::size
4119e41f4b71Sopenharmony_ci```
4120e41f4b71Sopenharmony_ci
4121e41f4b71Sopenharmony_ci**Description**
4122e41f4b71Sopenharmony_ci
4123e41f4b71Sopenharmony_ciDefines the pixel width and height of the image source.
4124e41f4b71Sopenharmony_ci
4125e41f4b71Sopenharmony_ci**Since**: 10
4126e41f4b71Sopenharmony_ci
4127e41f4b71Sopenharmony_ci
4128e41f4b71Sopenharmony_ci### size [2/7]
4129e41f4b71Sopenharmony_ci
4130e41f4b71Sopenharmony_ci```
4131e41f4b71Sopenharmony_cistruct OhosImageSize OhosImageDecodingOps::size
4132e41f4b71Sopenharmony_ci```
4133e41f4b71Sopenharmony_ci
4134e41f4b71Sopenharmony_ci**Description**
4135e41f4b71Sopenharmony_ci
4136e41f4b71Sopenharmony_ciDefines the pixel width and height of the output pixel map.
4137e41f4b71Sopenharmony_ci
4138e41f4b71Sopenharmony_ci**Since**: 10
4139e41f4b71Sopenharmony_ci
4140e41f4b71Sopenharmony_ci
4141e41f4b71Sopenharmony_ci### size [3/7]
4142e41f4b71Sopenharmony_ci
4143e41f4b71Sopenharmony_ci```
4144e41f4b71Sopenharmony_cistruct OhosImageSize OhosImageSourceInfo::size
4145e41f4b71Sopenharmony_ci```
4146e41f4b71Sopenharmony_ci
4147e41f4b71Sopenharmony_ci**Description**
4148e41f4b71Sopenharmony_ci
4149e41f4b71Sopenharmony_ciDefines the pixel width and height of the image source.
4150e41f4b71Sopenharmony_ci
4151e41f4b71Sopenharmony_ci**Since**: 10
4152e41f4b71Sopenharmony_ci
4153e41f4b71Sopenharmony_ci
4154e41f4b71Sopenharmony_ci### size [4/7]
4155e41f4b71Sopenharmony_ci
4156e41f4b71Sopenharmony_ci```
4157e41f4b71Sopenharmony_cisize_t OhosImageSourceDelayTimeList::size = 0
4158e41f4b71Sopenharmony_ci```
4159e41f4b71Sopenharmony_ci
4160e41f4b71Sopenharmony_ci**Description**
4161e41f4b71Sopenharmony_ci
4162e41f4b71Sopenharmony_ciDefines the size of the image source delay time list.
4163e41f4b71Sopenharmony_ci
4164e41f4b71Sopenharmony_ci**Since**: 10
4165e41f4b71Sopenharmony_ci
4166e41f4b71Sopenharmony_ci
4167e41f4b71Sopenharmony_ci### size [5/7]
4168e41f4b71Sopenharmony_ci
4169e41f4b71Sopenharmony_ci```
4170e41f4b71Sopenharmony_cisize_t OhosImageSourceSupportedFormat::size = 0
4171e41f4b71Sopenharmony_ci```
4172e41f4b71Sopenharmony_ci
4173e41f4b71Sopenharmony_ci**Description**
4174e41f4b71Sopenharmony_ci
4175e41f4b71Sopenharmony_ciDefines the size of the format string.
4176e41f4b71Sopenharmony_ci
4177e41f4b71Sopenharmony_ci**Since**: 10
4178e41f4b71Sopenharmony_ci
4179e41f4b71Sopenharmony_ci
4180e41f4b71Sopenharmony_ci### size [6/7]
4181e41f4b71Sopenharmony_ci
4182e41f4b71Sopenharmony_ci```
4183e41f4b71Sopenharmony_cisize_t OhosImageSourceSupportedFormatList::size = 0
4184e41f4b71Sopenharmony_ci```
4185e41f4b71Sopenharmony_ci
4186e41f4b71Sopenharmony_ci**Description**
4187e41f4b71Sopenharmony_ci
4188e41f4b71Sopenharmony_ciDefines the size of the format string list.
4189e41f4b71Sopenharmony_ci
4190e41f4b71Sopenharmony_ci**Since**: 10
4191e41f4b71Sopenharmony_ci
4192e41f4b71Sopenharmony_ci
4193e41f4b71Sopenharmony_ci### size [7/7]
4194e41f4b71Sopenharmony_ci
4195e41f4b71Sopenharmony_ci```
4196e41f4b71Sopenharmony_cisize_t OhosImageSourceProperty::size = 0
4197e41f4b71Sopenharmony_ci```
4198e41f4b71Sopenharmony_ci
4199e41f4b71Sopenharmony_ci**Description**
4200e41f4b71Sopenharmony_ci
4201e41f4b71Sopenharmony_ciDefines the size of the property string.
4202e41f4b71Sopenharmony_ci
4203e41f4b71Sopenharmony_ci**Since**: 10
4204e41f4b71Sopenharmony_ci
4205e41f4b71Sopenharmony_ci
4206e41f4b71Sopenharmony_ci### supportedFormatList
4207e41f4b71Sopenharmony_ci
4208e41f4b71Sopenharmony_ci```
4209e41f4b71Sopenharmony_cistruct OhosImageSourceSupportedFormat** OhosImageSourceSupportedFormatList::supportedFormatList = nullptr
4210e41f4b71Sopenharmony_ci```
4211e41f4b71Sopenharmony_ci
4212e41f4b71Sopenharmony_ci**Description**
4213e41f4b71Sopenharmony_ci
4214e41f4b71Sopenharmony_ciDefines a double pointer to the head of the format string list.
4215e41f4b71Sopenharmony_ci
4216e41f4b71Sopenharmony_ci**Since**: 10
4217e41f4b71Sopenharmony_ci
4218e41f4b71Sopenharmony_ci
4219e41f4b71Sopenharmony_ci### updateLength
4220e41f4b71Sopenharmony_ci
4221e41f4b71Sopenharmony_ci```
4222e41f4b71Sopenharmony_ciuint32_t OhosImageSourceUpdateData::updateLength = 0
4223e41f4b71Sopenharmony_ci```
4224e41f4b71Sopenharmony_ci
4225e41f4b71Sopenharmony_ci**Description**
4226e41f4b71Sopenharmony_ci
4227e41f4b71Sopenharmony_ciDefines the length of the update data in the buffer.
4228e41f4b71Sopenharmony_ci
4229e41f4b71Sopenharmony_ci**Since**: 10
4230e41f4b71Sopenharmony_ci
4231e41f4b71Sopenharmony_ci
4232e41f4b71Sopenharmony_ci### uri
4233e41f4b71Sopenharmony_ci
4234e41f4b71Sopenharmony_ci```
4235e41f4b71Sopenharmony_cichar* OhosImageSource::uri = nullptr
4236e41f4b71Sopenharmony_ci```
4237e41f4b71Sopenharmony_ci
4238e41f4b71Sopenharmony_ci**Description**
4239e41f4b71Sopenharmony_ci
4240e41f4b71Sopenharmony_ciDefines a pointer to the image source URI. Only a file URI or Base64 URI is accepted.
4241e41f4b71Sopenharmony_ci
4242e41f4b71Sopenharmony_ci**Since**: 10
4243e41f4b71Sopenharmony_ci
4244e41f4b71Sopenharmony_ci
4245e41f4b71Sopenharmony_ci### uriSize
4246e41f4b71Sopenharmony_ci
4247e41f4b71Sopenharmony_ci```
4248e41f4b71Sopenharmony_cisize_t OhosImageSource::uriSize = 0
4249e41f4b71Sopenharmony_ci```
4250e41f4b71Sopenharmony_ci
4251e41f4b71Sopenharmony_ci**Description**
4252e41f4b71Sopenharmony_ci
4253e41f4b71Sopenharmony_ciDefines the length of the image source URI.
4254e41f4b71Sopenharmony_ci
4255e41f4b71Sopenharmony_ci**Since**: 10
4256e41f4b71Sopenharmony_ci
4257e41f4b71Sopenharmony_ci
4258e41f4b71Sopenharmony_ci### value
4259e41f4b71Sopenharmony_ci
4260e41f4b71Sopenharmony_ci```
4261e41f4b71Sopenharmony_cichar* OhosImageSourceProperty::value = nullptr
4262e41f4b71Sopenharmony_ci```
4263e41f4b71Sopenharmony_ci
4264e41f4b71Sopenharmony_ci**Description**
4265e41f4b71Sopenharmony_ci
4266e41f4b71Sopenharmony_ciDefines a pointer to the head of the property string.
4267e41f4b71Sopenharmony_ci
4268e41f4b71Sopenharmony_ci**Since**: 10
4269e41f4b71Sopenharmony_ci
4270e41f4b71Sopenharmony_ci
4271e41f4b71Sopenharmony_ci### width
4272e41f4b71Sopenharmony_ci
4273e41f4b71Sopenharmony_ci```
4274e41f4b71Sopenharmony_ciint32_t OhosImageRegion::width
4275e41f4b71Sopenharmony_ci```
4276e41f4b71Sopenharmony_ci
4277e41f4b71Sopenharmony_ci**Description**
4278e41f4b71Sopenharmony_ci
4279e41f4b71Sopenharmony_ciDefines the width of the region, in pixels.
4280e41f4b71Sopenharmony_ci
4281e41f4b71Sopenharmony_ci**Since**: 10
4282e41f4b71Sopenharmony_ci
4283e41f4b71Sopenharmony_ci
4284e41f4b71Sopenharmony_ci### x
4285e41f4b71Sopenharmony_ci
4286e41f4b71Sopenharmony_ci```
4287e41f4b71Sopenharmony_ciint32_t OhosImageRegion::x
4288e41f4b71Sopenharmony_ci```
4289e41f4b71Sopenharmony_ci
4290e41f4b71Sopenharmony_ci**Description**
4291e41f4b71Sopenharmony_ci
4292e41f4b71Sopenharmony_ciDefines the X coordinate of the start point, in pixels.
4293e41f4b71Sopenharmony_ci
4294e41f4b71Sopenharmony_ci**Since**: 10
4295e41f4b71Sopenharmony_ci
4296e41f4b71Sopenharmony_ci
4297e41f4b71Sopenharmony_ci### y
4298e41f4b71Sopenharmony_ci
4299e41f4b71Sopenharmony_ci```
4300e41f4b71Sopenharmony_ciint32_t OhosImageRegion::y
4301e41f4b71Sopenharmony_ci```
4302e41f4b71Sopenharmony_ci
4303e41f4b71Sopenharmony_ci**Description**
4304e41f4b71Sopenharmony_ci
4305e41f4b71Sopenharmony_ciDefines the Y coordinate of the start point, in pixels.
4306e41f4b71Sopenharmony_ci
4307e41f4b71Sopenharmony_ci**Since**: 10
4308