• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Image_NativeModule
2
3
4## Overview
5
6The Image_NativeModule module provides image processing capabilities, including encoding and decoding an image and obtaining image data from the native layer.
7
8The APIs of this module do not need to be imported through the JS interface. You can directly use the NDK to develop the features.
9
10You can refer to the corresponding development guide and samples based on your development requirements.
11
12- [Using Image_NativeModule to Decode Images](../../media/image/image-source-c.md)
13- [Using Image_NativeModule to Decode Pictures](../../media/image/image-source-picture-c.md)
14- [Using Image_NativeModule to Receive Images](../../media/image/image-receiver-c.md)
15- [Using Image_NativeModule for PixelMap Operations](../../media/image/pixelmap-c.md)
16- [Using Image_NativeModule to Process Image Information](../../media/image/image-info-c.md)
17- [Using Image_NativeModule to Encode Images](../../media/image/image-packer-c.md)
18- [Using Image_NativeModule to Encode Pictures](../../media/image/image-packer-picture-c.md)
19
20**Since**: 12
21
22
23## Summary
24
25
26### Files
27
28| Name| Description|
29| -------- | -------- |
30| [image_common.h](image__common_8h.md) | Declares the common enums and structs used by the image interface. |
31| [image_native.h](image__native_8h.md) | Declares the cropping rectangle, size, and component data of an image. |
32| [image_packer_native.h](image__packer__native_8h.md) | Declares the APIs for image encoding. |
33| [image_receiver_native.h](image__receiver__native_8h.md) | Declares the APIs used to obtain image data from the native layer. |
34| [image_source_native.h](image__source__native_8h.md) | Declares the APIs for image decoding. |
35| [picture_native.h](picture__native_8h.md) | Declares the APIs for obtaining picture data and information. |
36| [pixelmap_native.h](pixelmap__native_8h.md) | Declares the APIs for accessing a PixelMap. |
37
38
39### Structs
40
41| Name| Description|
42| -------- | -------- |
43| struct  [Image_Size](_image___size.md) | Describes the image size. |
44| struct  [Image_Region](_image___region.md) | Describes the region of an image to decode. |
45| struct  [Image_String](_image___string.md) | Describes an image string. |
46| struct  [OH_Pixelmap_HdrStaticMetadata](_o_h___pixelmap___hdr_static_metadata.md) | Describes the static metadata values available for the key **HDR_STATIC_METADATA**. |
47| struct  [OH_Pixelmap_HdrDynamicMetadata](_o_h___pixelmap___hdr_dynamic_metadata.md) | Describes the dynamic metadata values available for the key **DR_DYNAMIC_METADATA**. |
48| struct  [OH_Pixelmap_HdrGainmapMetadata](_o_h___pixelmap___hdr_gainmap_metadata.md) | Describes the gain map metadata values available for the key **HDR_GAINMAP_METADATA**. For details, see ISO 21496-1. |
49| struct  [OH_Pixelmap_HdrMetadataValue](_o_h___pixelmap___hdr_metadata_value.md) | Describes the HDR metadata values used by the PixelMap and available for the key **OH_Pixelmap_HdrMetadataKey**. |
50
51
52### Types
53
54| Name| Description|
55| -------- | -------- |
56| typedef struct [Image_Size](_image___size.md) [Image_Size](#image_size) | Defines a struct for the image size. |
57| typedef struct [Image_Region](_image___region.md) [Image_Region](#image_region) | Defines a struct for the region of an image to decode. |
58| typedef struct [OH_PictureMetadata](#oh_picturemetadata) [OH_PictureMetadata](#oh_picturemetadata) | Defines a struct for the picture metadata. |
59| typedef struct [Image_String](_image___string.md) [Image_String](#image_string) | Defines a struct for an image string. |
60| typedef struct [Image_String](_image___string.md) [Image_MimeType](#image_mimetype) | Defines a struct for an image format type. |
61| typedef struct [OH_ImageNative](#oh_imagenative) [OH_ImageNative](#oh_imagenative) | Defines the alias for an image object at the native layer. |
62| typedef struct [OH_ImagePackerNative](#oh_imagepackernative) [OH_ImagePackerNative](#oh_imagepackernative) | Defines a struct for the image packer, which is used to perform operations related to an image packer. |
63| typedef struct [OH_PackingOptions](#oh_packingoptions) [OH_PackingOptions](#oh_packingoptions) | Defines a struct for image encoding parameters. |
64| typedef struct [OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) [OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) | Defines a struct for image sequence encoding parameters. |
65| typedef struct [OH_ImageReceiverNative](#oh_imagereceivernative) [OH_ImageReceiverNative](#oh_imagereceivernative) | Defines the data type name of the image receiver at the native layer. |
66| typedef struct [OH_ImageReceiverOptions](#oh_imagereceiveroptions) [OH_ImageReceiverOptions](#oh_imagereceiveroptions) | Defines the data type name of the image receiver options. |
67| typedef void(\* [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback)) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver) | Defines the callbacks for the image receiver at the native layer. |
68| typedef struct [OH_ImageSourceNative](#oh_imagesourcenative) [OH_ImageSourceNative](#oh_imagesourcenative) | Defines a struct for the image source, which is used to perform operations related to an image source. |
69| typedef struct [OH_ImageSource_Info](#oh_imagesource_info) [OH_ImageSource_Info](#oh_imagesource_info) | Defines a struct for the image source information, which is created by calling [OH_ImageSourceInfo_Create](#oh_imagesourceinfo_create).|
70| typedef struct [OH_DecodingOptions](#oh_decodingoptions) [OH_DecodingOptions](#oh_decodingoptions) | Defines a struct for decoding options, which are used in [OH_ImageSourceNative_CreatePixelmap](#oh_imagesourcenative_createpixelmap). |
71| typedef struct [OH_PictureNative](#oh_picturenative) [OH_PictureNative](#oh_picturenative) | Defines a struct for the picture, which is used to perform operations related to the picture. |
72| typedef struct [OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) [OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) | Defines a struct for the auxiliary picture, which is used to perform operations related to the auxiliary picture. |
73| typedef struct [OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) [OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) | Defines a struct for the auxiliary picture information, which is used to perform operations related to the auxiliary picture information. |
74| typedef struct [OH_PixelmapNative](#oh_pixelmapnative) [OH_PixelmapNative](#oh_pixelmapnative) | Defines a struct for the PixelMap, which is used to perform operations related to a PixelMap.|
75| typedef struct [OH_NativeBuffer](#oh_nativebuffer) [OH_NativeBuffer](#oh_nativebuffer) | Defines a struct for the native buffer, which is used to perform operations related to the native buffer.|
76| typedef struct [OH_NativeColorSpaceManager](#oh_nativecolorspacemanager) [OH_NativeColorSpaceManager](#oh_nativecolorspacemanager) | Defines a struct for the native color space manager, which is used to perform operations related to the native color space manager. |
77| typedef struct [OH_Pixelmap_HdrStaticMetadata](_o_h___pixelmap___hdr_static_metadata.md) [OH_Pixelmap_HdrStaticMetadata](#oh_pixelmap_hdrstaticmetadata) | Defines a struct for the static metadata values available for the key **HDR_STATIC_METADATA**. |
78| typedef struct [OH_Pixelmap_HdrDynamicMetadata](_o_h___pixelmap___hdr_dynamic_metadata.md) [OH_Pixelmap_HdrDynamicMetadata](#oh_pixelmap_hdrdynamicmetadata) | Defines a struct for the dynamic metadata values available for the key **DR_DYNAMIC_METADATA**. |
79| typedef struct [OH_Pixelmap_HdrGainmapMetadata](_o_h___pixelmap___hdr_gainmap_metadata.md) [OH_Pixelmap_HdrGainmapMetadata](#oh_pixelmap_hdrgainmapmetadata) | Defines a struct for the gain map metadata values available for the key **HDR_GAINMAP_METADATA**. For details, see ISO 21496-1. |
80| typedef struct [OH_Pixelmap_HdrMetadataValue](_o_h___pixelmap___hdr_metadata_value.md) [OH_Pixelmap_HdrMetadataValue](#oh_pixelmap_hdrmetadatavalue) | Defines a struct for the HDR metadata values used by the PixelMap and available for the key **OH_Pixelmap_HdrMetadataKey**. |
81| typedef struct [OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) [OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) | Defines a struct for the initialization parameters.|
82| typedef struct [OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) [OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) | Defines a struct for the image information.|
83
84
85### Enums
86
87| Name| Description|
88| -------- | -------- |
89| [Image_ErrorCode](#image_errorcode) {<br>IMAGE_SUCCESS = 0, IMAGE_BAD_PARAMETER = 401, IMAGE_UNSUPPORTED_MIME_TYPE = 7600101, IMAGE_UNKNOWN_MIME_TYPE = 7600102,<br>IMAGE_TOO_LARGE = 7600103, IMAGE_DMA_NOT_EXIST = 7600173, IMAGE_DMA_OPERATION_FAILED = 7600174, IMAGE_UNSUPPORTED_OPERATION = 7600201,<br>IMAGE_UNSUPPORTED_METADATA = 7600202, IMAGE_UNSUPPORTED_CONVERSION = 7600203, IMAGE_INVALID_REGION = 7600204, IMAGE_UNSUPPORTED_MEMORY_FORMAT = 7600205,<br>IMAGE_ALLOC_FAILED = 7600301, IMAGE_COPY_FAILED = 7600302, IMAGE_LOCK_UNLOCK_FAILED = 7600303, IMAGE_UNKNOWN_ERROR = 7600901,<br>IMAGE_BAD_SOURCE = 7700101,<br>IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE = 7700102,<br>IMAGE_SOURCE_TOO_LARGE = 7700103,<br>IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE = 7700201,<br>IMAGE_SOURCE_UNSUPPORTED_OPTIONS = 7700203, <br>IMAGE_DECODE_FAILED = 7700301,<br>IMAGE_SOURCE_ALLOC_FAILED = 7700302,<br>IMAGE_ENCODE_FAILED = 7800301<br>} | Enumerates the error codes.|
90| [Image_MetadataType](#image_metadatatype) { EXIF_METADATA = 1, FRAGMENT_METADATA = 2 } | Enumerates the metadata types. |
91| [IMAGE_PACKER_DYNAMIC_RANGE](#image_packer_dynamic_range) {<br>IMAGE_PACKER_DYNAMIC_RANGE_AUTO = 0,<br>IMAGE_PACKER_DYNAMIC_RANGE_SDR = 1 } | Enumerates the desired dynamic range for encoding.|
92| [IMAGE_DYNAMIC_RANGE](#image_dynamic_range) {<br>IMAGE_DYNAMIC_RANGE_AUTO = 0,<br>IMAGE_DYNAMIC_RANGE_SDR = 1,<br>IMAGE_DYNAMIC_RANGE_HDR = 2 } | Enumerates the desired dynamic range for decoding.|
93| [IMAGE_ALLOCATOR_TYPE](#image_allocator_type) {<br>IMAGE_ALLOCATOR_TYPE_AUTO = 0,<br>IMAGE_ALLOCATOR_TYPE_DMA = 1,<br>IMAGE_ALLOCATOR_TYPE_SHARE_MEMORY = 2 } | Enumerates the types of allocators used to allocate PixelMap memory.|
94| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) {<br>AUXILIARY_PICTURE_TYPE_GAINMAP = 1, AUXILIARY_PICTURE_TYPE_DEPTH_MAP = 2, AUXILIARY_PICTURE_TYPE_UNREFOCUS_MAP = 3, AUXILIARY_PICTURE_TYPE_LINEAR_MAP = 4,<br>AUXILIARY_PICTURE_TYPE_FRAGMENT_MAP = 5<br>} | Enumerates the auxiliary picture types. |
95| [PIXELMAP_ALPHA_TYPE](#pixelmap_alpha_type) {<br>PIXELMAP_ALPHA_TYPE_UNKNOWN = 0,<br>PIXELMAP_ALPHA_TYPE_OPAQUE = 1,<br>PIXELMAP_ALPHA_TYPE_PREMULTIPLIED = 2, <br>PIXELMAP_ALPHA_TYPE_UNPREMULTIPLIED = 3 } | Enumerates the alpha types of a PixelMap.|
96| [PIXEL_FORMAT](#pixel_format) {<br>PIXEL_FORMAT_UNKNOWN = 0, PIXEL_FORMAT_RGB_565 = 2,<br>PIXEL_FORMAT_RGBA_8888 = 3, PIXEL_FORMAT_BGRA_8888 = 4,<br>PIXEL_FORMAT_RGB_888 = 5, PIXEL_FORMAT_ALPHA_8 = 6,<br>PIXEL_FORMAT_RGBA_F16 = 7, PIXEL_FORMAT_NV21 = 8,<br>PIXEL_FORMAT_NV12 = 9, <br>PIXEL_FORMAT_RGBA_1010102 = 10, <br>PIXEL_FORMAT_YCBCR_P010 = 11, <br>PIXEL_FORMAT_YCRCB_P010 = 12<br>} | Enumerates the image pixel formats.|
97| [OH_PixelmapNative_AntiAliasingLevel](#oh_pixelmapnative_antialiasinglevel) { <br>OH_PixelmapNative_AntiAliasing_NONE = 0, <br>OH_PixelmapNative_AntiAliasing_LOW = 1, <br>OH_PixelmapNative_AntiAliasing_MEDIUM = 2, <br>OH_PixelmapNative_AntiAliasing_HIGH = 3 <br>} | Enumerates the anti-aliasing levels used for scaling PixelMaps. |
98| [OH_Pixelmap_HdrMetadataKey](#oh_pixelmap_hdrmetadatakey) { <br>HDR_METADATA_TYPE = 0, <br>HDR_STATIC_METADATA = 1, <br>HDR_DYNAMIC_METADATA = 2, <br>HDR_GAINMAP_METADATA = 3 } | Enumerates the keys of the HDR related metadata information used by the PixelMap. It is used in [OH_PixelmapNative_SetMetadata](#oh_pixelmapnative_setmetadata) and [OH_PixelmapNative_GetMetadata](#oh_pixelmapnative_getmetadata). |
99| [OH_Pixelmap_HdrMetadataType](#oh_pixelmap_hdrmetadatatype) { <br>HDR_METADATA_TYPE_NONE = 0, <br>HDR_METADATA_TYPE_BASE = 1, <br>HDR_METADATA_TYPE_GAINMAP = 2, <br>HDR_METADATA_TYPE_ALTERNATE = 3 } | Enumerates the HDR metadata types, which are the values of **HDR_METADATA_TYPE**. |
100
101
102### Functions
103
104| Name| Description|
105| -------- | -------- |
106| [Image_ErrorCode](#image_errorcode) [OH_PictureMetadata_Create](#oh_picturemetadata_create) ([Image_MetadataType](#image_metadatatype) metadataType, [OH_PictureMetadata](#oh_picturemetadata) \*\*metadata) | Creates the pointer to an **OH_PictureMetadata** struct. |
107| [Image_ErrorCode](#image_errorcode) [OH_PictureMetadata_GetProperty](#oh_picturemetadata_getproperty) ([OH_PictureMetadata](#oh_picturemetadata) \*metadata, [Image_String](_image___string.md) \*key, [Image_String](_image___string.md) \*value) | Obtains a property of metadata based on the key. |
108| [Image_ErrorCode](#image_errorcode) [OH_PictureMetadata_SetProperty](#oh_picturemetadata_setproperty) ([OH_PictureMetadata](#oh_picturemetadata) \*metadata, [Image_String](_image___string.md) \*key, [Image_String](_image___string.md) \*value) | Sets a property of metadata based on the key. |
109| [Image_ErrorCode](#image_errorcode) [OH_PictureMetadata_Release](#oh_picturemetadata_release) ([OH_PictureMetadata](#oh_picturemetadata) \*metadata) | Releases the pointer to an **OH_PictureMetadata** struct. |
110| [Image_ErrorCode](#image_errorcode) [OH_PictureMetadata_Clone](#oh_picturemetadata_clone) ([OH_PictureMetadata](#oh_picturemetadata) \*oldMetadata, [OH_PictureMetadata](#oh_picturemetadata) \*\*newMetadata) | Clones metadata. |
111| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_GetImageSize](#oh_imagenative_getimagesize) ([OH_ImageNative](#oh_imagenative) \*image, [Image_Size](_image___size.md) \*size) | Obtains the [Image_Size](_image___size.md) information of a native [OH_ImageNative](#oh_imagenative) object. |
112| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_GetComponentTypes](#oh_imagenative_getcomponenttypes) ([OH_ImageNative](#oh_imagenative) \*image, uint32_t \*\*types, size_t \*typeSize) | Obtains the component types of a native [OH_ImageNative](#oh_imagenative) object. |
113| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_GetByteBuffer](#oh_imagenative_getbytebuffer) ([OH_ImageNative](#oh_imagenative) \*image, uint32_t componentType, OH_NativeBuffer \*\*nativeBuffer) | Obtains the buffer corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object. |
114| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_GetBufferSize](#oh_imagenative_getbuffersize) ([OH_ImageNative](#oh_imagenative) \*image, uint32_t componentType, size_t \*size) | Obtains the size of the buffer corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object. |
115| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_GetRowStride](#oh_imagenative_getrowstride) ([OH_ImageNative](#oh_imagenative) \*image, uint32_t componentType, int32_t \*rowStride) | Obtains the row stride corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object. |
116| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_GetPixelStride](#oh_imagenative_getpixelstride) ([OH_ImageNative](#oh_imagenative) \*image, uint32_t componentType, int32_t \*pixelStride) | Obtains the pixel stride corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object. |
117| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_GetTimestamp](#oh_imagenative_gettimestamp) ([OH_ImageNative](#oh_imagenative) \*image, int64_t \*timestamp) | Obtains the timestamp of a native [OH_ImageNative](#oh_imagenative) object. |
118| [Image_ErrorCode](#image_errorcode) [OH_ImageNative_Release](#oh_imagenative_release) ([OH_ImageNative](#oh_imagenative) \*image) | Releases a native [OH_ImageNative](#oh_imagenative) object. |
119| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_Create](#oh_packingoptions_create) ([OH_PackingOptions](#oh_packingoptions) \*\*options) | Creates the pointer to an **OH_PackingOptions** struct. |
120| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_GetMimeType](#oh_packingoptions_getmimetype) ([OH_PackingOptions](#oh_packingoptions) \*options, [Image_MimeType](#image_mimetype) \*format) | Obtains the MIME type.|
121| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_SetMimeType](#oh_packingoptions_setmimetype) ([OH_PackingOptions](#oh_packingoptions) \*options, [Image_MimeType](#image_mimetype) \*format) | Sets the MIME type.|
122| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_GetQuality](#oh_packingoptions_getquality) ([OH_PackingOptions](#oh_packingoptions) \*options, uint32_t \*quality) | Obtains the encoding quality. |
123| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_SetQuality](#oh_packingoptions_setquality) ([OH_PackingOptions](#oh_packingoptions) \*options, uint32_t quality) | Sets the encoding quality. |
124| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_GetDesiredDynamicRange](#oh_packingoptions_getdesireddynamicrange) ([OH_PackingOptions](#oh_packingoptions) \*options, int32_t \*desiredDynamicRange) | Obtains the desired dynamic range during encoding. |
125| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_SetDesiredDynamicRange](#oh_packingoptions_setdesireddynamicrange) ([OH_PackingOptions](#oh_packingoptions) \*options, int32_t desiredDynamicRange) | Sets the desired dynamic range during encoding. |
126| [Image_ErrorCode](#image_errorcode) [OH_PackingOptions_Release](#oh_packingoptions_release) ([OH_PackingOptions](#oh_packingoptions) \*options) | Releases the pointer to an **OH_PackingOptions** struct. |
127| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_Create](#oh_packingoptionsforsequence_create) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*\*options) | Creates the pointer to an **OH_PackingOptionsForSequence** struct. |
128| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_SetFrameCount](#oh_packingoptionsforsequence_setframecount) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, uint32_t frameCount) | Sets the number of frames for image sequence encoding. |
129| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_GetFrameCount](#oh_packingoptionsforsequence_getframecount) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, uint32_t \*frameCount) | Obtains the number of frames for image sequence encoding. |
130| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_SetDelayTimeList](#oh_packingoptionsforsequence_setdelaytimelist) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, int32_t \*delayTimeList, size_t delayTimeListLength) | Sets the delay time array for image sequence encoding. |
131| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_GetDelayTimeList](#oh_packingoptionsforsequence_getdelaytimelist) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, int32_t \*delayTimeList, size_t delayTimeListLength) | Obtains the delay time array for image sequence encoding. |
132| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_SetDisposalTypes](#oh_packingoptionsforsequence_setdisposaltypes) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, uint32_t \*disposalTypes, size_t disposalTypesLength) | Sets the disposal type array for image sequence encoding. |
133| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_GetDisposalTypes](#oh_packingoptionsforsequence_getdisposaltypes) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, uint32_t \*disposalTypes, size_t disposalTypesLength) | Obtains the disposal type array for image sequence encoding. |
134| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_SetLoopCount](#oh_packingoptionsforsequence_setloopcount) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, uint32_t loopCount) | Sets the number of loops for image sequence encoding. |
135| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_GetLoopCount](#oh_packingoptionsforsequence_getloopcount) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, uint32_t \*loopCount) | Obtains the number of loops for image sequence encoding. |
136| [Image_ErrorCode](#image_errorcode) [OH_PackingOptionsForSequence_Release](#oh_packingoptionsforsequence_release) ([OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options) | Releases the pointer to an **OH_PackingOptionsForSequence** object. |
137| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_Create](#oh_imagepackernative_create) ([OH_ImagePackerNative](#oh_imagepackernative) \*\*imagePacker) | Creates the pointer to an **OH_ImagePackerNative** object. |
138| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToDataFromImageSource](#oh_imagepackernative_packtodatafromimagesource) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptions](#oh_packingoptions) \*options, [OH_ImageSourceNative](#oh_imagesourcenative) \*imageSource, uint8_t \*outData, size_t \*size) | Encodes an image source into data in a given format. |
139| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToDataFromPixelmap](#oh_imagepackernative_packtodatafrompixelmap) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptions](#oh_packingoptions) \*options, [OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, uint8_t \*outData, size_t \*size) | Encodes a PixelMap into data in a given format. |
140| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToDataFromPicture](#oh_imagepackernative_packtodatafrompicture) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptions](#oh_packingoptions) \*options, [OH_PictureNative](#oh_picturenative) \*picture, uint8_t \*outData, size_t \*size) | Encodes a picture into data in a given format. |
141| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToDataFromPixelmapSequence](#oh_imagepackernative_packtodatafrompixelmapsequence) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, [OH_ImagePackerNative](#oh_imagepackernative) \*\*pixelmapSequence, size_t sequenceLength, uint8_t \*outData, size_t \*outDataSize) | Encodes a PixelMap sequence into data. |
142| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToFileFromImageSource](#oh_imagepackernative_packtofilefromimagesource) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptions](#oh_packingoptions) \*options, [OH_ImageSourceNative](#oh_imagesourcenative) \*imageSource, int32_t fd) | Encodes an image source into a file. |
143| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToFileFromPixelmap](#oh_imagepackernative_packtofilefrompixelmap) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptions](#oh_packingoptions) \*options, [OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, int32_t fd) | Encodes a PixelMap into a file. |
144| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToFileFromPicture](#oh_imagepackernative_packtofilefrompicture) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptions](#oh_packingoptions) \*options, [OH_PictureNative](#oh_picturenative) \*picture, int32_t fd) | Encodes a picture into a file. |
145| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_PackToFileFromPixelmapSequence](#oh_imagepackernative_packtofilefrompixelmapsequence) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker, [OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) \*options, [OH_ImagePackerNative](#oh_imagepackernative) \*\*pixelmapSequence, size_t sequenceLength, int32_t fd) | Encodes a PixelMap sequence into a file. |
146| [Image_ErrorCode](#image_errorcode) [OH_ImagePackerNative_Release](#oh_imagepackernative_release) ([OH_ImagePackerNative](#oh_imagepackernative) \*imagePacker) | Releases the pointer to an **OH_ImagePackerNative** object. |
147| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverOptions_Create](#oh_imagereceiveroptions_create) ([OH_ImageReceiverOptions](#oh_imagereceiveroptions) \*\*options) | Creates an **OH_ImageReceiverOptions** object at the application layer. |
148| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverOptions_GetSize](#oh_imagereceiveroptions_getsize) ([OH_ImageReceiverOptions](#oh_imagereceiveroptions) \*options, [Image_Size](_image___size.md) \*size) | Obtains the [Image_Size](_image___size.md) information of an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
149| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverOptions_SetSize](#oh_imagereceiveroptions_setsize) ([OH_ImageReceiverOptions](#oh_imagereceiveroptions) \*options, [Image_Size](_image___size.md) size) | Sets the [Image_Size](_image___size.md) information for an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
150| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverOptions_GetCapacity](#oh_imagereceiveroptions_getcapacity) ([OH_ImageReceiverOptions](#oh_imagereceiveroptions) \*options, int32_t \*capacity) | Obtains the capacity of an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
151| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverOptions_SetCapacity](#oh_imagereceiveroptions_setcapacity) ([OH_ImageReceiverOptions](#oh_imagereceiveroptions) \*options, int32_t capacity) | Sets the capacity for an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
152| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverOptions_Release](#oh_imagereceiveroptions_release) ([OH_ImageReceiverOptions](#oh_imagereceiveroptions) \*options) | Releases an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
153| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_Create](#oh_imagereceivernative_create) ([OH_ImageReceiverOptions](#oh_imagereceiveroptions) \*options, [OH_ImageReceiverNative](#oh_imagereceivernative) \*\*receiver) | Creates an **OH_ImageReceiverNative** object at the application layer. |
154| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_GetReceivingSurfaceId](#oh_imagereceivernative_getreceivingsurfaceid) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver, uint64_t \*surfaceId) | Obtains the receiver ID through an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
155| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_ReadLatestImage](#oh_imagereceivernative_readlatestimage) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver, [OH_ImageNative](#oh_imagenative) \*\*image) | Obtains the latest image through an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
156| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_ReadNextImage](#oh_imagereceivernative_readnextimage) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver, [OH_ImageNative](#oh_imagenative) \*\*image) | Obtains the next image through an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
157| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_On](#oh_imagereceivernative_on) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver, [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback) callback) | Registers the callback defined in [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback). |
158| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_Off](#oh_imagereceivernative_off) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver) | Unregisters the callback defined in [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback). |
159| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_GetSize](#oh_imagereceivernative_getsize) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver, [Image_Size](_image___size.md) \*size) | Obtains the size of an image receiver, which is an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
160| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_GetCapacity](#oh_imagereceivernative_getcapacity) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver, int32_t \*capacity) | Obtains the capacity of an image receiver, which is an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
161| [Image_ErrorCode](#image_errorcode) [OH_ImageReceiverNative_Release](#oh_imagereceivernative_release) ([OH_ImageReceiverNative](#oh_imagereceivernative) \*receiver) | Releases a native [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
162| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceInfo_Create](#oh_imagesourceinfo_create) ([OH_ImageSource_Info](#oh_imagesource_info) \*\*info) | Creates the pointer to an **OH_ImageSource_Info** struct. |
163| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceInfo_GetWidth](#oh_imagesourceinfo_getwidth) ([OH_ImageSource_Info](#oh_imagesource_info) \*info, uint32_t \*width) | Obtains the image width. |
164| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceInfo_GetHeight](#oh_imagesourceinfo_getheight) ([OH_ImageSource_Info](#oh_imagesource_info) \*info, uint32_t \*height) | Obtains the image height. |
165| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceInfo_GetDynamicRange](#oh_imagesourceinfo_getdynamicrange) ([OH_ImageSource_Info](#oh_imagesource_info) \*info, bool \*isHdr) | Obtains the dynamic range of an image. |
166| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceInfo_Release](#oh_imagesourceinfo_release) ([OH_ImageSource_Info](#oh_imagesource_info) \*info) | Releases the pointer to an **OH_ImageSource_Info** struct. |
167| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_Create](#oh_decodingoptions_create) ([OH_DecodingOptions](#oh_decodingoptions) \*\*options) | Creates the pointer to an **OH_DecodingOptions** struct. |
168| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_GetPixelFormat](#oh_decodingoptions_getpixelformat) ([OH_DecodingOptions](#oh_decodingoptions) \*options, int32_t \*pixelFormat) | Obtains the pixel format. |
169| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_SetPixelFormat](#oh_decodingoptions_setpixelformat) ([OH_DecodingOptions](#oh_decodingoptions) \*options, int32_t pixelFormat) | Sets the pixel format. |
170| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_GetIndex](#oh_decodingoptions_getindex) ([OH_DecodingOptions](#oh_decodingoptions) \*options, uint32_t \*index) | Obtains the index of an image. |
171| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_SetIndex](#oh_decodingoptions_setindex) ([OH_DecodingOptions](#oh_decodingoptions) \*options, uint32_t index) | Sets the index for an image. |
172| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_GetRotate](#oh_decodingoptions_getrotate) ([OH_DecodingOptions](#oh_decodingoptions) \*options, float \*rotate) | Obtains the rotation degree. |
173| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_SetRotate](#oh_decodingoptions_setrotate) ([OH_DecodingOptions](#oh_decodingoptions) \*options, float rotate) | Sets the rotation angle. |
174| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_GetDesiredSize](#oh_decodingoptions_getdesiredsize) ([OH_DecodingOptions](#oh_decodingoptions) \*options, [Image_Size](_image___size.md) \*desiredSize) | Obtains the desired output size. |
175| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_SetDesiredSize](#oh_decodingoptions_setdesiredsize) ([OH_DecodingOptions](#oh_decodingoptions) \*options, [Image_Size](_image___size.md) \*desiredSize) | Sets the desired output size. |
176| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_GetDesiredRegion](#oh_decodingoptions_getdesiredregion) ([OH_DecodingOptions](#oh_decodingoptions) \*options, [Image_Region](_image___region.md) \*desiredRegion) | Obtains the region to decode. |
177| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_SetDesiredRegion](#oh_decodingoptions_setdesiredregion) ([OH_DecodingOptions](#oh_decodingoptions) \*options, [Image_Region](_image___region.md) \*desiredRegion) | Sets the region to decode. |
178| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_GetDesiredDynamicRange](#oh_decodingoptions_getdesireddynamicrange) ([OH_DecodingOptions](#oh_decodingoptions) \*options, int32_t \*desiredDynamicRange) | Obtains the desired dynamic range configured during decoding. |
179| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_SetDesiredDynamicRange](#oh_decodingoptions_setdesireddynamicrange) ([OH_DecodingOptions](#oh_decodingoptions) \*options, int32_t desiredDynamicRange) | Sets the desired dynamic range during decoding. |
180| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptions_Release](#oh_decodingoptions_release) ([OH_DecodingOptions](#oh_decodingoptions) \*options) | Releases the pointer to an **OH_DecodingOptions** struct. |
181| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreateFromUri](#oh_imagesourcenative_createfromuri) (char \*uri, size_t uriSize, [OH_ImageSourceNative](#oh_imagesourcenative) \*\*res) | Creates the pointer to an **OH_ImageSourceNative** object based on a URI. |
182| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreateFromFd](#oh_imagesourcenative_createfromfd) (int32_t fd, [OH_ImageSourceNative](#oh_imagesourcenative) \*\*res) | Creates the pointer to an **OH_ImageSourceNative** object based on a file descriptor. |
183| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreateFromData](#oh_imagesourcenative_createfromdata) (uint8_t \*data, size_t dataSize, [OH_ImageSourceNative](#oh_imagesourcenative) \*\*res) | Creates the pointer to an **OH_ImageSourceNative** object based on buffer data. |
184| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreateFromRawFile](#oh_imagesourcenative_createfromrawfile) (RawFileDescriptor \*rawFile, [OH_ImageSourceNative](#oh_imagesourcenative) \*\*res) | Creates the pointer to an **OH_ImageSourceNative** object by using the raw file descriptor of an image resource file. |
185| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreatePixelmap](#oh_imagesourcenative_createpixelmap) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, [OH_DecodingOptions](#oh_decodingoptions) \*options, [OH_PixelmapNative](#oh_pixelmapnative) \*\*pixelmap) | Creates the pointer to an **OH_PixelmapNative** object based on decoding options. |
186| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreatePixelmapUsingAllocator](#oh_imagesourcenative_createpixelmapusingallocator) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, [OH_DecodingOptions](#oh_decodingoptions) \*options, [IMAGE_ALLOCATOR_TYPE](#image_allocator_type) allocator, [OH_PixelmapNative](#oh_pixelmapnative) \*\*pixelmap) | Creates an **OH_PixelmapNative** object based on decoding options and memory type, where **allocatorType** specifies the memory type of the PixelMap.<br>By default, the system selects an appropriate memory type based on the image type, image size, and platform capability. When processing the returned PixelMap object, consider the impact of stride.|
187| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreatePixelmapList](#oh_imagesourcenative_createpixelmaplist) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, [OH_DecodingOptions](#oh_decodingoptions) \*options, OH_PixelmapNative \*resVecPixMap[], size_t size) | Creates an array of **OH_PixelmapNative** objects based on decoding options. |
188| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_CreatePicture](#oh_imagesourcenative_createpicture) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, OH_DecodingOptionsForPicture \*options, [OH_PictureNative](#oh_picturenative) \*\*picture) | Creates the pointer to an **OH_PictureNative** object based on decoding options. |
189| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_GetDelayTimeList](#oh_imagesourcenative_getdelaytimelist) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, int32_t \*delayTimeList, size_t size) | Obtains the image delay time list. |
190| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_GetImageInfo](#oh_imagesourcenative_getimageinfo) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, int32_t index, [OH_ImageSource_Info](#oh_imagesource_info) \*info) | Obtains the information about an image with a given index. |
191| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_GetImageProperty](#oh_imagesourcenative_getimageproperty) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, [Image_String](_image___string.md) \*key, [Image_String](_image___string.md) \*value) | Obtains the value of an image property. |
192| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_ModifyImageProperty](#oh_imagesourcenative_modifyimageproperty) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, [Image_String](_image___string.md) \*key, [Image_String](_image___string.md) \*value) | Modifies the value of an image property. |
193| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_GetFrameCount](#oh_imagesourcenative_getframecount) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source, uint32_t \*frameCount) | Obtains the number of image frames. |
194| [Image_ErrorCode](#image_errorcode) [OH_ImageSourceNative_Release](#oh_imagesourcenative_release) ([OH_ImageSourceNative](#oh_imagesourcenative) \*source) | Releases the pointer to an **OH_ImageSourceNative** object. |
195| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptionsForPicture_Create](#oh_decodingoptionsforpicture_create) (OH_DecodingOptionsForPicture \*\*options) | Creates the pointer to an **OH_DecodingOptionsForPicture** struct. |
196| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptionsForPicture_GetDesiredAuxiliaryPictures](#oh_decodingoptionsforpicture_getdesiredauxiliarypictures) (OH_DecodingOptionsForPicture \*options, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) \*\*desiredAuxiliaryPictures, size_t \*length) | Obtains desired auxiliary pictures in the decoding options (auxiliary pictures contained in **picture** expected to be decoded.) |
197| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptionsForPicture_SetDesiredAuxiliaryPictures](#oh_decodingoptionsforpicture_setdesiredauxiliarypictures) (OH_DecodingOptionsForPicture \*options, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) \*desiredAuxiliaryPictures, size_t length) | Sets desired auxiliary pictures in the decoding options. |
198| [Image_ErrorCode](#image_errorcode) [OH_DecodingOptionsForPicture_Release](#oh_decodingoptionsforpicture_release) (OH_DecodingOptionsForPicture \*options) | Releases the pointer to an **OH_DecodingOptionsForPicture** struct. |
199| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_CreatePicture](#oh_picturenative_createpicture) (OH_PixelmapNative \*mainPixelmap, [OH_PictureNative](#oh_picturenative) \*\*picture) | Creates the pointer to an **OH_PictureNative** object. |
200| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_GetMainPixelmap](#oh_picturenative_getmainpixelmap) ([OH_PictureNative](#oh_picturenative) \*picture, OH_PixelmapNative \*\*mainPixelmap) | Obtains the pointer to an **OH_PixelmapNative** object of a main picture. |
201| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_GetHdrComposedPixelmap](#oh_picturenative_gethdrcomposedpixelmap) ([OH_PictureNative](#oh_picturenative) \*picture, OH_PixelmapNative \*\*hdrPixelmap) | Obtains the pointer to an **OH_PixelmapNative** object of an HDR picture. |
202| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_GetGainmapPixelmap](#oh_picturenative_getgainmappixelmap) ([OH_PictureNative](#oh_picturenative) \*picture, OH_PixelmapNative \*\*gainmapPixelmap) | Obtains the pointer to an **OH_PixelmapNative** object of a gain map. |
203| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_SetAuxiliaryPicture](#oh_picturenative_setauxiliarypicture) ([OH_PictureNative](#oh_picturenative) \*picture, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type, [OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture) | Sets an auxiliary picture. |
204| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_GetAuxiliaryPicture](#oh_picturenative_getauxiliarypicture) ([OH_PictureNative](#oh_picturenative) \*picture, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type, [OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*\*auxiliaryPicture) | Obtains an auxiliary picture by type. |
205| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_GetMetadata](#oh_picturenative_getmetadata) ([OH_PictureNative](#oh_picturenative) \*picture, [Image_MetadataType](#image_metadatatype) metadataType, [OH_PictureMetadata](#oh_picturemetadata) \*\*metadata) | Obtains the metadata of a main picture. |
206| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_SetMetadata](#oh_picturenative_setmetadata) ([OH_PictureNative](#oh_picturenative) \*picture, [Image_MetadataType](#image_metadatatype) metadataType, [OH_PictureMetadata](#oh_picturemetadata) \*metadata) | Sets the metadata for a main picture. |
207| [Image_ErrorCode](#image_errorcode) [OH_PictureNative_Release](#oh_picturenative_release) ([OH_PictureNative](#oh_picturenative) \*picture) | Releases the pointer to an **OH_PictureNative** object. |
208| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_Create](#oh_auxiliarypicturenative_create) (uint8_t \*data, size_t dataLength, [Image_Size](_image___size.md) \*size, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type, [OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*\*auxiliaryPicture) | Creates the pointer to an **OH_AuxiliaryPictureNative** object. |
209| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_WritePixels](#oh_auxiliarypicturenative_writepixels) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture, uint8_t \*source, size_t bufferSize) | Reads the pixels in the buffer and writes the result to an auxiliary picture. |
210| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_ReadPixels](#oh_auxiliarypicturenative_readpixels) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture, uint8_t \*destination, size_t \*bufferSize) | Reads the pixels of an auxiliary picture and writes the result to the buffer. |
211| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_GetType](#oh_auxiliarypicturenative_gettype) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) \*type) | Obtains the type of an auxiliary picture. |
212| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_GetInfo](#oh_auxiliarypicturenative_getinfo) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture, [OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*\*info) | Obtains the auxiliary picture information. |
213| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_SetInfo](#oh_auxiliarypicturenative_setinfo) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture, [OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info) | Sets the auxiliary picture information. |
214| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_GetMetadata](#oh_auxiliarypicturenative_getmetadata) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture, [Image_MetadataType](#image_metadatatype) metadataType, [OH_PictureMetadata](#oh_picturemetadata) \*\*metadata) | Obtains the metadata of an auxiliary picture. |
215| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_SetMetadata](#oh_auxiliarypicturenative_setmetadata) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*auxiliaryPicture, [Image_MetadataType](#image_metadatatype) metadataType, [OH_PictureMetadata](#oh_picturemetadata) \*metadata) | Sets the metadata for an auxiliary picture. |
216| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureNative_Release](#oh_auxiliarypicturenative_release) ([OH_AuxiliaryPictureNative](#oh_auxiliarypicturenative) \*picture) | Releases the pointer to an **OH_AuxiliaryPictureNative** object. |
217| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_Create](#oh_auxiliarypictureinfo_create) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*\*info) | Creates an **OH_AuxiliaryPictureInfo** object. |
218| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_GetType](#oh_auxiliarypictureinfo_gettype) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) \*type) | Obtains the auxiliary picture type from the auxiliary picture information. |
219| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_SetType](#oh_auxiliarypictureinfo_settype) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type) | Sets the auxiliary picture type in the auxiliary picture information. |
220| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_GetSize](#oh_auxiliarypictureinfo_getsize) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, [Image_Size](_image___size.md) \*size) | Obtains the size of an auxiliary picture. |
221| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_SetSize](#oh_auxiliarypictureinfo_setsize) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, [Image_Size](_image___size.md) \*size) | Sets the size of an auxiliary picture. |
222| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_GetRowStride](#oh_auxiliarypictureinfo_getrowstride) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, uint32_t \*rowStride) | Obtains the row stride of an auxiliary picture. |
223| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_SetRowStride](#oh_auxiliarypictureinfo_setrowstride) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, uint32_t rowStride) | Sets the row stride of an auxiliary picture. |
224| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_GetPixelFormat](#oh_auxiliarypictureinfo_getpixelformat) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, PIXEL_FORMAT \*pixelFormat) | Obtains the pixel format of an auxiliary picture. |
225| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_SetPixelFormat](#oh_auxiliarypictureinfo_setpixelformat) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info, PIXEL_FORMAT pixelFormat) | Sets the pixel format of an auxiliary picture. |
226| [Image_ErrorCode](#image_errorcode) [OH_AuxiliaryPictureInfo_Release](#oh_auxiliarypictureinfo_release) ([OH_AuxiliaryPictureInfo](#oh_auxiliarypictureinfo) \*info) | Releases the pointer to an **OH_AuxiliaryPictureInfo** object. |
227| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_Create](#oh_pixelmapinitializationoptions_create) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*\*options) | Creates the pointer to an **OH_Pixelmap_InitializationOptions** struct.|
228| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_GetWidth](#oh_pixelmapinitializationoptions_getwidth) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, uint32_t \*width) | Obtains the image width. |
229| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_SetWidth](#oh_pixelmapinitializationoptions_setwidth) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, uint32_t width) | Sets the image width. |
230| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_GetHeight](#oh_pixelmapinitializationoptions_getheight) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, uint32_t \*height) | Obtains the image height. |
231| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_SetHeight](#oh_pixelmapinitializationoptions_setheight) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, uint32_t height) | Sets the image height. |
232| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_GetPixelFormat](#oh_pixelmapinitializationoptions_getpixelformat) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t \*pixelFormat) | Obtains the pixel format. |
233| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_SetPixelFormat](#oh_pixelmapinitializationoptions_setpixelformat) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t pixelFormat) | Sets the pixel format. |
234| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_GetSrcPixelFormat](#oh_pixelmapinitializationoptions_getsrcpixelformat) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t \*srcpixelFormat) | Obtains the source pixel format. |
235| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_SetSrcPixelFormat](#oh_pixelmapinitializationoptions_setsrcpixelformat) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t srcpixelFormat) | Sets the source pixel format. |
236| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_GetRowStride](#oh_pixelmapinitializationoptions_getrowstride) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t \*rowStride) | Obtains the row stride. |
237| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_SetRowStride](#oh_pixelmapinitializationoptions_setrowstride) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t rowStride) | Sets the row stride. |
238| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_GetAlphaType](#oh_pixelmapinitializationoptions_getalphatype) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t \*alphaType) | Obtains the alpha type. |
239| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_SetAlphaType](#oh_pixelmapinitializationoptions_setalphatype) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, int32_t alphaType) | Sets the alpha type. |
240| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_GetEditable](#oh_pixelmapinitializationoptions_geteditable) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, bool \*editable) | Obtains the editable flag.|
241| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_SetEditable](#oh_pixelmapinitializationoptions_seteditable) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, bool editable) | Sets the editable flag.|
242| [Image_ErrorCode](#image_errorcode) [OH_PixelmapInitializationOptions_Release](#oh_pixelmapinitializationoptions_release) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options) | Releases the pointer to an **OH_Pixelmap_InitializationOptions** struct. |
243| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_Create](#oh_pixelmapimageinfo_create) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*\*info) | Creates the pointer to an **OH_Pixelmap_ImageInfo** struct. |
244| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_GetWidth](#oh_pixelmapimageinfo_getwidth) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*info, uint32_t \*width) | Obtains the image width. |
245| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_GetHeight](#oh_pixelmapimageinfo_getheight) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*info, uint32_t \*height) | Obtains the image height. |
246| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_GetRowStride](#oh_pixelmapimageinfo_getrowstride) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*info, uint32_t \*rowStride) | Obtains the row stride. |
247| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_GetPixelFormat](#oh_pixelmapimageinfo_getpixelformat) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*info, int32_t \*pixelFormat) | Obtains the pixel format. |
248| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_GetAlphaType](#oh_pixelmapimageinfo_getalphatype) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*info, int32_t \*alphaType) | Obtains the alpha type. |
249| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_GetDynamicRange](#oh_pixelmapimageinfo_getdynamicrange) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*info, bool \*isHdr) | Obtains the dynamic range of a PixelMap. |
250| [Image_ErrorCode](#image_errorcode) [OH_PixelmapImageInfo_Release](#oh_pixelmapimageinfo_release) ([OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*info) | Releases the pointer to an **OH_Pixelmap_ImageInfo** struct. |
251| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_CreatePixelmap](#oh_pixelmapnative_createpixelmap) (uint8_t \*data, size_t dataLength, [OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, [OH_PixelmapNative](#oh_pixelmapnative) \*\*pixelmap) | Creates a PixelMap based on properties. By default, the BGRA_8888 format is used for data processing. |
252| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_ConvertPixelmapNativeToNapi](#oh_pixelmapnative_convertpixelmapnativetonapi) (napi_env env, [OH_PixelmapNative](#oh_pixelmapnative) \*pixelmapNative, napi_value \*pixelmapNapi) | Converts a **nativePixelMap** object to a **PixelMapnapi** object. |
253| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_ConvertPixelmapNativeFromNapi](#oh_pixelmapnative_convertpixelmapnativefromnapi) (napi_env env, napi_value pixelmapNapi, [OH_PixelmapNative](#oh_pixelmapnative) \*\*pixelmapNative) | Converts a **PixelMapnapi** object to a **nativePixelMap** object. |
254| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_ReadPixels](#oh_pixelmapnative_readpixels) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, uint8_t \*destination, size_t \*bufferSize) | Reads the pixels of a PixelMap and writes the result to an ArrayBuffer. |
255| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_WritePixels](#oh_pixelmapnative_writepixels) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, uint8_t \*source, size_t bufferSize) | Reads the pixels in the buffer and writes the result to a PixelMap. |
256| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_GetArgbPixels](#oh_pixelmapnative_getargbpixels) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, uint8_t \*destination, size_t \*bufferSize) | Reads data in ARGB format from a PixelMap. |
257| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_ToSdr](#oh_pixelmapnative_tosdr) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap) | Converts a PixelMap from the HDR format to the SDR format. |
258| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_GetImageInfo](#oh_pixelmapnative_getimageinfo) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, [OH_Pixelmap_ImageInfo](#oh_pixelmap_imageinfo) \*imageInfo) | Obtains the image information of a PixelMap. |
259| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Opacity](#oh_pixelmapnative_opacity) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, float rate) | Sets the opacity rate to enable the PixelMap to achieve the corresponding opacity effect. |
260| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Scale](#oh_pixelmapnative_scale) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, float scaleX, float scaleY) | Scales a PixelMap based on a given width and height. |
261| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_ScaleWithAntiAliasing](#oh_pixelmapnative_scalewithantialiasing) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, float scaleX, float scaleY, [OH_PixelmapNative_AntiAliasingLevel](#oh_pixelmapnative_antialiasinglevel) level) | Scales a PixelMap based on the specified anti-aliasing level, width, and height. |
262| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_CreateScaledPixelMap](#oh_pixelmapnative_createscaledpixelmap) ([OH_PixelmapNative](#oh_pixelmapnative) \*srcPixelmap, [OH_PixelmapNative](#oh_pixelmapnative) \*\*dstPixelmap, float scaleX, float scaleY) | Creates a PixelMap that has been resized based on the specified scale factors of the width and height.|
263| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing](#oh_pixelmapnative_createscaledpixelmapwithantialiasing) ([OH_PixelmapNative](#oh_pixelmapnative) \*srcPixelmap, [OH_PixelmapNative](#oh_pixelmapnative) \*\*dstPixelmap, float scaleX, float scaleY, [OH_PixelmapNative_AntiAliasingLevel](#oh_pixelmapnative_antialiasinglevel) level) | Creates a PixelMap that has been resized based on the specified anti-aliasing level and the scale factors of the width and height.|
264| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Translate](#oh_pixelmapnative_translate) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, float x, float y) | Translates a PixelMap based on given coordinates. |
265| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Rotate](#oh_pixelmapnative_rotate) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, float angle) | Rotates a PixelMap based on a given angle. |
266| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Flip](#oh_pixelmapnative_flip) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, bool shouldFilpHorizontally, bool shouldFilpVertically) | Flips a PixelMap based on a given angle. |
267| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Crop](#oh_pixelmapnative_crop) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, [Image_Region](_image___region.md) \*region) | Crops a PixelMap based on a given size. |
268| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Release](#oh_pixelmapnative_release) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap) | Releases the pointer to an **OH_PixelmapNative** object. [OH_PixelmapNative_Destroy](#oh_pixelmapnative_destroy) is recommended.|
269| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_Destroy](#oh_pixelmapnative_destroy) (OH_PixelmapNative \*\*pixelmap) | Releases the pointer to an **OH_PixelmapNative** object.|
270| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_ConvertAlphaFormat](#oh_pixelmapnative_convertalphaformat) ([OH_PixelmapNative](#oh_pixelmapnative) \*srcpixelmap, [OH_PixelmapNative](#oh_pixelmapnative) \*dstpixelmap, const bool isPremul) | Converts pixel data of a PixelMap from premultiplied alpha to non-premultiplied alpha, or vice versa. |
271| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_CreateEmptyPixelmap](#oh_pixelmapnative_createemptypixelmap) ([OH_Pixelmap_InitializationOptions](#oh_pixelmap_initializationoptions) \*options, [OH_PixelmapNative](#oh_pixelmapnative) \*\*pixelmap) | Creates an empty PixelMap using **OH_Pixelmap_InitializationOptions**. The memory data is 0. |
272| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_GetNativeBuffer](#oh_pixelmapnative_getnativebuffer) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, OH_NativeBuffer \*\*nativeBuffer) | Obtains the **NativeBuffer** object from a PixelMap in the DMA memory. |
273| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_GetMetadata](#oh_pixelmapnative_getmetadata) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, [OH_Pixelmap_HdrMetadataKey](#oh_pixelmap_hdrmetadatakey) key, [OH_Pixelmap_HdrMetadataValue](_o_h___pixelmap___hdr_metadata_value.md) \*\*value) | Obtains the metadata. |
274| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_SetMetadata](#oh_pixelmapnative_setmetadata) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, [OH_Pixelmap_HdrMetadataKey](#oh_pixelmap_hdrmetadatakey) key, [OH_Pixelmap_HdrMetadataValue](_o_h___pixelmap___hdr_metadata_value.md) \*value) | Sets the metadata. |
275| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_SetColorSpaceNative](#oh_pixelmapnative_setcolorspacenative) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, [OH_NativeColorSpaceManager](#oh_nativecolorspacemanager) \*colorSpaceNative) | Sets a **NativeColorSpaceManager** object. |
276| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_GetColorSpaceNative](#oh_pixelmapnative_getcolorspacenative) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, [OH_NativeColorSpaceManager](#oh_nativecolorspacemanager) \*\*colorSpaceNative) | Obtains a **NativeColorSpaceManager** object. |
277| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_SetMemoryName](#oh_pixelmapnative_setmemoryname) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, char \*name, size_t \*size) | Sets the memory name of a PixelMap. |
278| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_GetByteCount](#oh_pixelmapnative_getbytecount) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, uint32_t \*byteCount) | Obtains the total number of bytes occupied by all pixels in a PixelMap, excluding any memory padding.|
279| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_GetAllocationByteCount](#oh_pixelmapnative_getallocationbytecount) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, uint32_t \*allocationByteCount) | Obtains the number of bytes in the memory allocated by a PixelMap to store pixels.|
280| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_AccessPixels](#oh_pixelmapnative_accesspixels) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap, void \*\*addr) | Obtains the memory address where the pixels of a PixelMap are stored and locks the memory.<br>When the memory is locked, any attempts to alter or free the pixel data of the PixelMap will fail or be ineffective.|
281| [Image_ErrorCode](#image_errorcode) [OH_PixelmapNative_UnaccessPixels](#oh_pixelmapnative_unaccesspixels) ([OH_PixelmapNative](#oh_pixelmapnative) \*pixelmap) | Unlocks the memory allocated to store the pixels of a PixelMap.<br>This function must be used together with [OH_PixelmapNative_AccessPixels](#oh_pixelmapnative_accesspixels).|
282
283
284### Variables
285
286| Name| Description|
287| -------- | -------- |
288| static const char \*[MIME_TYPE_BMP](#mime_type_bmp) = "image/bmp" | BMP image format.|
289| static const char \*[MIME_TYPE_JPEG](#mime_type_jpeg) = "image/jpeg" | JPEG image format.|
290| static const char \*[MIME_TYPE_HEIC](#mime_type_heic) = "image/heic" | HEIC image format.|
291| static const char \*[MIME_TYPE_PNG](#mime_type_png) = "image/png" | PNG image format.|
292| static const char \*[MIME_TYPE_WEBP](#mime_type_webp) = "image/webp" | WebP image format.|
293| static const char \*[MIME_TYPE_GIF](#mime_type_gif) = "image/gif" | GIF image format.|
294| static const char \*[MIME_TYPE_ICON](#mime_type_icon) = "image/x-icon" | ICO image format.|
295| static const char \*[OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE](#ohos_image_property_bits_per_sample) = "BitsPerSample" | Number of bits per sample.|
296| static const char \*[OHOS_IMAGE_PROPERTY_ORIENTATION](#ohos_image_property_orientation) = "Orientation" | Image orientation.|
297| static const char \*[OHOS_IMAGE_PROPERTY_IMAGE_LENGTH](#ohos_image_property_image_length) = "ImageLength" | Image length.|
298| static const char \*[OHOS_IMAGE_PROPERTY_IMAGE_WIDTH](#ohos_image_property_image_width) = "ImageWidth" | Image width.|
299| static const char \*[OHOS_IMAGE_PROPERTY_GPS_LATITUDE](#ohos_image_property_gps_latitude) = "GPSLatitude" | Image latitude.|
300| static const char \*[OHOS_IMAGE_PROPERTY_GPS_LONGITUDE](#ohos_image_property_gps_longitude) = "GPSLongitude" | Image longitude.|
301| static const char \*[OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF](#ohos_image_property_gps_latitude_ref) = "GPSLatitudeRef" | Whether the latitude is north or south latitude.|
302| static const char \*[OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF](#ohos_image_property_gps_longitude_ref) = "GPSLongitudeRef" | Whether the longitude is east or west longitude.|
303| static const char \*[OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL](#ohos_image_property_date_time_original) = "DateTimeOriginal" | Shooting time, for example, 2022:09:06 15:48:00.|
304| static const char \*[OHOS_IMAGE_PROPERTY_EXPOSURE_TIME](#ohos_image_property_exposure_time) = "ExposureTime" | Exposure time, for example, 1/33 seconds.|
305| static const char \*[OHOS_IMAGE_PROPERTY_SCENE_TYPE](#ohos_image_property_scene_type) = "SceneType" | Type of the scene, for example, portrait, scenery, motion, and night.|
306| static const char \*[OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS](#ohos_image_property_iso_speed_ratings) = "ISOSpeedRatings" | ISO sensitivity or ISO speed, for example, 400.|
307| static const char \*[OHOS_IMAGE_PROPERTY_F_NUMBER](#ohos_image_property_f_number) = "FNumber" | F number, for example, f/1.8.|
308| static const char \*[OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL](#ohos_image_property_compressed_bits_per_pixel) = "CompressedBitsPerPixel" | Number of bits per pixel. It is specific to compressed data.|
309| static const char \*[OHOS_IMAGE_PROPERTY_COMPRESSION](#ohos_image_property_compression) = "Compression" | Compression scheme used on the image data.|
310| static const char \*[OHOS_IMAGE_PROPERTY_PHOTOMETRIC_INTERPRETATION](#ohos_image_property_photometric_interpretation) = "PhotometricInterpretation" | Color space of the image data, for example, RGB or YCbCr.|
311| static const char \*[OHOS_IMAGE_PROPERTY_STRIP_OFFSETS](#ohos_image_property_strip_offsets) = "StripOffsets" | Byte offset of each strip.|
312| static const char \*[OHOS_IMAGE_PROPERTY_SAMPLES_PER_PIXEL](#ohos_image_property_samples_per_pixel) = "SamplesPerPixel" | Number of components per pixel. The value is **3** for RGB and YCbCr images. The **JPEG** key is used in JPEG compressed data.|
313| static const char \*[OHOS_IMAGE_PROPERTY_ROWS_PER_STRIP](#ohos_image_property_rows_per_strip) = "RowsPerStrip" | Number of rows per strip.|
314| static const char \*[OHOS_IMAGE_PROPERTY_STRIP_BYTE_COUNTS](#ohos_image_property_strip_byte_counts) = "StripByteCounts" | Number of bytes in each strip after compression.|
315| static const char \*[OHOS_IMAGE_PROPERTY_X_RESOLUTION](#ohos_image_property_x_resolution) = "XResolution" | Number of pixels per ResolutionUnit in the image width (X) direction.|
316| static const char \*[OHOS_IMAGE_PROPERTY_Y_RESOLUTION](#ohos_image_property_y_resolution) = "YResolution" | Number of pixels per ResolutionUnit in the image height (Y) direction.|
317| static const char \*[OHOS_IMAGE_PROPERTY_PLANAR_CONFIGURATION](#ohos_image_property_planar_configuration) = "PlanarConfiguration" | Storage format of components of each pixel, which can be chunky or planar.|
318| static const char \*[OHOS_IMAGE_PROPERTY_RESOLUTION_UNIT](#ohos_image_property_resolution_unit) = "ResolutionUnit" | Unit of measurement for XResolution and YResolution.|
319| static const char \*[OHOS_IMAGE_PROPERTY_TRANSFER_FUNCTION](#ohos_image_property_transfer_function) = "TransferFunction" | Transfer function for the image, which is usually used for color correction.|
320| static const char \*[OHOS_IMAGE_PROPERTY_SOFTWARE](#ohos_image_property_software) = "Software" | Name and version number of the software used to create the image.|
321| static const char \*[OHOS_IMAGE_PROPERTY_ARTIST](#ohos_image_property_artist) = "Artist" | Person who created the image.|
322| static const char \*[OHOS_IMAGE_PROPERTY_WHITE_POINT](#ohos_image_property_white_point) = "WhitePoint" | Chromaticity of the white point of the image.|
323| static const char \*[OHOS_IMAGE_PROPERTY_PRIMARY_CHROMATICITIES](#ohos_image_property_primary_chromaticities) = "PrimaryChromaticities" | Chromaticities of the primaries of the image.|
324| static const char \*[OHOS_IMAGE_PROPERTY_YCBCR_COEFFICIENTS](#ohos_image_property_ycbcr_coefficients) = "YCbCrCoefficients" | Transformation from RGB to YCbCr image data.|
325| static const char \*[OHOS_IMAGE_PROPERTY_YCBCR_SUB_SAMPLING](#ohos_image_property_ycbcr_sub_sampling) = "YCbCrSubSampling" | Subsampling factors used for the chrominance components of a YCbCr image.|
326| static const char \*[OHOS_IMAGE_PROPERTY_YCBCR_POSITIONING](#ohos_image_property_ycbcr_positioning) = "YCbCrPositioning" | Positioning of subsampled chrominance components relative to luminance samples.|
327| static const char \*[OHOS_IMAGE_PROPERTY_REFERENCE_BLACK_WHITE](#ohos_image_property_reference_black_white) = "ReferenceBlackWhite" | A pair of headroom and footroom image data values (codes) for each pixel component.|
328| static const char \*[OHOS_IMAGE_PROPERTY_COPYRIGHT](#ohos_image_property_copyright) = "Copyright" | Copyright notice of the image.|
329| static const char \*[OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT](#ohos_image_property_jpeg_interchange_format) = "JPEGInterchangeFormat" | Offset of the SOI marker of a JPEG interchange format bitstream.|
330| static const char \*[OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT_LENGTH](#ohos_image_property_jpeg_interchange_format_length) = "JPEGInterchangeFormatLength" | Number of bytes of the JPEG stream.|
331| static const char \*[OHOS_IMAGE_PROPERTY_EXPOSURE_PROGRAM](#ohos_image_property_exposure_program) = "ExposureProgram" | Class of the program used by the camera to set exposure when the image was captured.|
332| static const char \*[OHOS_IMAGE_PROPERTY_SPECTRAL_SENSITIVITY](#ohos_image_property_spectral_sensitivity) = "SpectralSensitivity" | Spectral sensitivity of each channel of the camera.|
333| static const char \*[OHOS_IMAGE_PROPERTY_OECF](#ohos_image_property_oecf) = "OECF" | Opto-Electric Conversion Function (OECF) specified in ISO 14524.|
334| static const char \*[OHOS_IMAGE_PROPERTY_EXIF_VERSION](#ohos_image_property_exif_version) = "ExifVersion" | Version of the supported EXIF standard.|
335| static const char \*[OHOS_IMAGE_PROPERTY_DATE_TIME_DIGITIZED](#ohos_image_property_date_time_digitized) = "DateTimeDigitized" | Date and time when the image was stored as digital data, in the format of YYYY:MM:DD HH:MM:SS.|
336| static const char \*[OHOS_IMAGE_PROPERTY_COMPONENTS_CONFIGURATION](#ohos_image_property_components_configuration) = "ComponentsConfiguration" | Specific information about compressed data.|
337| static const char \*[OHOS_IMAGE_PROPERTY_SHUTTER_SPEED_VALUE](#ohos_image_property_shutter_speed_value) = "ShutterSpeedValue" | Shutter speed, expressed in Additive System of Photographic Exposure (APEX) values.|
338| static const char \*[OHOS_IMAGE_PROPERTY_BRIGHTNESS_VALUE](#ohos_image_property_brightness_value) = "BrightnessValue" | Value of brightness, expressed in APEX values.|
339| static const char \*[OHOS_IMAGE_PROPERTY_MAX_APERTURE_VALUE](#ohos_image_property_max_aperture_value) = "MaxApertureValue" | Smallest F number of the lens.|
340| static const char \*[OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE](#ohos_image_property_subject_distance) = "SubjectDistance" | Distance to the subject, in meters.|
341| static const char \*[OHOS_IMAGE_PROPERTY_SUBJECT_AREA](#ohos_image_property_subject_area) = "SubjectArea" | Location and area of the main subject in the entire scene.|
342| static const char \*[OHOS_IMAGE_PROPERTY_MAKER_NOTE](#ohos_image_property_maker_note) = "MakerNote" | Marker used by EXIF/DCF manufacturers to record any required information.|
343| static const char \*[OHOS_IMAGE_PROPERTY_SUBSEC_TIME](#ohos_image_property_subsec_time) = "SubsecTime" | Tag used to record fractions of seconds for the **DateTime** tag.|
344| static const char \*[OHOS_IMAGE_PROPERTY_SUBSEC_TIME_ORIGINAL](#ohos_image_property_subsec_time_original) = "SubsecTimeOriginal" | Tag used to record fractions of seconds for the **DateTimeOriginal** tag.|
345| static const char \*[OHOS_IMAGE_PROPERTY_SUBSEC_TIME_DIGITIZED](#ohos_image_property_subsec_time_digitized) = "SubsecTimeDigitized" | Tag used to record fractions of seconds for the **DateTimeDigitized** tag.|
346| static const char \*[OHOS_IMAGE_PROPERTY_FLASHPIX_VERSION](#ohos_image_property_flashpix_version) = "FlashpixVersion" | FlashPix format version supported by an FPXR file. It is used to enhance device compatibility.|
347| static const char \*[OHOS_IMAGE_PROPERTY_COLOR_SPACE](#ohos_image_property_color_space) = "ColorSpace" | Color space information, which is usually recorded as a color space specifier.|
348| static const char \*[OHOS_IMAGE_PROPERTY_RELATED_SOUND_FILE](#ohos_image_property_related_sound_file) = "RelatedSoundFile" | Name of an audio file related to the image data.|
349| static const char \*[OHOS_IMAGE_PROPERTY_FLASH_ENERGY](#ohos_image_property_flash_energy) = "FlashEnergy" | Strobe energy at the time the image was captured, in Beam Candle Power Seconds (BCPS).|
350| static const char \*[OHOS_IMAGE_PROPERTY_SPATIAL_FREQUENCY_RESPONSE](#ohos_image_property_spatial_frequency_response) = "SpatialFrequencyResponse" | Spatial frequency table of the camera or input device.|
351| static const char \*[OHOS_IMAGE_PROPERTY_FOCAL_PLANE_X_RESOLUTION](#ohos_image_property_focal_plane_x_resolution) = "FocalPlaneXResolution" | Number of pixels in the image width (X) direction per FocalPlaneResolutionUnit.|
352| static const char \*[OHOS_IMAGE_PROPERTY_FOCAL_PLANE_Y_RESOLUTION](#ohos_image_property_focal_plane_y_resolution) = "FocalPlaneYResolution" | Number of pixels in the image height (Y) direction per FocalPlaneResolutionUnit.|
353| static const char \*[OHOS_IMAGE_PROPERTY_FOCAL_PLANE_RESOLUTION_UNIT](#ohos_image_property_focal_plane_resolution_unit) = "FocalPlaneResolutionUnit" | Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution.|
354| static const char \*[OHOS_IMAGE_PROPERTY_SUBJECT_LOCATION](#ohos_image_property_subject_location) = "SubjectLocation" | Location of the main subject relative to the left edge.|
355| static const char \*[OHOS_IMAGE_PROPERTY_EXPOSURE_INDEX](#ohos_image_property_exposure_index) = "ExposureIndex" | Exposure index selected at the time the image is captured.|
356| static const char \*[OHOS_IMAGE_PROPERTY_SENSING_METHOD](#ohos_image_property_sensing_method) = "SensingMethod" | Type of the image sensor on the camera.|
357| static const char \*[OHOS_IMAGE_PROPERTY_FILE_SOURCE](#ohos_image_property_file_source) = "FileSource" | Image source.|
358| static const char \*[OHOS_IMAGE_PROPERTY_CFA_PATTERN](#ohos_image_property_cfa_pattern) = "CFAPattern" | Color Filter Array (CFA) geometric pattern of the image sensor.|
359| static const char \*[OHOS_IMAGE_PROPERTY_CUSTOM_RENDERED](#ohos_image_property_custom_rendered) = "CustomRendered" | Special processing on image data.|
360| static const char \*[OHOS_IMAGE_PROPERTY_EXPOSURE_MODE](#ohos_image_property_exposure_mode) = "ExposureMode" | Exposure mode set when the image was captured.|
361| static const char \*[OHOS_IMAGE_PROPERTY_DIGITAL_ZOOM_RATIO](#ohos_image_property_digital_zoom_ratio) = "DigitalZoomRatio" | Digital zoom ratio when the image was captured.|
362| static const char \*[OHOS_IMAGE_PROPERTY_SCENE_CAPTURE_TYPE](#ohos_image_property_scene_capture_type) = "SceneCaptureType" | Type of the scene that was captured.|
363| static const char \*[OHOS_IMAGE_PROPERTY_GAIN_CONTROL](#ohos_image_property_gain_control) = "GainControl" | Degree of overall image gain adjustment.|
364| static const char \*[OHOS_IMAGE_PROPERTY_CONTRAST](#ohos_image_property_contrast) = "Contrast" | Direction of contrast processing used by the camera.|
365| static const char \*[OHOS_IMAGE_PROPERTY_SATURATION](#ohos_image_property_saturation) = "Saturation" | Direction of saturation processing used by the camera.|
366| static const char \*[OHOS_IMAGE_PROPERTY_SHARPNESS](#ohos_image_property_sharpness) = "Sharpness" | Direction of sharpness processing used by the camera.|
367| static const char \*[OHOS_IMAGE_PROPERTY_DEVICE_SETTING_DESCRIPTION](#ohos_image_property_device_setting_description) = "DeviceSettingDescription" | Information about the photographing conditions of a specific camera model.|
368| static const char \*[OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE_RANGE](#ohos_image_property_subject_distance_range) = "SubjectDistanceRange" | Distance to the subject.|
369| static const char \*[OHOS_IMAGE_PROPERTY_IMAGE_UNIQUE_ID](#ohos_image_property_image_unique_id) = "ImageUniqueID" | Unique identifier assigned to each image.|
370| static const char \*[OHOS_IMAGE_PROPERTY_GPS_VERSION_ID](#ohos_image_property_gps_version_id) = "GPSVersionID" | Version of GPSInfoIFD.|
371| static const char \*[OHOS_IMAGE_PROPERTY_GPS_ALTITUDE_REF](#ohos_image_property_gps_altitude_ref) = "GPSAltitudeRef" | Whether the latitude is north or south latitude.|
372| static const char \*[OHOS_IMAGE_PROPERTY_GPS_ALTITUDE](#ohos_image_property_gps_altitude) = "GPSAltitude" | Altitude based on the reference in GPSAltitudeRef.|
373| static const char \*[OHOS_IMAGE_PROPERTY_GPS_SATELLITES](#ohos_image_property_gps_satellites) = "GPSSatellites" | GPS satellites used for measurement.|
374| static const char \*[OHOS_IMAGE_PROPERTY_GPS_STATUS](#ohos_image_property_gps_status) = "GPSStatus" | Status of the GPS receiver when the image was recorded.|
375| static const char \*[OHOS_IMAGE_PROPERTY_GPS_MEASURE_MODE](#ohos_image_property_gps_measure_mode) = "GPSMeasureMode" | GPS measurement pmode.|
376| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DOP](#ohos_image_property_gps_dop) = "GPSDOP" | GPS DOP (data degree of precision)|
377| static const char \*[OHOS_IMAGE_PROPERTY_GPS_SPEED_REF](#ohos_image_property_gps_speed_ref) = "GPSSpeedRef" | Unit used to express the movement speed of the GPS receiver.|
378| static const char \*[OHOS_IMAGE_PROPERTY_GPS_SPEED](#ohos_image_property_gps_speed) = "GPSSpeed" | Movement speed of the GPS receiver.|
379| static const char \*[OHOS_IMAGE_PROPERTY_GPS_TRACK_REF](#ohos_image_property_gps_track_ref) = "GPSTrackRef" | Reference of the movement direction of the GPS receiver.|
380| static const char \*[OHOS_IMAGE_PROPERTY_GPS_TRACK](#ohos_image_property_gps_track) = "GPSTrack" | Movement direction of the GPS receiver.|
381| static const char \*[OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION_REF](#ohos_image_property_gps_img_direction_ref) = "GPSImgDirectionRef" | Reference of the direction of the image when it was captured.|
382| static const char \*[OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION](#ohos_image_property_gps_img_direction) = "GPSImgDirection" | Direction of the image when it was captured.|
383| static const char \*[OHOS_IMAGE_PROPERTY_GPS_MAP_DATUM](#ohos_image_property_gps_map_datum) = "GPSMapDatum" | Geodetic survey data used by the GPS receiver.|
384| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE_REF](#ohos_image_property_gps_dest_latitude_ref) = "GPSDestLatitudeRef" | Whether the latitude of the destination point is north or south latitude.|
385| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE](#ohos_image_property_gps_dest_latitude) = "GPSDestLatitude" | Latitude of the destination point.|
386| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE_REF](#ohos_image_property_gps_dest_longitude_ref) = "GPSDestLongitudeRef" | Whether the longitude of the destination point is east or west longitude.|
387| static const char \*[OHOS_IMAGE_PROPERTY_GPS_PROCESSING_METHOD](#ohos_image_property_gps_processing_method) = "GPSProcessingMethod" | String that records the name of the method used for positioning.|
388| static const char \*[OHOS_IMAGE_PROPERTY_GPS_AREA_INFORMATION](#ohos_image_property_gps_area_information) = "GPSAreaInformation" | String that records the name of the GPS area.|
389| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DIFFERENTIAL](#ohos_image_property_gps_differential) = "GPSDifferential" | Whether differential correction is applied to the GPS receiver. It is critical to accurate location accuracy.|
390| static const char \*[OHOS_IMAGE_PROPERTY_BODY_SERIAL_NUMBER](#ohos_image_property_body_serial_number) = "BodySerialNumber" | Serial number of the camera body.|
391| static const char \*[OHOS_IMAGE_PROPERTY_CAMERA_OWNER_NAME](#ohos_image_property_camera_owner_name) = "CameraOwnerName" | Name of the camera owner.|
392| static const char \*[OHOS_IMAGE_PROPERTY_COMPOSITE_IMAGE](#ohos_image_property_composite_image) = "CompositeImage" | Whether the image is a composite image.|
393| static const char \*[OHOS_IMAGE_PROPERTY_DNG_VERSION](#ohos_image_property_dng_version) = "DNGVersion" | DNG version. It encodes the DNG 4-tier version number.|
394| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE](#ohos_image_property_gps_dest_longitude) = "GPSDestLongitude" | Longitude of the destination point.|
395| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING_REF](#ohos_image_property_gps_dest_bearing_ref) = "GPSDestBearingRef" | Reference of the bearing to the destination point.|
396| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING](#ohos_image_property_gps_dest_bearing) = "GPSDestBearing" | Bearing to the destination point.|
397| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE_REF](#ohos_image_property_gps_dest_distance_ref) = "GPSDestDistanceRef" | Unit used to express the distance to the destination point.|
398| static const char \*[OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE](#ohos_image_property_gps_dest_distance) = "GPSDestDistance" | Distance to the destination point.|
399| static const char \*[OHOS_IMAGE_PROPERTY_DEFAULT_CROP_SIZE](#ohos_image_property_default_crop_size) = "DefaultCropSize" | Size of the final image area, in raw image coordinates, taking into account extra pixels around the edges of the final image.|
400| static const char \*[OHOS_IMAGE_PROPERTY_GAMMA](#ohos_image_property_gamma) = "Gamma" | Gamma value.|
401| static const char \*[OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEYYY](#ohos_image_property_iso_speed_latitudeyyy) = "ISOSpeedLatitudeyyy" | ISO speed latitude yyy value of the camera or input device, which is defined in ISO 12232.|
402| static const char \*[OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEZZZ](#ohos_image_property_iso_speed_latitudezzz) = "ISOSpeedLatitudezzz" | ISO speed latitude zzz value of the camera or input device, which is defined in ISO 12232.|
403| static const char \*[OHOS_IMAGE_PROPERTY_LENS_MAKE](#ohos_image_property_lens_make) = "LensMake" | Manufacturer of the lens.|
404| static const char \*[OHOS_IMAGE_PROPERTY_LENS_MODEL](#ohos_image_property_lens_model) = "LensModel" | Model of the lens.|
405| static const char \*[OHOS_IMAGE_PROPERTY_LENS_SERIAL_NUMBER](#ohos_image_property_lens_serial_number) = "LensSerialNumber" | Serial number of the lens.|
406| static const char \*[OHOS_IMAGE_PROPERTY_LENS_SPECIFICATION](#ohos_image_property_lens_specification) = "LensSpecification" | Specifications of the lens.|
407| static const char \*[OHOS_IMAGE_PROPERTY_NEW_SUBFILE_TYPE](#ohos_image_property_new_subfile_type) = "NewSubfileType" | Data type of a subfile, such as a full-resolution image, a thumbnail, or a part of a multi-frame image. The value is a bit mask. The value 0 indicates a full-resolution image, **1** indicates a thumbnail, and **2** indicates a part of a multi-frame image.|
408| static const char \*[OHOS_IMAGE_PROPERTY_OFFSET_TIME](#ohos_image_property_offset_time) = "OffsetTime" | Time with an offset from UTC when the image was captured, in the format of ±HH:MM.|
409| static const char \*[OHOS_IMAGE_PROPERTY_OFFSET_TIME_DIGITIZED](#ohos_image_property_offset_time_digitized) = "OffsetTimeDigitized" | Time with an offset from UTC when the image was digitized. It helps to accurately adjust the timestamp.|
410| static const char \*[OHOS_IMAGE_PROPERTY_OFFSET_TIME_ORIGINAL](#ohos_image_property_offset_time_original) = "OffsetTimeOriginal" | Time with an offset from UTC when the original image was created. It is critical for time-sensitive applications.|
411| static const char \*[OHOS_IMAGE_PROPERTY_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE](#ohos_image_property_source_exposure_times_of_composite_image) = "SourceExposureTimesOfCompositeImage" | Exposure time of source images of the composite image.|
412| static const char \*[OHOS_IMAGE_PROPERTY_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE](#ohos_image_property_source_image_number_of_composite_image) = "SourceImageNumberOfCompositeImage" | Number of source images of the composite image.|
413| static const char \*[OHOS_IMAGE_PROPERTY_SUBFILE_TYPE](#ohos_image_property_subfile_type) = "SubfileType" | Type of data contained in this subfile. This tag has been deprecated. Use **NewSubfileType** instead.|
414| static const char \*[OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR](#ohos_image_property_gps_h_positioning_error) = "GPSHPositioningError" | Horizontal positioning error, in meters.|
415| static const char \*[OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY](#ohos_image_property_photographic_sensitivity) = "PhotographicSensitivity" | Sensitivity of the camera or input device when the image was captured.|
416| static const char \*[OHOS_IMAGE_PROPERTY_BURST_NUMBER](#ohos_image_property_burst_number) = "HwMnoteBurstNumber" | Number of burst shooting times.|
417| static const char \*[OHOS_IMAGE_PROPERTY_FACE_CONF](#ohos_image_property_face_conf) = "HwMnoteFaceConf" | Face confidence.|
418| static const char \*[OHOS_IMAGE_PROPERTY_FACE_LEYE_CENTER](#ohos_image_property_face_leye_center) = "HwMnoteFaceLeyeCenter" | Left eye centered. It is used in [OH_ImageSource_GetImageProperty](#oh_imagesourcenative_getimageproperty) and [OH_ImageSource_ModifyImageProperty](#oh_imagesourcenative_modifyimageproperty).|
419| static const char \*[OHOS_IMAGE_PROPERTY_FACE_MOUTH_CENTER](#ohos_image_property_face_mouth_center) = "HwMnoteFaceMouthCenter" | Mouth centered.|
420| static const char \*[OHOS_IMAGE_PROPERTY_FACE_POINTER](#ohos_image_property_face_pointer) = "HwMnoteFacePointer" | Face pointer.|
421| static const char \*[OHOS_IMAGE_PROPERTY_FACE_RECT](#ohos_image_property_face_rect) = "HwMnoteFaceRect" | Face rectangle.|
422| static const char \*[OHOS_IMAGE_PROPERTY_FACE_REYE_CENTER](#ohos_image_property_face_reye_center) = "HwMnoteFaceReyeCenter" | Right eye centered.|
423| static const char \*[OHOS_IMAGE_PROPERTY_FACE_SMILE_SCORE](#ohos_image_property_face_smile_score) = "HwMnoteFaceSmileScore" | Smile score of for faces.|
424| static const char \*[OHOS_IMAGE_PROPERTY_FACE_VERSION](#ohos_image_property_face_version) = "HwMnoteFaceVersion" | Facial recognition algorithm version.|
425| static const char \*[OHOS_IMAGE_PROPERTY_FRONT_CAMERA](#ohos_image_property_front_camera) = "HwMnoteFrontCamera" | Whether the front camera is used to take a selfie.|
426| static const char \*[OHOS_IMAGE_PROPERTY_SCENE_POINTER](#ohos_image_property_scene_pointer) = "HwMnoteScenePointer" | Pointer to the scene.|
427| static const char \*[OHOS_IMAGE_PROPERTY_SCENE_VERSION](#ohos_image_property_scene_version) = "HwMnoteSceneVersion" | Scene algorithm version.|
428| static const char \*[OHOS_IMAGE_PROPERTY_GIF_LOOP_COUNT](#ohos_image_property_gif_loop_count) = "GIFLoopCount" | Number of GIF loops.|
429| static const char \*[OHOS_IMAGE_PROPERTY_X_IN_ORIGINAL](#ohos_image_property_x_in_original) = "XInOriginal" | X coordinate of the upper left corner of the fragment map in the original image. |
430| static const char \*[OHOS_IMAGE_PROPERTY_Y_IN_ORIGINAL](#ohos_image_property_y_in_original) = "YInOriginal" | Y coordinate of the upper left corner of the fragment map in the original image. |
431| static const char \*[OHOS_IMAGE_PROPERTY_FRAGMENT_WIDTH](#ohos_image_property_fragment_width) = "FragmentImageWidth"| Width of the fragment map. |
432| static const char \*[OHOS_IMAGE_PROPERTY_FRAGMENT_HEIGHT](#ohos_image_property_fragment_height) = "FragmentImageHeight" | Height of the fragment map. |
433
434
435## Type Description
436
437
438### Image_MimeType
439
440```
441typedef struct Image_String Image_MimeType
442```
443
444**Description**
445
446Defines a struct for an image format type.
447
448**Since**: 12
449
450### Image_Region
451
452```
453typedef struct Image_Region Image_Region
454```
455
456**Description**
457
458Defines a struct for the region of an image to decode.
459
460**Since**: 12
461
462
463### Image_Size
464
465```
466typedef struct Image_Size Image_Size
467```
468
469**Description**
470
471Defines a struct for the image size.
472
473**Since**: 12
474
475
476### Image_String
477
478```
479typedef struct Image_String Image_String
480```
481
482**Description**
483
484Defines a struct for an image string.
485
486**Since**: 12
487
488
489### OH_AuxiliaryPictureInfo
490
491```
492typedef struct OH_AuxiliaryPictureInfo OH_AuxiliaryPictureInfo
493```
494
495**Description**
496
497Defines a struct for the auxiliary picture information, which is used to perform operations related to the auxiliary picture information.
498
499**Since**: 13
500
501
502### OH_AuxiliaryPictureNative
503
504```
505typedef struct OH_AuxiliaryPictureNative OH_AuxiliaryPictureNative
506```
507
508**Description**
509
510Defines a struct for the auxiliary picture, which is used to perform operations related to the auxiliary picture.
511
512**Since**: 13
513
514
515### OH_DecodingOptions
516
517```
518typedef struct OH_DecodingOptions OH_DecodingOptions
519```
520
521**Description**
522
523Defines a struct for decoding options, which are used in [OH_ImageSourceNative_CreatePixelmap](#oh_imagesourcenative_createpixelmap).
524
525The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_DecodingOptions Struct](../../media/image/image-structure-c.md#oh_decodingoptions-struct).
526
527**Since**: 12
528
529
530### OH_ImageNative
531
532```
533typedef struct OH_ImageNative OH_ImageNative
534```
535
536**Description**
537
538Defines the alias for an image object at the native layer.
539
540The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_ImageNative Struct](../../media/image/image-structure-c.md#oh_imagenative-struct).
541
542**Since**: 12
543
544
545### OH_ImagePackerNative
546
547```
548typedef struct OH_ImagePackerNative OH_ImagePackerNative
549```
550
551**Description**
552
553Defines a struct for the image packer, which is used to perform operations related to an image packer.
554
555The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_ImagePackerNative Struct](../../media/image/image-structure-c.md#oh_imagepackernative-struct).
556
557**Since**: 12
558
559
560### OH_ImageReceiver_OnCallback
561
562```
563typedef void(* OH_ImageReceiver_OnCallback) (OH_ImageReceiverNative *receiver)
564```
565
566**Description**
567
568Defines the callbacks for the image receiver at the native layer.
569
570**Since**: 12
571
572
573### OH_ImageReceiverNative
574
575```
576typedef struct OH_ImageReceiverNative OH_ImageReceiverNative
577```
578
579**Description**
580
581Defines the data type name of the image receiver at the native layer.
582
583The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_ImageReceiverNative Struct](../../media/image/image-structure-c.md#oh_imagereceivernative-struct).
584
585**Since**: 12
586
587
588### OH_ImageReceiverOptions
589
590```
591typedef struct OH_ImageReceiverOptionsOH_ImageReceiverOptions
592```
593
594**Description**
595
596Defines the data type name of the image receiver options.
597
598The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_ImageReceiverOptions Struct](../../media/image/image-structure-c.md#oh_imagereceiveroptions-struct).
599
600**Since**: 12
601
602
603### OH_ImageSource_Info
604
605```
606typedef struct OH_ImageSource_Info OH_ImageSource_Info
607```
608
609**Description**
610
611Defines a struct for the image source information, which is created by calling [OH_ImageSourceInfo_Create](#oh_imagesourceinfo_create).
612
613The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_ImageSource_Info Struct](../../media/image/image-structure-c.md#oh_imagesource_info-struct).
614
615**Since**: 12
616
617
618### OH_ImageSourceNative
619
620```
621typedef struct OH_ImageSourceNative OH_ImageSourceNative
622```
623
624**Description**
625
626Defines a struct for the image source, which is used to perform operations related to an image source.
627
628The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_ImageSourceNative Struct](../../media/image/image-structure-c.md#oh_imagesourcenative-struct).
629
630**Since**: 12
631
632
633### OH_NativeColorSpaceManager
634
635```
636typedef struct OH_NativeColorSpaceManager OH_NativeColorSpaceManager
637```
638
639**Description**
640
641Defines a struct for the native color space manager, which is used to perform operations related to the native color space manager.
642
643**Since**: 13
644
645
646### OH_PackingOptions
647
648```
649typedef struct OH_PackingOptions OH_PackingOptions
650```
651
652**Description**
653
654Defines a struct for image encoding parameters.
655
656The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_PackingOptions Struct](../../media/image/image-structure-c.md#oh_packingoptions-struct).
657
658**Since**: 12
659
660
661### OH_PackingOptionsForSequence
662
663```
664typedef struct OH_PackingOptionsForSequence OH_PackingOptionsForSequence
665```
666
667**Description**
668
669Defines a struct for image sequence encoding parameters.
670
671**Since**: 13
672
673
674### OH_PictureMetadata
675
676```
677typedef struct OH_PictureMetadata OH_PictureMetadata
678```
679
680**Description**
681
682Defines a struct for the picture metadata.
683
684**Since**: 13
685
686
687### OH_PictureNative
688
689```
690typedef struct OH_PictureNativeOH_PictureNative
691```
692
693**Description**
694
695Defines a struct for the picture, which is used to perform operations related to the picture.
696
697**Since**: 13
698
699
700### OH_Pixelmap_HdrDynamicMetadata
701
702```
703typedef struct OH_Pixelmap_HdrDynamicMetadata OH_Pixelmap_HdrDynamicMetadata
704```
705
706**Description**
707
708Defines a struct for the dynamic metadata values available for the key **DR_DYNAMIC_METADATA**.
709
710**Since**: 12
711
712
713### OH_Pixelmap_HdrGainmapMetadata
714
715```
716typedef struct OH_Pixelmap_HdrGainmapMetadata OH_Pixelmap_HdrGainmapMetadata
717```
718
719**Description**
720
721Defines a struct for the gain map metadata values available for the key **HDR_GAINMAP_METADATA**. For details, see ISO 21496-1.
722
723**Since**: 12
724
725
726### OH_Pixelmap_HdrMetadataValue
727
728```
729typedef struct OH_Pixelmap_HdrMetadataValue OH_Pixelmap_HdrMetadataValue
730```
731
732**Description**
733
734Defines a struct for the HDR metadata values used by the PixelMap and available for the key [OH_Pixelmap_HdrMetadataKey](#oh_pixelmap_hdrmetadatakey).
735
736It is used in [OH_PixelmapNative_SetMetadata](#oh_pixelmapnative_setmetadata) and [OH_PixelmapNative_GetMetadata](#oh_pixelmapnative_getmetadata).
737
738**Since**: 12
739
740
741### OH_Pixelmap_HdrStaticMetadata
742
743```
744typedef struct OH_Pixelmap_HdrStaticMetadata OH_Pixelmap_HdrStaticMetadata
745```
746
747**Description**
748
749Defines a struct for the static metadata values available for the key **HDR_STATIC_METADATA**.
750
751**Since**: 12
752
753
754### OH_Pixelmap_ImageInfo
755
756```
757typedef struct OH_Pixelmap_ImageInfo OH_Pixelmap_ImageInfo
758```
759
760**Description**
761
762Defines a struct for the image information.
763
764The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_Pixelmap_ImageInfo Struct](../../media/image/image-structure-c.md#oh_pixelmap_imageinfo-struct).
765
766**Since**: 12
767
768
769### OH_Pixelmap_InitializationOptions
770
771```
772typedef struct OH_Pixelmap_InitializationOptions OH_Pixelmap_InitializationOptions
773```
774
775**Description**
776
777Defines a struct for the initialization parameters.
778
779The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_Pixelmap_InitializationOptions Struct](../../media/image/image-structure-c.md#oh_pixelmap_initializationoptions-struct).
780
781**Since**: 12
782
783
784### OH_PixelmapNative
785
786```
787typedef struct OH_PixelmapNative OH_PixelmapNative
788```
789
790**Description**
791
792Defines a struct for the PixelMap, which is used to perform operations related to a PixelMap.
793
794The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see [OH_PixelmapNative Struct](../../media/image/image-structure-c.md#oh_pixelmapnative-struct).
795
796**Since**: 12
797
798
799### OH_NativeBuffer
800
801```
802typedef struct OH_NativeBuffer OH_NativeBuffer
803```
804
805**Description**
806
807Defines a struct for the native buffer, which is used to perform operations related to the native buffer.
808
809
810**Since**: 12
811
812
813## Enum Description
814
815
816### IMAGE_ALLOCATOR_TYPE
817
818```
819enum IMAGE_ALLOCATOR_TYPE
820```
821
822**Description**
823
824Enumerates the types of allocators used to allocate PixelMap memory.
825
826**Since**: 15
827
828| Value| Description|
829| -------- | -------- |
830| IMAGE_ALLOCATOR_TYPE_AUTO | The system determines whether to use DMA memory or shared memory to create a PixelMap.|
831| IMAGE_ALLOCATOR_TYPE_DMA | DMA memory is used to create a PixelMap.|
832| IMAGE_ALLOCATOR_TYPE_SHARE_MEMORY | Shared memory is used to create a PixelMap.|
833
834
835### Image_AuxiliaryPictureType
836
837```
838enum Image_AuxiliaryPictureType
839```
840
841**Description**
842
843Enumerates the auxiliary picture types.
844
845**Since**: 13
846
847| Value| Description|
848| -------- | -------- |
849| AUXILIARY_PICTURE_TYPE_GAINMAP  | Gain map, a mechanism for transforming an SDR image into an HDR image capable of adjustable display adjustment. It is a set of combinations describing how to apply gain map metadata.  |
850| AUXILIARY_PICTURE_TYPE_DEPTH_MAP  | Depth map, which stores the depth data of an image. It captures the distance between each pixel and the camera to provide 3D scene structure. It is usually used for 3D modeling and scene comprehension.  |
851| AUXILIARY_PICTURE_TYPE_UNREFOCUS_MAP  | Defocused portrait original image, which provides a method to emphasize background blur in portrait photographing. It helps users select a focus region in post-processing, allowing for greater creative control.  |
852| AUXILIARY_PICTURE_TYPE_LINEAR_MAP  | Linear map, which is used to provide additional viewpoints or supplementary information. It is usually used to enhance visual effects and can contain linear representations of lighting, colors, or other visual elements in a scene.  |
853| AUXILIARY_PICTURE_TYPE_FRAGMENT_MAP  | Fragment map, which indicates regions obscured by watermarks in the original image. It is used to remove or correct the watermark interference, thereby enhancing the image completeness and visibility.  |
854
855
856### IMAGE_DYNAMIC_RANGE
857
858```
859enum IMAGE_DYNAMIC_RANGE
860```
861
862**Description**
863
864Enumerates the desired dynamic range for decoding.
865
866**Since**: 12
867
868| Value| Description|
869| -------- | -------- |
870| IMAGE_DYNAMIC_RANGE_AUTO  | Adaptive processing.  |
871| IMAGE_DYNAMIC_RANGE_SDR  | Standard dynamic range (SDR).  |
872| IMAGE_DYNAMIC_RANGE_HDR  | High dynamic range (HDR).  |
873
874
875### Image_ErrorCode
876
877```
878enum Image_ErrorCode
879```
880
881**Description**
882
883Enumerates the error codes.
884
885**Since**: 12
886
887| Value| Description|
888| -------- | -------- |
889| IMAGE_SUCCESS  | Operation successful.|
890| IMAGE_BAD_PARAMETER  | Invalid parameter.|
891| IMAGE_UNSUPPORTED_MIME_TYPE  | Unsupported MIME type.|
892| IMAGE_UNKNOWN_MIME_TYPE  | Unknown MIME type.|
893| IMAGE_TOO_LARGE  | The data or image is too large.|
894| IMAGE_DMA_NOT_EXIST  | The memory is not the DMA memory.|
895| IMAGE_DMA_OPERATION_FAILED  | The operation on the DMA memory fails.|
896| IMAGE_UNSUPPORTED_OPERATION  | Unsupported operation.|
897| IMAGE_UNSUPPORTED_METADATA  | Unsupported metadata.|
898| IMAGE_UNSUPPORTED_CONVERSION  | Unsupported conversion.|
899| IMAGE_INVALID_REGION  | Invalid region.|
900| IMAGE_UNSUPPORTED_MEMORY_FORMAT  | The memory format is not supported.<br>**Since**: 13|
901| IMAGE_ALLOC_FAILED  | Failed to allocate the memory.|
902| IMAGE_COPY_FAILED  | Failed to copy the memory.|
903| IMAGE_LOCK_UNLOCK_FAILED | Failed to lock or unlock the memory.<br>**Since**: 15|
904| IMAGE_UNKNOWN_ERROR  | Unknown error.|
905| IMAGE_BAD_SOURCE | Abnormal data source.|
906| IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE | Unsupported MIME type.<br>**Since**: 15|
907| IMAGE_SOURCE_TOO_LARGE | The image is too large.<br>**Since**: 15|
908| IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE | The allocator type is not supported. For example, decoding HDR images using shared memory is unsupported because only DMA supports HDR metadata.<br>**Since**: 15|
909| IMAGE_SOURCE_UNSUPPORTED_OPTIONS | Unsupported options. For example, an image cannot be converted into the required pixel format.<br>**Since**: 15|
910| IMAGE_DECODE_FAILED | Decoding failed.|
911| IMAGE_SOURCE_ALLOC_FAILED | Memory allocation failed.<br>**Since**: 15|
912| IMAGE_ENCODE_FAILED | Encoding failed.|
913
914
915### Image_MetadataType
916
917```
918enum Image_MetadataType
919```
920
921**Description**
922
923Enumerates the metadata types.
924
925**Since**: 13
926
927| Value| Description|
928| -------- | -------- |
929| EXIF_METADATA  | Exif metadata.  |
930| FRAGMENT_METADATA  | Fragment map metadata.  |
931
932
933### IMAGE_PACKER_DYNAMIC_RANGE
934
935```
936enum IMAGE_PACKER_DYNAMIC_RANGE
937```
938
939**Description**
940
941Enumerates the desired dynamic range for encoding.
942
943**Since**: 12
944
945| Value| Description|
946| -------- | -------- |
947| IMAGE_PACKER_DYNAMIC_RANGE_AUTO  | Adaptive processing.  |
948| IMAGE_PACKER_DYNAMIC_RANGE_SDR  | SDR.  |
949
950
951### PIXEL_FORMAT
952
953```
954enum PIXEL_FORMAT
955```
956
957**Description**
958
959Enumerates the image pixel formats.
960
961**Since**: 12
962
963| Value| Description|
964| -------- | -------- |
965| PIXEL_FORMAT_UNKNOWN | Unknown format.|
966| PIXEL_FORMAT_RGB_565 | RGB_565 format.|
967| PIXEL_FORMAT_RGBA_8888 | RGBA_8888 format.|
968| PIXEL_FORMAT_BGRA_8888 | BGRA_8888 format.|
969| PIXEL_FORMAT_RGB_888 | RGB_888 format.|
970| PIXEL_FORMAT_ALPHA_8 | ALPHA_8 format.|
971| PIXEL_FORMAT_RGBA_F16 | RGBA_F16 format.|
972| PIXEL_FORMAT_NV21 | NV21 format.|
973| PIXEL_FORMAT_NV12 | NV12 format.|
974| PIXEL_FORMAT_RGBA_1010102 | RGBA_1010102 format.|
975| PIXEL_FORMAT_YCBCR_P010 | YCBCR_P010 format.|
976| PIXEL_FORMAT_YCRCB_P010 | YCRCB_P010 format.|
977
978
979### OH_Pixelmap_HdrMetadataKey
980
981```
982enum OH_Pixelmap_HdrMetadataKey
983```
984
985**Description**
986
987Enumerates the keys of the HDR related metadata information used by the PixelMap. It is used in [OH_PixelmapNative_SetMetadata](#oh_pixelmapnative_setmetadata) and [OH_PixelmapNative_GetMetadata](#oh_pixelmapnative_getmetadata).
988
989**Since**: 12
990
991| Value| Description|
992| -------- | -------- |
993| HDR_METADATA_TYPE  | Metadata type used by the PixelMap.  |
994| HDR_STATIC_METADATA  | Static metadata.  |
995| HDR_DYNAMIC_METADATA  | Dynamic metadata.  |
996| HDR_GAINMAP_METADATA  | Metadata used by gain maps.  |
997
998
999### OH_Pixelmap_HdrMetadataType
1000
1001```
1002enum OH_Pixelmap_HdrMetadataType
1003```
1004
1005**Description**
1006
1007Enumerates the HDR metadata types, which are the values of **HDR_METADATA_TYPE**.
1008
1009**Since**: 12
1010
1011| Value| Description|
1012| -------- | -------- |
1013| HDR_METADATA_TYPE_NONE  | No metadata.  |
1014| HDR_METADATA_TYPE_BASE  | Metadata used for base graphics.  |
1015| HDR_METADATA_TYPE_GAINMAP  | Metadata used for gain maps.  |
1016| HDR_METADATA_TYPE_ALTERNATE  | Metadata used for synthesized HDR graphics.  |
1017
1018
1019### OH_PixelmapNative_AntiAliasingLevel
1020
1021```
1022enum OH_PixelmapNative_AntiAliasingLevel
1023```
1024
1025**Description**
1026
1027Enumerates the anti-aliasing levels used for scaling PixelMaps.
1028
1029**Since**: 12
1030
1031| Value| Description|
1032| -------- | -------- |
1033| OH_PixelmapNative_AntiAliasing_NONE  | Nearest neighbor interpolation.  |
1034| OH_PixelmapNative_AntiAliasing_LOW  | Bilinear interpolation.  |
1035| OH_PixelmapNative_AntiAliasing_MEDIUM  | Bilinear interpolation with mipmap enabled. You are advised to use this value when zooming out an image.  |
1036| OH_PixelmapNative_AntiAliasing_HIGH  | Cubic interpolation.  |
1037
1038
1039### PIXELMAP_ALPHA_TYPE
1040
1041```
1042enum PIXELMAP_ALPHA_TYPE
1043```
1044
1045**Description**
1046
1047Enumerates the alpha types of a PixelMap.
1048
1049**Since**: 12
1050
1051| Value| Description|
1052| -------- | -------- |
1053| PIXELMAP_ALPHA_TYPE_UNKNOWN | Unknown format.|
1054| PIXELMAP_ALPHA_TYPE_OPAQUE | Opaque format.|
1055| PIXELMAP_ALPHA_TYPE_PREMULTIPLIED | Premultiplied format.|
1056| PIXELMAP_ALPHA_TYPE_UNPREMULTIPLIED | Non-premultiplied format.|
1057
1058
1059## Function Description
1060
1061
1062### OH_AuxiliaryPictureInfo_Create()
1063
1064```
1065Image_ErrorCode OH_AuxiliaryPictureInfo_Create(OH_AuxiliaryPictureInfo **info)
1066```
1067
1068**Description**
1069
1070Creates an **OH_AuxiliaryPictureInfo** object.
1071
1072**Since**: 13
1073
1074**Parameters**
1075
1076| Name| Description|
1077| -------- | -------- |
1078| info | Double pointer to the **OH_AuxiliaryPictureInfo** object created. |
1079
1080**Returns**
1081
1082Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1083
1084
1085### OH_AuxiliaryPictureInfo_GetPixelFormat()
1086
1087```
1088Image_ErrorCode OH_AuxiliaryPictureInfo_GetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT *pixelFormat)
1089```
1090
1091**Description**
1092
1093Obtains the pixel format of an auxiliary picture.
1094
1095**Since**: 13
1096
1097**Parameters**
1098
1099| Name| Description|
1100| -------- | -------- |
1101| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1102| pixelFormat | Pointer to the pixel format obtained. |
1103
1104**Returns**
1105
1106Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1107
1108
1109### OH_AuxiliaryPictureInfo_GetRowStride()
1110
1111```
1112Image_ErrorCode OH_AuxiliaryPictureInfo_GetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t *rowStride)
1113```
1114
1115**Description**
1116
1117Obtains the row stride of an auxiliary picture.
1118
1119**Since**: 13
1120
1121**Parameters**
1122
1123| Name| Description|
1124| -------- | -------- |
1125| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1126| rowStride | Pointer to the row stride, which is the number of bytes from one row of pixels in memory to the next row of pixels in memory. |
1127
1128**Returns**
1129
1130Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1131
1132
1133### OH_AuxiliaryPictureInfo_GetSize()
1134
1135```
1136Image_ErrorCode OH_AuxiliaryPictureInfo_GetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)
1137```
1138
1139**Description**
1140
1141Obtains the size of an auxiliary picture.
1142
1143**Since**: 13
1144
1145**Parameters**
1146
1147| Name| Description|
1148| -------- | -------- |
1149| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1150| size | Pointer to the size. |
1151
1152**Returns**
1153
1154Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1155
1156
1157### OH_AuxiliaryPictureInfo_GetType()
1158
1159```
1160Image_ErrorCode OH_AuxiliaryPictureInfo_GetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType *type)
1161```
1162
1163**Description**
1164
1165Obtains the auxiliary picture type from the auxiliary picture information.
1166
1167**Since**: 13
1168
1169**Parameters**
1170
1171| Name| Description|
1172| -------- | -------- |
1173| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1174| type | Pointer to the type of the auxiliary picture. |
1175
1176**Returns**
1177
1178Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1179
1180
1181### OH_AuxiliaryPictureInfo_Release()
1182
1183```
1184Image_ErrorCode OH_AuxiliaryPictureInfo_Release(OH_AuxiliaryPictureInfo *info)
1185```
1186
1187**Description**
1188
1189Releases the pointer to an **OH_AuxiliaryPictureInfo** object.
1190
1191**Since**: 13
1192
1193**Parameters**
1194
1195| Name| Description|
1196| -------- | -------- |
1197| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1198
1199**Returns**
1200
1201Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1202
1203
1204### OH_AuxiliaryPictureInfo_SetPixelFormat()
1205
1206```
1207Image_ErrorCode OH_AuxiliaryPictureInfo_SetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT pixelFormat)
1208```
1209
1210**Description**
1211
1212Sets the pixel format of an auxiliary picture.
1213
1214**Since**: 13
1215
1216**Parameters**
1217
1218| Name| Description|
1219| -------- | -------- |
1220| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1221| pixelFormat | Pixel format. |
1222
1223**Returns**
1224
1225Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1226
1227
1228### OH_AuxiliaryPictureInfo_SetRowStride()
1229
1230```
1231Image_ErrorCode OH_AuxiliaryPictureInfo_SetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t rowStride)
1232```
1233
1234**Description**
1235
1236Sets the row stride of an auxiliary picture.
1237
1238**Since**: 13
1239
1240**Parameters**
1241
1242| Name| Description|
1243| -------- | -------- |
1244| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1245| rowStride | Row stride, which is the number of bytes from one row of pixels in memory to the next row of pixels in memory. |
1246
1247**Returns**
1248
1249Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1250
1251
1252### OH_AuxiliaryPictureInfo_SetSize()
1253
1254```
1255Image_ErrorCode OH_AuxiliaryPictureInfo_SetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)
1256```
1257
1258**Description**
1259
1260Sets the size of an auxiliary picture.
1261
1262**Since**: 13
1263
1264**Parameters**
1265
1266| Name| Description|
1267| -------- | -------- |
1268| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1269| size | Pointer to the size. |
1270
1271**Returns**
1272
1273Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1274
1275
1276### OH_AuxiliaryPictureInfo_SetType()
1277
1278```
1279Image_ErrorCode OH_AuxiliaryPictureInfo_SetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType type)
1280```
1281
1282**Description**
1283
1284Sets the auxiliary picture type in the auxiliary picture information.
1285
1286**Since**: 13
1287
1288**Parameters**
1289
1290| Name| Description|
1291| -------- | -------- |
1292| info | Pointer to an **OH_AuxiliaryPictureInfo** object. |
1293| type | Type of the auxiliary picture. |
1294
1295**Returns**
1296
1297Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1298
1299
1300### OH_AuxiliaryPictureNative_Create()
1301
1302```
1303Image_ErrorCode OH_AuxiliaryPictureNative_Create(uint8_t *data, size_t dataLength, Image_Size *size, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture)
1304```
1305
1306**Description**
1307
1308Creates the pointer to an **OH_AuxiliaryPictureNative** object.
1309
1310**Since**: 13
1311
1312**Parameters**
1313
1314| Name| Description|
1315| -------- | -------- |
1316| data | Pointer to the image data. |
1317| dataLength | Length of the image data. |
1318| size | Pointer to the size of the auxiliary picture. |
1319| type | Type of the auxiliary picture. |
1320| auxiliaryPicture | Double pointer to the **OH_AuxiliaryPictureNative** object created. |
1321
1322**Returns**
1323
1324Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1325
1326
1327### OH_AuxiliaryPictureNative_GetInfo()
1328
1329```
1330Image_ErrorCode OH_AuxiliaryPictureNative_GetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture, OH_AuxiliaryPictureInfo **info)
1331```
1332
1333**Description**
1334
1335Obtains the auxiliary picture information.
1336
1337**Since**: 13
1338
1339**Parameters**
1340
1341| Name| Description|
1342| -------- | -------- |
1343| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1344| info | Double pointer to the auxiliary picture information. |
1345
1346**Returns**
1347
1348Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1349
1350
1351### OH_AuxiliaryPictureNative_GetMetadata()
1352
1353```
1354Image_ErrorCode OH_AuxiliaryPictureNative_GetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_MetadataType metadataType, OH_PictureMetadata **metadata)
1355```
1356
1357**Description**
1358
1359Obtains the metadata of an auxiliary picture.
1360
1361**Since**: 13
1362
1363**Parameters**
1364
1365| Name| Description|
1366| -------- | -------- |
1367| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1368| metadataType | Metadata type. |
1369| metadata | Double pointer to the metadata. |
1370
1371**Returns**
1372
1373Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_METADATA** if the metadata type is not supported or the metadata type does not match the auxiliary picture type. For details, see [Image_ErrorCode](#image_errorcode).
1374
1375
1376### OH_AuxiliaryPictureNative_GetType()
1377
1378```
1379Image_ErrorCode OH_AuxiliaryPictureNative_GetType(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_AuxiliaryPictureType *type)
1380```
1381
1382**Description**
1383
1384Obtains the type of an auxiliary picture.
1385
1386**Since**: 13
1387
1388**Parameters**
1389
1390| Name| Description|
1391| -------- | -------- |
1392| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1393| type | Type of the auxiliary picture. |
1394
1395**Returns**
1396
1397Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1398
1399
1400### OH_AuxiliaryPictureNative_ReadPixels()
1401
1402```
1403Image_ErrorCode OH_AuxiliaryPictureNative_ReadPixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *destination, size_t *bufferSize)
1404```
1405
1406**Description**
1407
1408Reads the pixels of an auxiliary picture and writes the result to the buffer.
1409
1410**Since**: 13
1411
1412**Parameters**
1413
1414| Name| Description|
1415| -------- | -------- |
1416| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1417| destination | Pointer to the buffer to which the pixels of the auxiliary data will be written. |
1418| bufferSize | Pointer to the buffer size. |
1419
1420**Returns**
1421
1422Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_ALLOC_FAILED** if the memory allocation fails; returns **IMAGE_COPY_FAILED** if the memory copy fails. For details, see [Image_ErrorCode](#image_errorcode).
1423
1424
1425### OH_AuxiliaryPictureNative_Release()
1426
1427```
1428Image_ErrorCode OH_AuxiliaryPictureNative_Release(OH_AuxiliaryPictureNative *picture)
1429```
1430
1431**Description**
1432
1433Releases the pointer to an **OH_AuxiliaryPictureNative** object.
1434
1435**Since**: 13
1436
1437**Parameters**
1438
1439| Name| Description|
1440| -------- | -------- |
1441| picture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1442
1443**Returns**
1444
1445Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1446
1447
1448### OH_AuxiliaryPictureNative_SetInfo()
1449
1450```
1451Image_ErrorCode OH_AuxiliaryPictureNative_SetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture, OH_AuxiliaryPictureInfo *info)
1452```
1453
1454**Description**
1455
1456Sets the auxiliary picture information.
1457
1458**Since**: 13
1459
1460**Parameters**
1461
1462| Name| Description|
1463| -------- | -------- |
1464| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1465| info | Pointer to the auxiliary picture information. |
1466
1467**Returns**
1468
1469Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1470
1471
1472### OH_AuxiliaryPictureNative_SetMetadata()
1473
1474```
1475Image_ErrorCode OH_AuxiliaryPictureNative_SetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_MetadataType metadataType, OH_PictureMetadata *metadata)
1476```
1477
1478**Description**
1479
1480Sets the metadata for an auxiliary picture.
1481
1482**Since**: 13
1483
1484**Parameters**
1485
1486| Name| Description|
1487| -------- | -------- |
1488| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1489| metadataType | Metadata type. |
1490| metadata | Pointer to the metadata. |
1491
1492**Returns**
1493
1494Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_METADATA** if the metadata type is not supported or the metadata type does not match the auxiliary picture type. For details, see [Image_ErrorCode](#image_errorcode).
1495
1496
1497### OH_AuxiliaryPictureNative_WritePixels()
1498
1499```
1500Image_ErrorCode OH_AuxiliaryPictureNative_WritePixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *source, size_t bufferSize)
1501```
1502
1503**Description**
1504
1505Reads the pixels in the buffer and writes the result to an auxiliary picture.
1506
1507**Since**: 13
1508
1509**Parameters**
1510
1511| Name| Description|
1512| -------- | -------- |
1513| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
1514| source | Pixels to be written. |
1515| bufferSize | Buffer size. |
1516
1517**Returns**
1518
1519Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_ALLOC_FAILED** if the memory allocation fails; returns **IMAGE_COPY_FAILED** if the memory copy fails. For details, see [Image_ErrorCode](#image_errorcode).
1520
1521
1522### OH_DecodingOptions_Create()
1523
1524```
1525Image_ErrorCode OH_DecodingOptions_Create(OH_DecodingOptions **options)
1526```
1527
1528**Description**
1529
1530Creates the pointer to an **OH_DecodingOptions** struct.
1531
1532**Since**: 12
1533
1534**Parameters**
1535
1536| Name| Description|
1537| -------- | -------- |
1538| options | Double pointer to the [OH_DecodingOptions](#oh_decodingoptions) struct created. |
1539
1540**Returns**
1541
1542Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1543
1544
1545### OH_DecodingOptions_GetDesiredDynamicRange()
1546
1547```
1548Image_ErrorCode OH_DecodingOptions_GetDesiredDynamicRange(OH_DecodingOptions *options, int32_t *desiredDynamicRange)
1549```
1550
1551**Description**
1552
1553Obtains the desired dynamic range configured during decoding.
1554
1555**Since**: 12
1556
1557**Parameters**
1558
1559| Name| Description|
1560| -------- | -------- |
1561| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1562| desiredDynamicRange | Pointer to the desired dynamic range. For details about the available options, see [IMAGE_DYNAMIC_RANGE](#image_dynamic_range). |
1563
1564**Returns**
1565
1566Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1567
1568
1569### OH_DecodingOptions_GetDesiredRegion()
1570
1571```
1572Image_ErrorCode OH_DecodingOptions_GetDesiredRegion(OH_DecodingOptions *options, Image_Region *desiredRegion)
1573```
1574
1575**Description**
1576
1577Obtains the region to decode.
1578
1579**Since**: 12
1580
1581**Parameters**
1582
1583| Name| Description|
1584| -------- | -------- |
1585| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1586| desiredRegion | Pointer to the region to decode. |
1587
1588**Returns**
1589
1590Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1591
1592
1593### OH_DecodingOptions_GetDesiredSize()
1594
1595```
1596Image_ErrorCode OH_DecodingOptions_GetDesiredSize(OH_DecodingOptions *options, Image_Size *desiredSize)
1597```
1598
1599**Description**
1600
1601Obtains the desired output size.
1602
1603**Since**: 12
1604
1605**Parameters**
1606
1607| Name| Description|
1608| -------- | -------- |
1609| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1610| desiredSize | Pointer to the desired output size. |
1611
1612**Returns**
1613
1614Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1615
1616
1617### OH_DecodingOptions_GetIndex()
1618
1619```
1620Image_ErrorCode OH_DecodingOptions_GetIndex(OH_DecodingOptions *options, uint32_t *index)
1621```
1622
1623**Description**
1624
1625Obtains the index of an image.
1626
1627**Since**: 12
1628
1629**Parameters**
1630
1631| Name| Description|
1632| -------- | -------- |
1633| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1634| index | Pointer to the index of the image to decode. |
1635
1636**Returns**
1637
1638Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1639
1640
1641### OH_DecodingOptions_GetPixelFormat()
1642
1643```
1644Image_ErrorCode OH_DecodingOptions_GetPixelFormat(OH_DecodingOptions *options, int32_t *pixelFormat)
1645```
1646
1647**Description**
1648
1649Obtains the pixel format.
1650
1651**Since**: 12
1652
1653**Parameters**
1654
1655| Name| Description|
1656| -------- | -------- |
1657| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1658| pixelFormat | Pointer to the pixel format. For details about the available options, see [PIXEL_FORMAT](#pixel_format).|
1659
1660**Returns**
1661
1662Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1663
1664
1665### OH_DecodingOptions_GetRotate()
1666
1667```
1668Image_ErrorCode OH_DecodingOptions_GetRotate(OH_DecodingOptions *options, float *rotate)
1669```
1670
1671**Description**
1672
1673Obtains the rotation degree.
1674
1675**Since**: 12
1676
1677**Parameters**
1678
1679| Name| Description|
1680| -------- | -------- |
1681| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1682| rotate | Pointer to the angle to rotate, in degrees. |
1683
1684**Returns**
1685
1686Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1687
1688
1689### OH_DecodingOptions_Release()
1690
1691```
1692Image_ErrorCode OH_DecodingOptions_Release(OH_DecodingOptions *options)
1693```
1694
1695**Description**
1696
1697Releases the pointer to an **OH_DecodingOptions** struct.
1698
1699**Since**: 12
1700
1701**Parameters**
1702
1703| Name| Description|
1704| -------- | -------- |
1705| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1706
1707**Returns**
1708
1709Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1710
1711
1712
1713### OH_DecodingOptions_SetDesiredDynamicRange()
1714
1715```
1716Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange(OH_DecodingOptions *options, int32_t desiredDynamicRange)
1717```
1718
1719**Description**
1720
1721Sets the desired dynamic range during decoding.
1722
1723**Since**: 12
1724
1725**Parameters**
1726
1727| Name| Description|
1728| -------- | -------- |
1729| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1730| desiredDynamicRange | Desired dynamic range. For details about the available options, see [IMAGE_DYNAMIC_RANGE](#image_dynamic_range). |
1731
1732**Returns**
1733
1734Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1735
1736
1737### OH_DecodingOptions_SetDesiredRegion()
1738
1739```
1740Image_ErrorCode OH_DecodingOptions_SetDesiredRegion(OH_DecodingOptions *options, Image_Region *desiredRegion)
1741```
1742
1743**Description**
1744
1745Sets the region to decode.
1746
1747**Since**: 12
1748
1749**Parameters**
1750
1751| Name| Description|
1752| -------- | -------- |
1753| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1754| desiredRegion | Pointer to the region to decode. |
1755
1756**Returns**
1757
1758Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1759
1760
1761### OH_DecodingOptions_SetDesiredSize()
1762
1763```
1764Image_ErrorCode OH_DecodingOptions_SetDesiredSize(OH_DecodingOptions *options, Image_Size *desiredSize)
1765```
1766
1767**Description**
1768
1769Sets the desired output size.
1770
1771**Since**: 12
1772
1773**Parameters**
1774
1775| Name| Description|
1776| -------- | -------- |
1777| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1778| desiredSize | Pointer to the desired output size. |
1779
1780**Returns**
1781
1782Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1783
1784
1785### OH_DecodingOptions_SetIndex()
1786
1787```
1788Image_ErrorCode OH_DecodingOptions_SetIndex(OH_DecodingOptions *options, uint32_t index)
1789```
1790
1791**Description**
1792
1793Sets the index for an image.
1794
1795**Since**: 12
1796
1797**Parameters**
1798
1799| Name| Description|
1800| -------- | -------- |
1801| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1802| index | Index of the image to decode. |
1803
1804**Returns**
1805
1806Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1807
1808
1809### OH_DecodingOptions_SetPixelFormat()
1810
1811```
1812Image_ErrorCode OH_DecodingOptions_SetPixelFormat(OH_DecodingOptions *options, int32_t pixelFormat)
1813```
1814
1815**Description**
1816
1817Sets the pixel format.
1818
1819**Since**: 12
1820
1821**Parameters**
1822
1823| Name| Description|
1824| -------- | -------- |
1825| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1826| pixelFormat | Pixel format. For details about the available options, see [PIXEL_FORMAT](#pixel_format). |
1827
1828**Returns**
1829
1830Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1831
1832
1833### OH_DecodingOptions_SetRotate()
1834
1835```
1836Image_ErrorCode OH_DecodingOptions_SetRotate(OH_DecodingOptions *options, float rotate)
1837```
1838
1839**Description**
1840
1841Sets the rotation angle.
1842
1843**Since**: 12
1844
1845**Parameters**
1846
1847| Name| Description|
1848| -------- | -------- |
1849| options | Pointer to an [OH_DecodingOptions](#oh_decodingoptions) struct. |
1850| rotate | Angle to rotate, in degrees. |
1851
1852**Returns**
1853
1854Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1855
1856
1857### OH_DecodingOptionsForPicture_Create()
1858
1859```
1860Image_ErrorCode OH_DecodingOptionsForPicture_Create(OH_DecodingOptionsForPicture **options)
1861```
1862
1863**Description**
1864
1865Creates the pointer to an **OH_DecodingOptionsForPicture** struct.
1866
1867**Since**: 13
1868
1869**Parameters**
1870
1871| Name| Description|
1872| -------- | -------- |
1873| options | Double pointer to the **OH_DecodingOptionsForPicture** struct created. |
1874
1875**Returns**
1876
1877Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1878
1879
1880### OH_DecodingOptionsForPicture_GetDesiredAuxiliaryPictures()
1881
1882```
1883Image_ErrorCode OH_DecodingOptionsForPicture_GetDesiredAuxiliaryPictures(OH_DecodingOptionsForPicture *options, Image_AuxiliaryPictureType **desiredAuxiliaryPictures, size_t *length)
1884```
1885
1886**Description**
1887
1888Obtains desired auxiliary pictures in the decoding options (auxiliary pictures contained in **picture** expected to be decoded.)
1889
1890**Since**: 13
1891
1892**Parameters**
1893
1894| Name| Description|
1895| -------- | -------- |
1896| options | Pointer to an **OH_DecodingOptionsForPicture** struct. |
1897| desiredAuxiliaryPictures | Double pointer to the desired auxiliary pictures. |
1898| length | Pointer to the length of the desired auxiliary pictures. |
1899
1900**Returns**
1901
1902Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1903
1904
1905### OH_DecodingOptionsForPicture_Release()
1906
1907```
1908Image_ErrorCode OH_DecodingOptionsForPicture_Release(OH_DecodingOptionsForPicture *options)
1909```
1910
1911**Description**
1912
1913Releases the pointer to an **OH_DecodingOptionsForPicture** struct.
1914
1915**Since**: 13
1916
1917**Parameters**
1918
1919| Name| Description|
1920| -------- | -------- |
1921| options | Pointer to an **OH_DecodingOptionsForPicture** struct. |
1922
1923**Returns**
1924
1925Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1926
1927
1928### OH_DecodingOptionsForPicture_SetDesiredAuxiliaryPictures()
1929
1930```
1931Image_ErrorCode OH_DecodingOptionsForPicture_SetDesiredAuxiliaryPictures(OH_DecodingOptionsForPicture *options, Image_AuxiliaryPictureType *desiredAuxiliaryPictures, size_t length)
1932```
1933
1934**Description**
1935
1936Sets desired auxiliary pictures in the decoding options.
1937
1938**Since**: 13
1939
1940**Parameters**
1941
1942| Name| Description|
1943| -------- | -------- |
1944| options | Pointer to an **OH_DecodingOptionsForPicture** struct. |
1945| desiredAuxiliaryPictures | Pointer to the desired auxiliary pictures. |
1946| length | Length of the desired auxiliary pictures. |
1947
1948**Returns**
1949
1950Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1951
1952
1953### OH_ImageNative_GetBufferSize()
1954
1955```
1956Image_ErrorCode OH_ImageNative_GetBufferSize(OH_ImageNative *image, uint32_t componentType, size_t *size)
1957```
1958
1959**Description**
1960
1961Obtains the size of the buffer corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object.
1962
1963**Since**: 12
1964
1965**Parameters**
1966
1967| Name| Description|
1968| -------- | -------- |
1969| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
1970| componentType | Component type. |
1971| size | Pointer to the size of the buffer. |
1972
1973**Returns**
1974
1975Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
1976
1977
1978### OH_ImageNative_GetByteBuffer()
1979
1980```
1981Image_ErrorCode OH_ImageNative_GetByteBuffer(OH_ImageNative *image, uint32_t componentType, OH_NativeBuffer **nativeBuffer)
1982```
1983
1984**Description**
1985
1986Obtains the buffer corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object.
1987
1988**Since**: 12
1989
1990**Parameters**
1991
1992| Name| Description|
1993| -------- | -------- |
1994| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
1995| componentType | Component type. |
1996| nativeBuffer | Double pointer to the buffer, which is an **OH_NativeBuffer** object. |
1997
1998**Returns**
1999
2000Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2001
2002
2003### OH_ImageNative_GetComponentTypes()
2004
2005```
2006Image_ErrorCode OH_ImageNative_GetComponentTypes(OH_ImageNative *image, uint32_t **types, size_t *typeSize)
2007```
2008
2009**Description**
2010
2011Obtains the component types of a native [OH_ImageNative](#oh_imagenative) object.
2012
2013**Since**: 12
2014
2015**Parameters**
2016
2017| Name| Description|
2018| -------- | -------- |
2019| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
2020| types | Double pointer to the component types obtained. |
2021| typeSize | Pointer to the number of component types obtained. |
2022
2023**Returns**
2024
2025Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2026
2027
2028### OH_ImageNative_GetImageSize()
2029
2030```
2031Image_ErrorCode OH_ImageNative_GetImageSize(OH_ImageNative *image, Image_Size *size)
2032```
2033
2034**Description**
2035
2036Obtains the [Image_Size](_image___size.md) information of a native [OH_ImageNative](#oh_imagenative) object.
2037
2038If the [OH_ImageNative](#oh_imagenative) object stores the camera preview stream data (YUV image data), the width and height in [Image_Size](_image___size.md) obtained correspond to those of the YUV image. If the [OH_ImageNative](#oh_imagenative) object stores the camera photo stream data (JPEG image data, which is already encoded), the width in [Image_Size](_image___size.md) obtained is the JPEG data size, and the height is 1. The type of data stored in the [OH_ImageNative](#oh_imagenative) object depends on whether the application passes the surface ID in the receiver to a **previewOutput** or **captureOutput** object of the camera. For details about the best practices of camera preview and photo capture, see [Secondary Processing of Preview Streams (C/C++)](../../media/camera/native-camera-preview-imageReceiver.md) and [Photo Capture (C/C++)](../../media/camera/native-camera-shooting.md).
2039
2040**Since**: 12
2041
2042**Parameters**
2043
2044| Name| Description|
2045| -------- | -------- |
2046| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
2047| size | Pointer to the [Image_Size](_image___size.md) object obtained. |
2048
2049**Returns**
2050
2051Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
2052
2053
2054### OH_ImageNative_GetPixelStride()
2055
2056```
2057Image_ErrorCode OH_ImageNative_GetPixelStride(OH_ImageNative *image, uint32_t componentType, int32_t *pixelStride)
2058```
2059
2060**Description**
2061
2062Obtains the pixel stride corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object.
2063
2064**Since**: 12
2065
2066**Parameters**
2067
2068| Name| Description|
2069| -------- | -------- |
2070| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
2071| componentType | Component type. |
2072| pixelStride | Pointer to the pixel stride obtained. |
2073
2074**Returns**
2075
2076Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2077
2078
2079### OH_ImageNative_GetRowStride()
2080
2081```
2082Image_ErrorCode OH_ImageNative_GetRowStride(OH_ImageNative *image, uint32_t componentType, int32_t *rowStride)
2083```
2084
2085**Description**
2086
2087Obtains the row stride corresponding to a component type in a native [OH_ImageNative](#oh_imagenative) object.
2088
2089Camera preview stream data must be read based on the stride. For details, see [Secondary Processing of Preview Streams (C/C++)](../../media/camera/native-camera-preview-imageReceiver.md).
2090
2091**Since**: 12
2092
2093**Parameters**
2094
2095| Name| Description|
2096| -------- | -------- |
2097| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
2098| componentType | Component type. |
2099| rowStride | Pointer to the row stride obtained. |
2100
2101**Returns**
2102
2103Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2104
2105
2106### OH_ImageNative_GetTimestamp()
2107
2108```
2109Image_ErrorCode OH_ImageNative_GetTimestamp(OH_ImageNative *image, int64_t *timestamp)
2110```
2111
2112**Description**
2113
2114Obtains the timestamp of a native [OH_ImageNative](#oh_imagenative) object.
2115
2116Timestamps, measured in nanoseconds, are usually monotonically increasing. The specific meaning and baseline of these timestamps are determined by the image producer, which is the camera in the camera preview and photo scenarios. As a result, images from different producers may carry timestamps with distinct meanings and baselines, making direct comparison between them infeasible. To obtain the generation time of a photo, you can use [OH_ImageSourceNative_GetImageProperty](#oh_imagesourcenative_getimageproperty) to read the related EXIF information.
2117
2118**Since**: 12
2119
2120**Parameters**
2121
2122| Name| Description|
2123| -------- | -------- |
2124| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
2125| timestamp | Pointer to the timestamp. |
2126
2127**Returns**
2128
2129Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2130
2131
2132### OH_ImageNative_Release()
2133
2134```
2135Image_ErrorCode OH_ImageNative_Release(OH_ImageNative *image)
2136```
2137
2138**Description**
2139
2140Releases a native [OH_ImageNative](#oh_imagenative) object.
2141
2142**Since**: 12
2143
2144**Parameters**
2145
2146| Name| Description|
2147| -------- | -------- |
2148| image | Pointer to a native [OH_ImageNative](#oh_imagenative) object. |
2149
2150**Returns**
2151
2152Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2153
2154
2155### OH_ImagePackerNative_Create()
2156
2157```
2158Image_ErrorCode OH_ImagePackerNative_Create(OH_ImagePackerNative **imagePacker)
2159```
2160
2161**Description**
2162
2163Creates the pointer to an **OH_ImagePackerNative** object.
2164
2165**Since**: 12
2166
2167**Parameters**
2168
2169| Name| Description|
2170| -------- | -------- |
2171| options | Double pointer to the **OH_ImagePackerNative** object created. |
2172
2173**Returns**
2174
2175Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2176
2177
2178### OH_ImagePackerNative_PackToDataFromImageSource()
2179
2180```
2181Image_ErrorCode OH_ImagePackerNative_PackToDataFromImageSource(OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_ImageSourceNative *imageSource, uint8_t *outData, size_t *size)
2182```
2183
2184**Description**
2185
2186Encodes an image source into data in a given format.
2187
2188**Since**: 12
2189
2190**Parameters**
2191
2192| Name| Description|
2193| -------- | -------- |
2194| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2195| options | Pointer to an [OH_PackingOptions](#oh_packingoptions) struct. |
2196| imageSource | Pointer to the image source to encode. |
2197| outData | Pointer to the buffer used to store the output data. |
2198| size | Pointer to the size of the buffer. |
2199
2200**Returns**
2201
2202Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if image decoding fails; returns **IMAGE_ALLOC_FAILED** if memory allocation fails; returns **IMAGE_TOO_LARGE** if the data or image is too large; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
2203
2204
2205### OH_ImagePackerNative_PackToDataFromPicture()
2206
2207```
2208Image_ErrorCode OH_ImagePackerNative_PackToDataFromPicture(OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_PictureNative *picture, uint8_t *outData, size_t *size)
2209```
2210
2211**Description**
2212
2213Encodes a picture into data in a given format.
2214
2215**Since**: 13
2216
2217**Parameters**
2218
2219| Name| Description|
2220| -------- | -------- |
2221| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2222| options | Pointer to an [OH_PackingOptions](#oh_packingoptions) struct. |
2223| picture | Pointer to the picture to encode. |
2224| outData | Pointer to the buffer used to store the output data. |
2225| size | Pointer to the size of the buffer. |
2226
2227**Returns**
2228
2229Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if decoding fails. For details, see [Image_ErrorCode](#image_errorcode).
2230
2231
2232### OH_ImagePackerNative_PackToDataFromPixelmap()
2233
2234```
2235Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmap(OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_PixelmapNative *pixelmap, uint8_t *outData, size_t *size)
2236```
2237
2238**Description**
2239
2240Encodes a PixelMap into data in a given format.
2241
2242**Since**: 12
2243
2244**Parameters**
2245
2246| Name| Description|
2247| -------- | -------- |
2248| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2249| options | Pointer to an [OH_PackingOptions](#oh_packingoptions) struct. |
2250| pixelmap | Pointer to the PixelMap to encode. |
2251| outData | Pointer to the buffer used to store the output data. |
2252| size | Pointer to the size of the buffer. |
2253
2254**Returns**
2255
2256Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if image decoding fails; returns **IMAGE_ALLOC_FAILED** if memory allocation fails; returns **IMAGE_TOO_LARGE** if the data or image is too large; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
2257
2258
2259### OH_ImagePackerNative_PackToDataFromPixelmapSequence()
2260
2261```
2262Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, size_t sequenceLength, uint8_t *outData, size_t *outDataSize)
2263```
2264
2265**Description**
2266
2267Encodes a PixelMap sequence into data.
2268
2269**Since**: 13
2270
2271**Parameters**
2272
2273| Name| Description|
2274| -------- | -------- |
2275| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2276| options | Pointer to an [OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) struct. |
2277| pixelmapSequence | Double pointer to the PixelMap sequence to encode. |
2278| sequenceLength | Length of the PixelMap sequence. |
2279| outData | Pointer to the buffer used to store the output data. |
2280| outDataSize | Pointer to the size of the buffer. |
2281
2282**Returns**
2283
2284Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if decoding fails. For details, see [Image_ErrorCode](#image_errorcode).
2285
2286
2287### OH_ImagePackerNative_PackToFileFromImageSource()
2288
2289```
2290Image_ErrorCode OH_ImagePackerNative_PackToFileFromImageSource(OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_ImageSourceNative *imageSource, int32_t fd)
2291```
2292
2293**Description**
2294
2295Encodes an image source into a file.
2296
2297**Since**: 12
2298
2299**Parameters**
2300
2301| Name| Description|
2302| -------- | -------- |
2303| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2304| options | Pointer to an [OH_PackingOptions](#oh_packingoptions) struct. |
2305| imageSource | Pointer to the image source to encode. |
2306| fd | File descriptor, which is writable. |
2307
2308**Returns**
2309
2310Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if image decoding fails; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
2311
2312
2313### OH_ImagePackerNative_PackToFileFromPicture()
2314
2315```
2316Image_ErrorCode OH_ImagePackerNative_PackToFileFromPicture(OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_PictureNative *picture, int32_t fd)
2317```
2318
2319**Description**
2320
2321Encodes a picture into a file.
2322
2323**Since**: 13
2324
2325**Parameters**
2326
2327| Name| Description|
2328| -------- | -------- |
2329| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2330| options | Pointer to an [OH_PackingOptions](#oh_packingoptions) struct. |
2331| picture | Pointer to the picture to encode. |
2332| fd | File descriptor, which is writable. |
2333
2334**Returns**
2335
2336Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if image decoding fails; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
2337
2338
2339### OH_ImagePackerNative_PackToFileFromPixelmap()
2340
2341```
2342Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmap(OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_PixelmapNative *pixelmap, int32_t fd)
2343```
2344
2345**Description**
2346
2347Encodes a PixelMap into a file.
2348
2349**Since**: 12
2350
2351**Parameters**
2352
2353| Name| Description|
2354| -------- | -------- |
2355| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2356| options | Pointer to an [OH_PackingOptions](#oh_packingoptions) struct. |
2357| pixelmap | Pointer to the PixelMap to encode. |
2358| fd | File descriptor, which is writable. |
2359
2360**Returns**
2361
2362Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if image decoding fails; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
2363
2364
2365### OH_ImagePackerNative_PackToFileFromPixelmapSequence()
2366
2367```
2368Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmapSequence(OH_ImagePackerNative *imagePacker, OH_PackingOptionsForSequence *options, OH_PixelmapNative **pixelmapSequence, size_t sequenceLength, int32_t fd)
2369```
2370
2371**Description**
2372
2373Encodes a PixelMap sequence into a file.
2374
2375**Since**: 13
2376
2377**Parameters**
2378
2379| Name| Description|
2380| -------- | -------- |
2381| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2382| options | Pointer to an [OH_PackingOptionsForSequence](#oh_packingoptionsforsequence) struct. |
2383| pixelmapSequence | Double pointer to the PixelMap sequence to encode. |
2384| sequenceLength | Length of the PixelMap sequence. |
2385| fd | File descriptor, which is writable. |
2386
2387**Returns**
2388
2389Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if decoding fails. For details, see [Image_ErrorCode](#image_errorcode).
2390
2391
2392### OH_ImagePackerNative_Release()
2393
2394```
2395Image_ErrorCode OH_ImagePackerNative_Release(OH_ImagePackerNative *imagePacker)
2396```
2397
2398**Description**
2399
2400Releases the pointer to an **OH_ImagePackerNative** object.
2401
2402**Since**: 12
2403
2404**Parameters**
2405
2406| Name| Description|
2407| -------- | -------- |
2408| imagePacker | Pointer to an **OH_ImagePackerNative** object. |
2409
2410**Returns**
2411
2412Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2413
2414
2415### OH_ImageReceiverNative_Create()
2416
2417```
2418Image_ErrorCode OH_ImageReceiverNative_Create(OH_ImageReceiverOptions* options, OH_ImageReceiverNative** receiver)
2419```
2420
2421**Description**
2422
2423Creates an **OH_ImageReceiverNative** object at the application layer.
2424
2425**Since**: 12
2426
2427**Parameters**
2428
2429| Name| Description|
2430| -------- | -------- |
2431| options | Pointer to an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
2432| receiver | Double pointer to the [OH_ImageReceiverNative](#oh_imagereceivernative) object created. |
2433
2434**Returns**
2435
2436Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_ALLOC_FAILED** if memory allocation fails. For details, see [Image_ErrorCode](#image_errorcode).
2437
2438
2439### OH_ImageReceiverNative_GetCapacity()
2440
2441```
2442Image_ErrorCode OH_ImageReceiverNative_GetCapacity(OH_ImageReceiverNative* receiver, int32_t* capacity)
2443```
2444
2445**Description**
2446
2447Obtains the capacity of an image receiver, which is an [OH_ImageReceiverNative](#oh_imagereceivernative) object.
2448
2449**Since**: 12
2450
2451**Parameters**
2452
2453| Name| Description|
2454| -------- | -------- |
2455| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2456| capacity | Pointer to the capacity obtained. |
2457
2458**Returns**
2459
2460Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2461
2462**See**
2463
2464[OH_ImageReceiverNative](#oh_imagereceivernative)
2465
2466
2467### OH_ImageReceiverNative_GetReceivingSurfaceId()
2468
2469```
2470Image_ErrorCode OH_ImageReceiverNative_GetReceivingSurfaceId(OH_ImageReceiverNative* receiver, uint64_t* surfaceId)
2471```
2472
2473**Description**
2474
2475Obtains the receiver ID through an [OH_ImageReceiverNative](#oh_imagereceivernative) object.
2476
2477**Since**: 12
2478
2479**Parameters**
2480
2481| Name| Description|
2482| -------- | -------- |
2483| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2484| surfaceId | Pointer to the surface ID obtained. |
2485
2486**Returns**
2487
2488Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
2489
2490**See**
2491
2492[OH_ImageReceiverNative](#oh_imagereceivernative)
2493
2494
2495### OH_ImageReceiverNative_GetSize()
2496
2497```
2498Image_ErrorCode OH_ImageReceiverNative_GetSize(OH_ImageReceiverNative* receiver, Image_Size* size)
2499```
2500
2501**Description**
2502
2503Obtains the size of an image receiver, which is an [OH_ImageReceiverNative](#oh_imagereceivernative) object.
2504
2505**Since**: 12
2506
2507**Parameters**
2508
2509| Name| Description|
2510| -------- | -------- |
2511| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2512| size | Pointer to the [Image_Size](_image___size.md) object obtained. |
2513
2514**Returns**
2515
2516Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2517
2518**See**
2519
2520[OH_ImageReceiverNative](#oh_imagereceivernative), [Image_Size](_image___size.md)
2521
2522
2523### OH_ImageReceiverNative_Off()
2524
2525```
2526Image_ErrorCode OH_ImageReceiverNative_Off(OH_ImageReceiverNative* receiver)
2527```
2528
2529**Description**
2530
2531Unregisters the callback defined in [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback).
2532
2533The callback is registered by calling [OH_ImageReceiverNative_On](#oh_imagereceivernative_on).
2534
2535**Since**: 12
2536
2537**Parameters**
2538
2539| Name| Description|
2540| -------- | -------- |
2541| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2542
2543**Returns**
2544
2545Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2546
2547**See**
2548
2549[OH_ImageReceiverNative](#oh_imagereceivernative), [OH_ImageReceiverNative_On](#oh_imagereceivernative_on)
2550
2551
2552### OH_ImageReceiverNative_On()
2553
2554```
2555Image_ErrorCode OH_ImageReceiverNative_On(OH_ImageReceiverNative* receiver, OH_ImageReceiver_OnCallback callback)
2556```
2557
2558**Description**
2559
2560Registers the callback defined in [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback).
2561
2562This callback is triggered whenever a new image is received.
2563
2564**Since**: 12
2565
2566**Parameters**
2567
2568| Name| Description|
2569| -------- | -------- |
2570| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2571| callback | Callback defined in [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback). |
2572
2573**Returns**
2574
2575Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2576
2577**See**
2578
2579[OH_ImageReceiverNative](#oh_imagereceivernative), [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback)
2580
2581
2582### OH_ImageReceiverNative_ReadLatestImage()
2583
2584```
2585Image_ErrorCode OH_ImageReceiverNative_ReadLatestImage(OH_ImageReceiverNative* receiver, OH_ImageNative** image)
2586```
2587
2588**Description**
2589
2590Obtains the latest image through an [OH_ImageReceiverNative](#oh_imagereceivernative) object.
2591
2592> **NOTE**
2593>
2594> This function can be called to receive data only after the [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback) callback is triggered. When the [OH_ImageNative](#oh_imagenative) object returned by this function is no longer needed, call [OH_ImageNative_Release](#oh_imagenative_release) to release the object. New data can be received only after the release.
2595
2596**Since**: 12
2597
2598**Parameters**
2599
2600| Name| Description|
2601| -------- | -------- |
2602| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2603| image | Double pointer to the image obtained, which is an **OH_ImageNative** object at the application layer. |
2604
2605**Returns**
2606
2607Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs; returns **IMAGE_ALLOC_FAILED** if memory allocation fails. For details, see [Image_ErrorCode](#image_errorcode).
2608
2609**See**
2610
2611[OH_ImageReceiverNative](#oh_imagereceivernative), [OH_ImageNative](#oh_imagenative)
2612
2613
2614### OH_ImageReceiverNative_ReadNextImage()
2615
2616```
2617Image_ErrorCode OH_ImageReceiverNative_ReadNextImage(OH_ImageReceiverNative* receiver, OH_ImageNative** image)
2618```
2619
2620**Description**
2621
2622Obtains the next image through an [OH_ImageReceiverNative](#oh_imagereceivernative) object.
2623
2624> **NOTE**
2625>
2626> This function can be called to receive data only after the [OH_ImageReceiver_OnCallback](#oh_imagereceiver_oncallback) callback is triggered. When the [OH_ImageNative](#oh_imagenative) object returned by this function is no longer needed, call [OH_ImageNative_Release](#oh_imagenative_release) to release the object. New data can be received only after the release.
2627
2628**Since**: 12
2629
2630**Parameters**
2631
2632| Name| Description|
2633| -------- | -------- |
2634| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2635| image | Double pointer to the image obtained, which is an **OH_ImageNative** object at the application layer. |
2636
2637**Returns**
2638
2639Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs; returns **IMAGE_ALLOC_FAILED** if memory allocation fails. For details, see [Image_ErrorCode](#image_errorcode).
2640
2641**See**
2642
2643[OH_ImageReceiverNative](#oh_imagereceivernative), [OH_ImageNative](#oh_imagenative)
2644
2645
2646### OH_ImageReceiverNative_Release()
2647
2648```
2649Image_ErrorCode OH_ImageReceiverNative_Release(OH_ImageReceiverNative* receiver)
2650```
2651
2652**Description**
2653
2654Releases a native [OH_ImageReceiverNative](#oh_imagereceivernative) object.
2655
2656**Since**: 12
2657
2658**Parameters**
2659
2660| Name| Description|
2661| -------- | -------- |
2662| receiver | Pointer to an [OH_ImageReceiverNative](#oh_imagereceivernative) object. |
2663
2664**Returns**
2665
2666Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2667
2668**See**
2669
2670[OH_ImageReceiverNative](#oh_imagereceivernative)
2671
2672
2673### OH_ImageReceiverOptions_Create()
2674
2675```
2676Image_ErrorCode OH_ImageReceiverOptions_Create(OH_ImageReceiverOptions **options)
2677```
2678
2679**Description**
2680
2681Creates an **OH_ImageReceiverOptions** object at the application layer.
2682
2683**Since**: 12
2684
2685**Parameters**
2686
2687| Name| Description|
2688| -------- | -------- |
2689| options | Double pointer to the [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object created. |
2690
2691**Returns**
2692
2693Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_ALLOC_FAILED** if memory allocation fails. For details, see [Image_ErrorCode](#image_errorcode).
2694
2695
2696### OH_ImageReceiverOptions_GetCapacity()
2697
2698```
2699Image_ErrorCode OH_ImageReceiverOptions_GetCapacity(OH_ImageReceiverOptions* options, int32_t* capacity)
2700```
2701
2702**Description**
2703
2704Obtains the capacity of an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object.
2705
2706**Since**: 12
2707
2708**Parameters**
2709
2710| Name| Description|
2711| -------- | -------- |
2712| options | Pointer to an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
2713| capacity | Pointer to the capacity obtained. |
2714
2715**Returns**
2716
2717Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2718
2719
2720### OH_ImageReceiverOptions_GetSize()
2721
2722```
2723Image_ErrorCode OH_ImageReceiverOptions_GetSize(OH_ImageReceiverOptions* options, Image_Size* size)
2724```
2725
2726**Description**
2727
2728Obtains the [Image_Size](_image___size.md) information of an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object.
2729
2730**Since**: 12
2731
2732**Parameters**
2733
2734| Name| Description|
2735| -------- | -------- |
2736| options | Pointer to an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
2737| size | Pointer to the [Image_Size](_image___size.md) object obtained. |
2738
2739**Returns**
2740
2741Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2742
2743
2744### OH_ImageReceiverOptions_Release()
2745
2746```
2747Image_ErrorCode OH_ImageReceiverOptions_Release(OH_ImageReceiverOptions* options)
2748```
2749
2750**Description**
2751
2752Releases an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object.
2753
2754**Since**: 12
2755
2756**Parameters**
2757
2758| Name| Description|
2759| -------- | -------- |
2760| options | Pointer to an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
2761
2762**Returns**
2763
2764Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2765
2766**See**
2767
2768[OH_ImageReceiverOptions](#oh_imagereceiveroptions)
2769
2770
2771### OH_ImageReceiverOptions_SetCapacity()
2772
2773```
2774Image_ErrorCode OH_ImageReceiverOptions_SetCapacity(OH_ImageReceiverOptions* options, int32_t capacity)
2775```
2776
2777**Description**
2778
2779Sets the capacity for an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object.
2780
2781**Since**: 12
2782
2783**Parameters**
2784
2785| Name| Description|
2786| -------- | -------- |
2787| options | Pointer to an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
2788| capacity | Capacity to set. |
2789
2790**Returns**
2791
2792Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2793
2794
2795### OH_ImageReceiverOptions_SetSize()
2796
2797```
2798Image_ErrorCode OH_ImageReceiverOptions_SetSize(OH_ImageReceiverOptions* options, Image_Size size)
2799```
2800
2801**Description**
2802
2803Sets the [Image_Size](_image___size.md) information for an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object.
2804
2805**Since**: 12
2806
2807**Parameters**
2808
2809| Name| Description|
2810| -------- | -------- |
2811| options | Pointer to an [OH_ImageReceiverOptions](#oh_imagereceiveroptions) object. |
2812| size | [Image_Size](_image___size.md) object. |
2813
2814**Returns**
2815
2816Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2817
2818
2819### OH_ImageSourceInfo_Create()
2820
2821```
2822Image_ErrorCode OH_ImageSourceInfo_Create(OH_ImageSource_Info **info)
2823```
2824
2825**Description**
2826
2827Creates the pointer to an **OH_ImageSource_Info** struct.
2828
2829**Since**: 12
2830
2831**Parameters**
2832
2833| Name| Description|
2834| -------- | -------- |
2835| info | Double pointer to the **OH_ImageSource_Info** struct created. |
2836
2837**Returns**
2838
2839Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2840
2841
2842### OH_ImageSourceInfo_GetDynamicRange()
2843
2844```
2845Image_ErrorCode OH_ImageSourceInfo_GetDynamicRange(OH_ImageSource_Info *info, bool *isHdr)
2846```
2847
2848**Description**
2849
2850Obtains the dynamic range of an image.
2851
2852**Since**: 12
2853
2854**Parameters**
2855
2856| Name| Description|
2857| -------- | -------- |
2858| info | Pointer to an **OH_ImageSource_Info** struct. |
2859| isHdr | Pointer to a Boolean that specifies whether the HDR is used. |
2860
2861**Returns**
2862
2863Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2864
2865
2866### OH_ImageSourceInfo_GetHeight()
2867
2868```
2869Image_ErrorCode OH_ImageSourceInfo_GetHeight(OH_ImageSource_Info *info, uint32_t *height)
2870```
2871
2872**Description**
2873
2874Obtains the image height.
2875
2876**Since**: 12
2877
2878**Parameters**
2879
2880| Name| Description|
2881| -------- | -------- |
2882| info | Pointer to an **OH_ImageSource_Info** struct. |
2883| height | Pointer to the image height, in px. |
2884
2885**Returns**
2886
2887Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2888
2889
2890### OH_ImageSourceInfo_GetWidth()
2891
2892```
2893Image_ErrorCode OH_ImageSourceInfo_GetWidth(OH_ImageSource_Info *info, uint32_t *width)
2894```
2895
2896**Description**
2897
2898Obtains the image width.
2899
2900**Since**: 12
2901
2902**Parameters**
2903
2904| Name| Description|
2905| -------- | -------- |
2906| info | Pointer to an **OH_ImageSource_Info** struct. |
2907| width | Pointer to the image width, in px. |
2908
2909**Returns**
2910
2911Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2912
2913
2914### OH_ImageSourceInfo_Release()
2915
2916```
2917Image_ErrorCode OH_ImageSourceInfo_Release(OH_ImageSource_Info *info)
2918```
2919
2920**Description**
2921
2922Releases the pointer to an **OH_ImageSource_Info** struct.
2923
2924**Since**: 12
2925
2926**Parameters**
2927
2928| Name| Description|
2929| -------- | -------- |
2930| info | Pointer to an **OH_ImageSource_Info** struct. |
2931
2932**Returns**
2933
2934Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2935
2936
2937### OH_ImageSourceNative_CreateFromData()
2938
2939```
2940Image_ErrorCode OH_ImageSourceNative_CreateFromData(uint8_t *data, size_t dataSize, OH_ImageSourceNative **res)
2941```
2942
2943**Description**
2944
2945Creates the pointer to an **OH_ImageSourceNative** object based on buffer data.
2946
2947The buffer data must be undecoded. Do not pass the pixel buffer data such as RBGA and YUV. If you want to create a PixelMap based on the pixel buffer data, call [OH_PixelmapNative_CreatePixelmap](./pixelmap__native_8h.md).
2948
2949**Since**: 12
2950
2951**Parameters**
2952
2953| Name| Description|
2954| -------- | -------- |
2955| data | Pointer to the buffer data. |
2956| dataSize | Size of the buffer. |
2957| res | Double pointer to the **OH_ImageSourceNative** object created at the C++ local layer. |
2958
2959**Returns**
2960
2961Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_BAD_SOURCE** if the data source is abnormal. For details, see [Image_ErrorCode](#image_errorcode).
2962
2963
2964### OH_ImageSourceNative_CreateFromFd()
2965
2966```
2967Image_ErrorCode OH_ImageSourceNative_CreateFromFd(int32_t fd, OH_ImageSourceNative **res)
2968```
2969
2970**Description**
2971
2972Creates the pointer to an **OH_ImageSourceNative** object based on a file descriptor.
2973
2974**Since**: 12
2975
2976**Parameters**
2977
2978| Name| Description|
2979| -------- | -------- |
2980| fd | File descriptor. |
2981| res | Double pointer to the **OH_ImageSourceNative** object created at the C++ local layer. |
2982
2983**Returns**
2984
2985Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
2986
2987
2988### OH_ImageSourceNative_CreateFromRawFile()
2989
2990```
2991Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFile, OH_ImageSourceNative **res)
2992```
2993
2994**Description**
2995
2996Creates the pointer to an **OH_ImageSourceNative** object by using the raw file descriptor of an image resource file.
2997
2998**Since**: 12
2999
3000**Parameters**
3001
3002| Name| Description|
3003| -------- | -------- |
3004| rawFile | Pointer to the file descriptor of the raw file. |
3005| res | Double pointer to the **OH_ImageSourceNative** object created at the C++ local layer. |
3006
3007**Returns**
3008
3009Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3010
3011
3012### OH_ImageSourceNative_CreateFromUri()
3013
3014```
3015Image_ErrorCode OH_ImageSourceNative_CreateFromUri(char *uri, size_t uriSize, OH_ImageSourceNative **res)
3016```
3017
3018**Description**
3019
3020Creates the pointer to an **OH_ImageSourceNative** object based on a URI.
3021
3022**Since**: 12
3023
3024**Parameters**
3025
3026| Name| Description|
3027| -------- | -------- |
3028| uri | Pointer to the URI of the image source. Only file URIs or Base64 URIs are accepted. Currently, only absolute paths are supported. |
3029| uriSize | URI length. |
3030| res | Double pointer to the **OH_ImageSourceNative** object created at the C++ local layer. |
3031
3032**Returns**
3033
3034Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_BAD_SOURCE** if the data source is abnormal. For details, see [Image_ErrorCode](#image_errorcode).
3035
3036
3037### OH_ImageSourceNative_CreatePicture()
3038
3039```
3040Image_ErrorCode OH_ImageSourceNative_CreatePicture(OH_ImageSourceNative *source, OH_DecodingOptionsForPicture *options, OH_PictureNative **picture)
3041```
3042
3043**Description**
3044
3045Creates the pointer to an **OH_PictureNative** object based on decoding options.
3046
3047**Since**: 13
3048
3049**Parameters**
3050
3051| Name| Description|
3052| -------- | -------- |
3053| source | Pointer to an **OH_ImageSourceNative** object. |
3054| options | Pointer to the decoding options. |
3055| picture | Double pointer to the **OH_PictureNative** object created at the C++ local layer. |
3056
3057**Returns**
3058
3059Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DECODE_FAILED** if decoding fails. For details, see [Image_ErrorCode](#image_errorcode).
3060
3061
3062### OH_ImageSourceNative_CreatePixelmap()
3063
3064```
3065Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source, OH_DecodingOptions *options, OH_PixelmapNative **pixelmap)
3066```
3067
3068**Description**
3069
3070Creates the pointer to an **OH_PixelmapNative** object based on decoding options.
3071
3072**Since**: 12
3073
3074**Parameters**
3075
3076| Name| Description|
3077| -------- | -------- |
3078| source | Pointer to an **OH_ImageSourceNative** object. |
3079| options | Pointer to the decoding options. |
3080| resPixMap | Double pointer to the **OH_PixelmapNative** object created at the C++ local layer. |
3081
3082**Returns**
3083
3084Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3085
3086
3087### OH_ImageSourceNative_CreatePixelmapList()
3088
3089```
3090Image_ErrorCode OH_ImageSourceNative_CreatePixelmapList(OH_ImageSourceNative *source, OH_DecodingOptions *options, OH_PixelmapNative *resVecPixMap[], size_t size)
3091```
3092
3093**Description**
3094
3095Creates an array of **OH_PixelmapNative** objects based on decoding options.
3096
3097> **NOTE**
3098>
3099> This function decodes all frames at once. If the number of frames is high or the size of individual frames is large, it can lead to significant memory usage. In these cases, you are advised to use the** Image** component for displaying animations. The **Image** component decodes frames one by one, which uses less memory than this function.
3100
3101**Since**: 12
3102
3103**Parameters**
3104
3105| Name| Description|
3106| -------- | -------- |
3107| source | Pointer to an **OH_ImageSourceNative** object. |
3108| options | Pointer to the decoding options. |
3109| resVecPixMap | Pointer to an array of **OH_PixelmapNative** objects created at the C++ local layer. |
3110| size | Size of the array. You can use [OH_ImageSourceNative_GetFrameCount](#oh_imagesourcenative_getframecount) to obtain the size. |
3111
3112**Returns**
3113
3114Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_OPERATION** if the operation is not supported. For details, see [Image_ErrorCode](#image_errorcode).
3115
3116
3117### OH_ImageSourceNative_CreatePixelmapUsingAllocator()
3118
3119```
3120Image_ErrorCode OH_ImageSourceNative_CreatePixelmapUsingAllocator (OH_ImageSourceNative *source, OH_DecodingOptions *options, IMAGE_ALLOCATOR_TYPE allocator, OH_PixelmapNative **pixelmap )
3121```
3122
3123**Description**
3124
3125Creates an **OH_PixelmapNative** object based on decoding options and memory type, where **allocatorType** specifies the memory type of the PixelMap.
3126
3127By default, the system selects an appropriate memory type based on the image type, image size, and platform capability. When processing the returned PixelMap object, consider the impact of stride.
3128
3129**Since**: 15
3130
3131**Parameters**
3132
3133| Name| Description|
3134| -------- | -------- |
3135| source | Pointer to an **OH_ImageSourceNative** object.|
3136| options | Pointer to the decoding options. For details, see **OH_DecodingOptions**.|
3137| allocator | Memory type used by the returned PixelMap.|
3138| pixelmap | Double pointer to the **OH_PixelmapNative** object created at the C++ local layer.|
3139
3140**Returns**
3141
3142Enumerates the error codes.
3143
3144Returns **IMAGE_SUCCESS** if the operation is successful.
3145
3146Returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect.
3147
3148Returns **IMAGE_BAD_SOURCE** if the data source is abnormal.
3149
3150Returns **IMAGE_SOURCE_UNSUPPORTED_MIMETYPE** if the MIME type is not supported.
3151
3152Returns **IMAGE_SOURCE_TOO_LARGE** if the image is too large.
3153
3154Returns **IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE** if the allocator type is not supported. For example, decoding HDR images using shared memory is not supported because only DMA supports HDR metadata.
3155
3156Returns **IMAGE_SOURCE_UNSUPPORTED_OPTIONS** if decoding options are not supported. For example, an image cannot be converted into the required pixel format.
3157
3158Returns **IMAGE_DECODE_FAILED** if decoding fails.
3159
3160Returns **IMAGE_SOURCE_ALLOC_FAILED** if memory allocation fails.
3161
3162For details, see [Image_ErrorCode](#image_errorcode).
3163
3164
3165### OH_ImageSourceNative_GetDelayTimeList()
3166
3167```
3168Image_ErrorCode OH_ImageSourceNative_GetDelayTimeList(OH_ImageSourceNative *source, int32_t *delayTimeList, size_t size)
3169```
3170
3171**Description**
3172
3173Obtains the image delay time list.
3174
3175**Since**: 12
3176
3177**Parameters**
3178
3179| Name| Description|
3180| -------- | -------- |
3181| source | Pointer to an **OH_ImageSourceNative** object. |
3182| delayTimeList | Pointer to the delay time list obtained. It cannot be a null pointer. |
3183| size | Size of the delay time list. You can use [OH_ImageSourceNative_GetFrameCount](#oh_imagesourcenative_getframecount) to obtain the size. |
3184
3185**Returns**
3186
3187Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3188
3189
3190### OH_ImageSourceNative_GetFrameCount()
3191
3192```
3193Image_ErrorCode OH_ImageSourceNative_GetFrameCount(OH_ImageSourceNative *source, uint32_t *frameCount)
3194```
3195
3196**Description**
3197
3198Obtains the number of image frames.
3199
3200**Since**: 12
3201
3202**Parameters**
3203
3204| Name| Description|
3205| -------- | -------- |
3206| source | Pointer to an **OH_ImageSourceNative** object. |
3207| frameCount | Pointer to the number of frames obtained. |
3208
3209**Returns**
3210
3211Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3212
3213
3214### OH_ImageSourceNative_GetImageInfo()
3215
3216```
3217Image_ErrorCode OH_ImageSourceNative_GetImageInfo(OH_ImageSourceNative *source, int32_t index, OH_ImageSource_Info *info)
3218```
3219
3220**Description**
3221
3222Obtains the information about an image with a given index.
3223
3224**Since**: 12
3225
3226**Parameters**
3227
3228| Name| Description|
3229| -------- | -------- |
3230| source | Pointer to an **OH_ImageSourceNative** object. |
3231| index | Index of an image. For a GIF image, the value range is [0, N-1], where N indicates the number of GIF frames. For an image with only one frame, you can pass in **0**. |
3232| info | Pointer to the image information obtained, which is an **OH_ImageSource_Info** struct. |
3233
3234**Returns**
3235
3236Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3237
3238
3239### OH_ImageSourceNative_GetImageProperty()
3240
3241```
3242Image_ErrorCode OH_ImageSourceNative_GetImageProperty(OH_ImageSourceNative *source, Image_String *key, Image_String *value)
3243```
3244
3245**Description**
3246
3247Obtains the value of an image property.
3248
3249**Since**: 12
3250
3251**Parameters**
3252
3253| Name| Description|
3254| -------- | -------- |
3255| source | Pointer to an **OH_ImageSourceNative** object. |
3256| key | Pointer to the property key. For details, see [Image_String](_image___string.md). For details about the value range of **key**, see the definition of **OHOS_IMAGE_PROPERTY_XXX**. The memory must be released after the image source is used. For details, see [OH_ImageSourceNative_Release](#oh_imagesourcenative_release). |
3257| value | Pointer to the value obtained. You can pass in a null pointer with the size set to zero. In this case, the system will allocate memory, but you must release the memory after use. |
3258
3259**Returns**
3260
3261Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3262
3263
3264### OH_ImageSourceNative_ModifyImageProperty()
3265
3266```
3267Image_ErrorCode OH_ImageSourceNative_ModifyImageProperty(OH_ImageSourceNative *source, Image_String *key, Image_String *value)
3268```
3269
3270**Description**
3271
3272Modifies the value of an image property.
3273
3274**Since**: 12
3275
3276**Parameters**
3277
3278| Name| Description|
3279| -------- | -------- |
3280| source | Pointer to an **OH_ImageSourceNative** object. |
3281| key | Pointer to the property key. For details, see [Image_String](_image___string.md). **key** is an EXIF constant. The memory must be released after the image source is used. For details, see [OH_ImageSourceNative_Release](#oh_imagesourcenative_release). |
3282| value | Pointer to the new value. |
3283
3284**Returns**
3285
3286Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3287
3288
3289### OH_ImageSourceNative_Release()
3290
3291```
3292Image_ErrorCode OH_ImageSourceNative_Release(OH_ImageSourceNative *source)
3293```
3294
3295**Description**
3296
3297Releases the pointer to an **OH_ImageSourceNative** object.
3298
3299**Since**: 12
3300
3301**Parameters**
3302
3303| Name| Description|
3304| -------- | -------- |
3305| source | Pointer to an **OH_ImageSourceNative** object. |
3306
3307**Returns**
3308
3309Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3310
3311
3312### OH_PackingOptions_Create()
3313
3314```
3315Image_ErrorCode OH_PackingOptions_Create(OH_PackingOptions **options)
3316```
3317
3318**Description**
3319
3320Creates the pointer to an **OH_PackingOptions** struct.
3321
3322**Since**: 12
3323
3324**Parameters**
3325
3326| Name| Description|
3327| -------- | -------- |
3328| options | Double pointer to the **OH_PackingOptions** struct created. |
3329
3330**Returns**
3331
3332Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3333
3334
3335### OH_PackingOptions_GetDesiredDynamicRange()
3336
3337```
3338Image_ErrorCode OH_PackingOptions_GetDesiredDynamicRange(OH_PackingOptions *options, int32_t* desiredDynamicRange)
3339```
3340
3341**Description**
3342
3343Obtains the desired dynamic range during encoding.
3344
3345**Since**: 12
3346
3347**Parameters**
3348
3349| Name| Description|
3350| -------- | -------- |
3351| options | Pointer to an **OH_PackingOptions** struct. |
3352| desiredDynamicRange | Pointer to the desired dynamic range. For details about the available options, see [IMAGE_PACKER_DYNAMIC_RANGE](#image_packer_dynamic_range). |
3353
3354**Returns**
3355
3356Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3357
3358
3359### OH_PackingOptions_GetMimeType()
3360
3361```
3362Image_ErrorCode OH_PackingOptions_GetMimeType (OH_PackingOptions * options, Image_MimeType * format )
3363```
3364
3365**Description**
3366
3367Obtains the MIME type.
3368
3369**Since**: 12
3370
3371**Parameters**
3372
3373| Name| Description|
3374| -------- | -------- |
3375| options | Pointer to an **OH_PackingOptions** struct. |
3376| format | Pointer to the image format. You can pass in a null pointer with the size set to zero. In this case, the system will allocate memory, but you must release the memory after use. |
3377
3378**Returns**
3379
3380Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3381
3382
3383### OH_PackingOptions_GetQuality()
3384
3385```
3386Image_ErrorCode OH_PackingOptions_GetQuality(OH_PackingOptions *options, uint32_t *quality)
3387```
3388
3389**Description**
3390
3391Obtains the encoding quality.
3392
3393**Since**: 12
3394
3395**Parameters**
3396
3397| Name| Description|
3398| -------- | -------- |
3399| options | Pointer to an **OH_PackingOptions** struct. |
3400| quality | Pointer to the encoding quality. |
3401
3402**Returns**
3403
3404Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3405
3406
3407### OH_PackingOptions_Release()
3408
3409```
3410Image_ErrorCode OH_PackingOptions_Release(OH_PackingOptions *options)
3411```
3412
3413**Description**
3414
3415Releases the pointer to an **OH_PackingOptions** struct.
3416
3417**Since**: 12
3418
3419**Parameters**
3420
3421| Name| Description|
3422| -------- | -------- |
3423| options | Pointer to an **OH_PackingOptions** struct. |
3424
3425**Returns**
3426
3427Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3428
3429
3430### OH_PackingOptions_SetDesiredDynamicRange()
3431
3432```
3433Image_ErrorCode OH_PackingOptions_SetDesiredDynamicRange(OH_PackingOptions *options, int32_t desiredDynamicRange)
3434```
3435
3436**Description**
3437
3438Sets the desired dynamic range during encoding.
3439
3440**Since**: 12
3441
3442**Parameters**
3443
3444| Name| Description|
3445| -------- | -------- |
3446| options | Pointer to an **OH_PackingOptions** struct. |
3447| desiredDynamicRange | Desired dynamic range. For details about the available options, see [IMAGE_PACKER_DYNAMIC_RANGE](#image_packer_dynamic_range). |
3448
3449**Returns**
3450
3451Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3452
3453
3454### OH_PackingOptions_SetMimeType()
3455
3456```
3457Image_ErrorCode OH_PackingOptions_SetMimeType(OH_PackingOptions *options, Image_MimeType *format)
3458```
3459
3460**Description**
3461
3462Sets the MIME type.
3463
3464**Since**: 12
3465
3466**Parameters**
3467
3468| Name| Description|
3469| -------- | -------- |
3470| options | Pointer to an **OH_PackingOptions** struct. |
3471| format | Pointer to the image format. |
3472
3473**Returns**
3474
3475Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3476
3477
3478### OH_PackingOptions_SetQuality()
3479
3480```
3481Image_ErrorCode OH_PackingOptions_SetQuality(OH_PackingOptions *options, uint32_t quality)
3482```
3483
3484**Description**
3485
3486Sets the encoding quality.
3487
3488**Since**: 12
3489
3490**Parameters**
3491
3492| Name| Description|
3493| -------- | -------- |
3494| options | Pointer to an **OH_PackingOptions** struct. |
3495| quality | Encoding quality. |
3496
3497**Returns**
3498
3499Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3500
3501
3502### OH_PackingOptionsForSequence_Create()
3503
3504```
3505Image_ErrorCode OH_PackingOptionsForSequence_Create(OH_PackingOptionsForSequence **options)
3506```
3507
3508**Description**
3509
3510Creates the pointer to an **OH_PackingOptionsForSequence** struct.
3511
3512**Since**: 13
3513
3514**Parameters**
3515
3516| Name| Description|
3517| -------- | -------- |
3518| options | Double pointer to the **OH_PackingOptionsForSequence** struct created. |
3519
3520**Returns**
3521
3522Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3523
3524
3525### OH_PackingOptionsForSequence_GetDelayTimeList()
3526
3527```
3528Image_ErrorCode OH_PackingOptionsForSequence_GetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength)
3529```
3530
3531**Description**
3532
3533Obtains the delay time array for image sequence encoding.
3534
3535**Since**: 13
3536
3537**Parameters**
3538
3539| Name| Description|
3540| -------- | -------- |
3541| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3542| delayTimeList | Pointer to the delay time array. |
3543| delayTimeListLength | Length of the delay time array. |
3544
3545**Returns**
3546
3547Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3548
3549
3550### OH_PackingOptionsForSequence_GetDisposalTypes()
3551
3552```
3553Image_ErrorCode OH_PackingOptionsForSequence_GetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength)
3554```
3555
3556**Description**
3557
3558Obtains the disposal type array for image sequence encoding.
3559
3560**Since**: 13
3561
3562**Parameters**
3563
3564| Name| Description|
3565| -------- | -------- |
3566| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3567| disposalTypes | Pointer to the disposal type array. |
3568| disposalTypesLength | Length of the disposal type array. |
3569
3570**Returns**
3571
3572Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3573
3574
3575### OH_PackingOptionsForSequence_GetFrameCount()
3576
3577```
3578Image_ErrorCode OH_PackingOptionsForSequence_GetFrameCount(OH_PackingOptionsForSequence *options, uint32_t *frameCount)
3579```
3580
3581**Description**
3582
3583Obtains the number of frames for packing.
3584
3585**Since**: 13
3586
3587**Parameters**
3588
3589| Name| Description|
3590| -------- | -------- |
3591| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3592| frameCount | Pointer to the number of frames. |
3593
3594**Returns**
3595
3596Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3597
3598
3599### OH_PackingOptionsForSequence_GetLoopCount()
3600
3601```
3602Image_ErrorCode OH_PackingOptionsForSequence_GetLoopCount(OH_PackingOptionsForSequence *options, uint32_t *loopCount)
3603```
3604
3605**Description**
3606
3607Obtains the number of loops for image sequence encoding.
3608
3609**Since**: 13
3610
3611**Parameters**
3612
3613| Name| Description|
3614| -------- | -------- |
3615| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3616| loopCount | Pointer to the number of loops. |
3617
3618**Returns**
3619
3620Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3621
3622
3623### OH_PackingOptionsForSequence_Release()
3624
3625```
3626Image_ErrorCode OH_PackingOptionsForSequence_Release(OH_PackingOptionsForSequence *options)
3627```
3628
3629**Description**
3630
3631Releases the pointer to an **OH_PackingOptionsForSequence** object.
3632
3633**Since**: 13
3634
3635**Parameters**
3636
3637| Name| Description|
3638| -------- | -------- |
3639| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3640
3641**Returns**
3642
3643Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3644
3645
3646### OH_PackingOptionsForSequence_SetDelayTimeList()
3647
3648```
3649Image_ErrorCode OH_PackingOptionsForSequence_SetDelayTimeList(OH_PackingOptionsForSequence *options, int32_t *delayTimeList, size_t delayTimeListLength)
3650```
3651
3652**Description**
3653
3654Sets the delay time array of images for encoding.
3655
3656**Since**: 13
3657
3658**Parameters**
3659
3660| Name| Description|
3661| -------- | -------- |
3662| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3663| delayTimeList | Pointer to the delay time array. |
3664| delayTimeListLength | Length of the delay time array. |
3665
3666**Returns**
3667
3668Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3669
3670
3671### OH_PackingOptionsForSequence_SetDisposalTypes()
3672
3673```
3674Image_ErrorCode OH_PackingOptionsForSequence_SetDisposalTypes(OH_PackingOptionsForSequence *options, uint32_t *disposalTypes, size_t disposalTypesLength)
3675```
3676
3677**Description**
3678
3679Sets the disposal type array for image sequence encoding.
3680
3681**Since**: 13
3682
3683**Parameters**
3684
3685| Name| Description|
3686| -------- | -------- |
3687| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3688| disposalTypes | Pointer to the disposal type array. |
3689| disposalTypesLength | Length of the disposal type array. |
3690
3691**Returns**
3692
3693Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3694
3695
3696### OH_PackingOptionsForSequence_SetFrameCount()
3697
3698```
3699mage_ErrorCode OH_PackingOptionsForSequence_SetFrameCount(OH_PackingOptionsForSequence *options, uint32_t frameCount)
3700```
3701
3702**Description**
3703
3704Sets the number of frames for image sequence encoding.
3705
3706**Since**: 13
3707
3708**Parameters**
3709
3710| Name| Description|
3711| -------- | -------- |
3712| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3713| frameCount | Number of frames. |
3714
3715**Returns**
3716
3717Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3718
3719
3720### OH_PackingOptionsForSequence_SetLoopCount()
3721
3722```
3723Image_ErrorCode OH_PackingOptionsForSequence_SetLoopCount(OH_PackingOptionsForSequence *options, uint32_t loopCount)
3724```
3725
3726**Description**
3727
3728Sets the number of loops for image sequence encoding.
3729
3730**Since**: 13
3731
3732**Parameters**
3733
3734| Name| Description|
3735| -------- | -------- |
3736| options | Pointer to an **OH_PackingOptionsForSequence** struct. |
3737| loopCount | Number of loops. |
3738
3739**Returns**
3740
3741Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3742
3743
3744### OH_PictureMetadata_Clone()
3745
3746```
3747Image_ErrorCode OH_PictureMetadata_Clone(OH_PictureMetadata *oldMetadata, OH_PictureMetadata **newMetadata)
3748```
3749
3750**Description**
3751
3752Clones metadata.
3753
3754**Since**: 13
3755
3756**Parameters**
3757
3758| Name| Description|
3759| -------- | -------- |
3760| oldMetadata | Pointer to an **OH_PictureMetadata** struct. |
3761| newMetadata | Double pointer to the **OH_PictureMetadata** struct obtained. |
3762
3763**Returns**
3764
3765Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_ALLOC_FAILED** if the memory allocation fails; returns **IMAGE_COPY_FAILED** if the memory copy fails. For details, see [Image_ErrorCode](#image_errorcode).
3766
3767
3768### OH_PictureMetadata_Create()
3769
3770```
3771Image_ErrorCode OH_PictureMetadata_Create(Image_MetadataType metadataType, OH_PictureMetadata **metadata)
3772```
3773
3774**Description**
3775
3776Creates the pointer to an **OH_PictureMetadata** struct.
3777
3778**Since**: 13
3779
3780**Parameters**
3781
3782| Name| Description|
3783| -------- | -------- |
3784| metadataType | Metadata type. |
3785| metadata | Double pointer to the **OH_PictureMetadata** struct created. |
3786
3787**Returns**
3788
3789Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3790
3791
3792### OH_PictureMetadata_GetProperty()
3793
3794```
3795Image_ErrorCode OH_PictureMetadata_GetProperty(OH_PictureMetadata *metadata, Image_String *key, Image_String *value)
3796```
3797
3798**Description**
3799
3800Obtains a property of metadata based on the key.
3801
3802**Since**: 13
3803
3804**Parameters**
3805
3806| Name| Description|
3807| -------- | -------- |
3808| metadata | Pointer to an **OH_PictureMetadata** struct. |
3809| key | Pointer to the key of the property. |
3810| value | Pointer to the value of the property. |
3811
3812**Returns**
3813
3814Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_METADATA** if the metadata type is not supported or the metadata type does not match the auxiliary picture type. For details, see [Image_ErrorCode](#image_errorcode).
3815
3816
3817### OH_PictureMetadata_Release()
3818
3819```
3820Image_ErrorCode OH_PictureMetadata_Release(OH_PictureMetadata *metadata)
3821```
3822
3823**Description**
3824
3825Releases the pointer to an **OH_PictureMetadata** struct.
3826
3827**Since**: 13
3828
3829**Parameters**
3830
3831| Name| Description|
3832| -------- | -------- |
3833| metadata | Pointer to an **OH_PictureMetadata** struct. |
3834
3835**Returns**
3836
3837Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3838
3839
3840### OH_PictureMetadata_SetProperty()
3841
3842```
3843Image_ErrorCode OH_PictureMetadata_SetProperty(OH_PictureMetadata *metadata, Image_String *key, Image_String *value)
3844```
3845
3846**Description**
3847
3848Sets a property of metadata based on the key.
3849
3850**Since**: 13
3851
3852**Parameters**
3853
3854| Name| Description|
3855| -------- | -------- |
3856| metadata | Pointer to an **OH_PictureMetadata** struct. |
3857| key | Pointer to the key of the property. |
3858| value | Pointer to the value of the property. |
3859
3860**Returns**
3861
3862Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_METADATA** if the metadata type is not supported or the metadata type does not match the auxiliary picture type. For details, see [Image_ErrorCode](#image_errorcode).
3863
3864
3865### OH_PictureNative_CreatePicture()
3866
3867```
3868Image_ErrorCode OH_PictureNative_CreatePicture(OH_PixelmapNative *mainPixelmap, OH_PictureNative **picture)
3869```
3870
3871**Description**
3872
3873Creates the pointer to an **OH_PictureNative** object.
3874
3875**Since**: 13
3876
3877**Parameters**
3878
3879| Name| Description|
3880| -------- | -------- |
3881| mainPixelmap | Pointer to the **OH_PixelmapNative** object of the main picture. |
3882| picture | Double pointer to the **OH_PictureNative** object created. |
3883
3884**Returns**
3885
3886Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3887
3888
3889### OH_PictureNative_GetAuxiliaryPicture()
3890
3891```
3892Image_ErrorCode OH_PictureNative_GetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture)
3893```
3894
3895**Description**
3896
3897Obtains an auxiliary picture by type.
3898
3899**Since**: 13
3900
3901**Parameters**
3902
3903| Name| Description|
3904| -------- | -------- |
3905| picture | Pointer to an **OH_PictureNative** object. |
3906| type | Type of the auxiliary picture. |
3907| auxiliaryPicture | Double pointer to the **OH_AuxiliaryPictureNative** object obtained. |
3908
3909**Returns**
3910
3911Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3912
3913
3914### OH_PictureNative_GetGainmapPixelmap()
3915
3916```
3917Image_ErrorCode OH_PictureNative_GetGainmapPixelmap(OH_PictureNative *picture, OH_PixelmapNative **gainmapPixelmap)
3918```
3919
3920**Description**
3921
3922Obtains the pointer to an **OH_PixelmapNative** object of a gain map.
3923
3924**Since**: 13
3925
3926**Parameters**
3927
3928| Name| Description|
3929| -------- | -------- |
3930| picture | Pointer to an **OH_PictureNative** object. |
3931| gainmapPixelmap | Double pointer to the **OH_PixelmapNative** object of the gain map. |
3932
3933**Returns**
3934
3935Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3936
3937
3938### OH_PictureNative_GetHdrComposedPixelmap()
3939
3940```
3941Image_ErrorCode OH_PictureNative_GetHdrComposedPixelmap(OH_PictureNative *picture, OH_PixelmapNative **hdrPixelmap)
3942```
3943
3944**Description**
3945
3946Obtains the pointer to **OH_PixelmapNative** of an HDR picture.
3947
3948**Since**: 13
3949
3950**Parameters**
3951
3952| Name| Description|
3953| -------- | -------- |
3954| picture | Pointer to an **OH_PictureNative** object. |
3955| hdrPixelmap | Double pointer to the **OH_PixelmapNative** object of the HDR picture. |
3956
3957**Returns**
3958
3959Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_OPERATION** if the operation is not supported, for example, the picture object does not contain a gain map. For details, see [Image_ErrorCode](#image_errorcode).
3960
3961
3962### OH_PictureNative_GetMainPixelmap()
3963
3964```
3965Image_ErrorCode OH_PictureNative_GetMainPixelmap(OH_PictureNative *picture, OH_PixelmapNative **mainPixelmap)
3966```
3967
3968**Description**
3969
3970Obtains the pointer to an **OH_PixelmapNative** object of a main picture.
3971
3972**Since**: 13
3973
3974**Parameters**
3975
3976| Name| Description|
3977| -------- | -------- |
3978| picture | Pointer to an **OH_PictureNative** object. |
3979| mainPixelmap | Double pointer to the **OH_PixelmapNative** object obtained. |
3980
3981**Returns**
3982
3983Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
3984
3985
3986### OH_PictureNative_GetMetadata()
3987
3988```
3989Image_ErrorCode OH_PictureNative_GetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType, OH_PictureMetadata **metadata)
3990```
3991
3992**Description**
3993
3994Obtains the metadata of a main picture.
3995
3996**Since**: 13
3997
3998**Parameters**
3999
4000| Name| Description|
4001| -------- | -------- |
4002| picture | Pointer to an **OH_PictureNative** object. |
4003| metadataType | Metadata type. |
4004| metadata | Double pointer to the metadata of the picture. |
4005
4006**Returns**
4007
4008Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_METADATA** if the metadata type is not supported. For details, see [Image_ErrorCode](#image_errorcode).
4009
4010
4011### OH_PictureNative_Release()
4012
4013```
4014Image_ErrorCode OH_PictureNative_Release(OH_PictureNative *picture)
4015```
4016
4017**Description**
4018
4019Releases the pointer to an **OH_PictureNative** object.
4020
4021**Since**: 13
4022
4023**Parameters**
4024
4025| Name| Description|
4026| -------- | -------- |
4027| picture | Pointer to an **OH_PictureNative** object. |
4028
4029**Returns**
4030
4031Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4032
4033
4034### OH_PictureNative_SetAuxiliaryPicture()
4035
4036```
4037Image_ErrorCode OH_PictureNative_SetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative *auxiliaryPicture)
4038```
4039
4040**Description**
4041
4042Sets an auxiliary picture.
4043
4044**Since**: 13
4045
4046**Parameters**
4047
4048| Name| Description|
4049| -------- | -------- |
4050| picture | Pointer to an **OH_PictureNative** object. |
4051| type | Type of the auxiliary picture. |
4052| auxiliaryPicture | Pointer to an **OH_AuxiliaryPictureNative** object. |
4053
4054**Returns**
4055
4056Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4057
4058
4059### OH_PictureNative_SetMetadata()
4060
4061```
4062Image_ErrorCode OH_PictureNative_SetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType, OH_PictureMetadata *metadata)
4063```
4064
4065**Description**
4066
4067Sets the metadata for a main picture.
4068
4069**Since**: 13
4070
4071**Parameters**
4072
4073| Name| Description|
4074| -------- | -------- |
4075| picture | Pointer to an **OH_PictureNative** object. |
4076| metadataType | Metadata type. |
4077| metadata | Pointer to the metadata. |
4078
4079**Returns**
4080
4081Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_METADATA** if the metadata type is not supported. For details, see [Image_ErrorCode](#image_errorcode).
4082
4083
4084### OH_PixelmapImageInfo_Create()
4085
4086```
4087Image_ErrorCode OH_PixelmapImageInfo_Create(OH_Pixelmap_ImageInfo **info)
4088```
4089
4090**Description**
4091
4092Creates the pointer to an **OH_Pixelmap_ImageInfo** struct.
4093
4094**Since**: 12
4095
4096**Parameters**
4097
4098| Name| Description|
4099| -------- | -------- |
4100| info | Double pointer to the **OH_Pixelmap_ImageInfo** struct created. |
4101
4102**Returns**
4103
4104Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4105
4106
4107### OH_PixelmapImageInfo_GetAlphaType()
4108
4109```
4110Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType(OH_Pixelmap_ImageInfo *info, int32_t *alphaType)
4111```
4112
4113**Description**
4114
4115Obtains the alpha type.
4116
4117**Since**: 12
4118
4119**Parameters**
4120
4121| Name| Description|
4122| -------- | -------- |
4123| info | Pointer to an **OH_Pixelmap_ImageInfo** struct. |
4124| alphaType | Pointer to the alpha type. For details about the available options, see [PIXELMAP_ALPHA_TYPE](#pixelmap_alpha_type). |
4125
4126**Returns**
4127
4128Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4129
4130
4131### OH_PixelmapImageInfo_GetDynamicRange()
4132
4133```
4134Image_ErrorCode OH_PixelmapImageInfo_GetDynamicRange(OH_Pixelmap_ImageInfo *info, bool *isHdr)
4135```
4136
4137**Description**
4138
4139Obtains the dynamic range of a PixelMap.
4140
4141**Since**: 12
4142
4143**Parameters**
4144
4145| Name| Description|
4146| -------- | -------- |
4147| info | Pointer to an **OH_Pixelmap_ImageInfo** struct. |
4148| isHdr | Pointer to a Boolean that specifies whether the HDR is used. |
4149
4150**Returns**
4151
4152Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4153
4154
4155### OH_PixelmapImageInfo_GetHeight()
4156
4157```
4158Image_ErrorCode OH_PixelmapImageInfo_GetHeight(OH_Pixelmap_ImageInfo *info, uint32_t *height)
4159```
4160
4161**Description**
4162
4163Obtains the image height.
4164
4165**Since**: 12
4166
4167**Parameters**
4168
4169| Name| Description|
4170| -------- | -------- |
4171| info | Pointer to an **OH_Pixelmap_ImageInfo** struct. |
4172| height | Pointer to the image height, in px. |
4173
4174**Returns**
4175
4176Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4177
4178
4179### OH_PixelmapImageInfo_GetPixelFormat()
4180
4181```
4182Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, int32_t *pixelFormat)
4183```
4184
4185**Description**
4186
4187Obtains the pixel format.
4188
4189**Since**: 12
4190
4191**Parameters**
4192
4193| Name| Description|
4194| -------- | -------- |
4195| info | Pointer to an **OH_Pixelmap_ImageInfo** struct. |
4196| pixelFormat | Pointer to the pixel format. |
4197
4198**Returns**
4199
4200Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4201
4202
4203### OH_PixelmapImageInfo_GetRowStride()
4204
4205```
4206Image_ErrorCode OH_PixelmapImageInfo_GetRowStride(OH_Pixelmap_ImageInfo *info, uint32_t *rowStride)
4207```
4208
4209**Description**
4210
4211Obtains the row stride.
4212
4213**Since**: 12
4214
4215**Parameters**
4216
4217| Name| Description|
4218| -------- | -------- |
4219| info | Pointer to an **OH_Pixelmap_ImageInfo** struct. |
4220| rowStride | Pointer to the row stride, which is the number of bytes from one row of pixels in memory to the next row of pixels in memory. |
4221
4222**Returns**
4223
4224Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4225
4226
4227### OH_PixelmapImageInfo_GetWidth()
4228
4229```
4230Image_ErrorCode OH_PixelmapImageInfo_GetWidth(OH_Pixelmap_ImageInfo *info, uint32_t *width)
4231```
4232
4233**Description**
4234
4235Obtains the image width.
4236
4237**Since**: 12
4238
4239**Parameters**
4240
4241| Name| Description|
4242| -------- | -------- |
4243| info | Pointer to an **OH_Pixelmap_ImageInfo** struct. |
4244| width | Pointer to the image width, in px. |
4245
4246**Returns**
4247
4248Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4249
4250
4251### OH_PixelmapImageInfo_Release()
4252
4253```
4254Image_ErrorCode OH_PixelmapImageInfo_Release(OH_Pixelmap_ImageInfo *info)
4255```
4256
4257**Description**
4258
4259Releases the pointer to an **OH_Pixelmap_ImageInfo** struct.
4260
4261**Since**: 12
4262
4263**Parameters**
4264
4265| Name| Description|
4266| -------- | -------- |
4267| info | Pointer to an **OH_Pixelmap_ImageInfo** struct. |
4268
4269**Returns**
4270
4271Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4272
4273
4274### OH_PixelmapInitializationOptions_Create()
4275
4276```
4277Image_ErrorCode OH_PixelmapInitializationOptions_Create(OH_Pixelmap_InitializationOptions **options)
4278```
4279
4280**Description**
4281
4282Creates the pointer to an **OH_Pixelmap_InitializationOptions** struct.
4283
4284**Since**: 12
4285
4286**Parameters**
4287
4288| Name| Description|
4289| -------- | -------- |
4290| options | Double pointer to the **OH_Pixelmap_InitializationOptions** struct created. |
4291
4292**Returns**
4293
4294Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4295
4296
4297### OH_PixelmapInitializationOptions_GetAlphaType()
4298
4299```
4300Image_ErrorCode OH_PixelmapInitializationOptions_GetAlphaType(OH_Pixelmap_InitializationOptions *options, int32_t *alphaType)
4301```
4302
4303**Description**
4304
4305Obtains the alpha type.
4306
4307**Since**: 12
4308
4309**Parameters**
4310
4311| Name| Description|
4312| -------- | -------- |
4313| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4314| alphaType | Pointer to the alpha type. For details about the available options, see [PIXELMAP_ALPHA_TYPE](#pixelmap_alpha_type). |
4315
4316**Returns**
4317
4318Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4319
4320
4321### OH_PixelmapInitializationOptions_GetEditable()
4322
4323```
4324Image_ErrorCode OH_PixelmapInitializationOptions_GetEditable(OH_Pixelmap_InitializationOptions *options, bool *editable)
4325```
4326
4327**Description**
4328
4329Obtains the editable flag.
4330
4331**Since**: 18
4332
4333**Parameters**
4334
4335| Name| Description|
4336| -------- | -------- |
4337| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct.|
4338| editable | Pointer to the editable flag.|
4339
4340**Returns**
4341
4342Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4343
4344
4345### OH_PixelmapInitializationOptions_GetHeight()
4346
4347```
4348Image_ErrorCode OH_PixelmapInitializationOptions_GetHeight(OH_Pixelmap_InitializationOptions *options, uint32_t *height)
4349```
4350
4351**Description**
4352
4353Obtains the image height.
4354
4355**Since**: 12
4356
4357**Parameters**
4358
4359| Name| Description|
4360| -------- | -------- |
4361| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4362| height | Pointer to the image height, in px. |
4363
4364**Returns**
4365
4366Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4367
4368
4369### OH_PixelmapInitializationOptions_GetPixelFormat()
4370
4371```
4372Image_ErrorCode OH_PixelmapInitializationOptions_GetPixelFormat(OH_Pixelmap_InitializationOptions *options, int32_t *pixelFormat)
4373```
4374
4375**Description**
4376
4377Obtains the pixel format.
4378
4379**Since**: 12
4380
4381**Parameters**
4382
4383| Name| Description|
4384| -------- | -------- |
4385| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4386| pixelFormat | Pointer to the pixel format. For details about the available options, see [PIXEL_FORMAT](#pixel_format).|
4387
4388**Returns**
4389
4390Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4391
4392
4393### OH_PixelmapInitializationOptions_GetRowStride()
4394
4395```
4396Image_ErrorCode OH_PixelmapInitializationOptions_GetRowStride(OH_Pixelmap_InitializationOptions *options, int32_t *rowStride)
4397```
4398
4399**Description**
4400
4401Obtains the row stride.
4402
4403The 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.
4404
4405**Since**: 12
4406
4407**Parameters**
4408
4409| Name| Description|
4410| -------- | -------- |
4411| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4412| rowStride | Pointer to the stride, in bytes. |
4413
4414**Returns**
4415
4416Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNKNOWN_ERROR** if the object pointed to by **options** is released. For details, see [Image_ErrorCode](#image_errorcode).
4417
4418
4419### OH_PixelmapInitializationOptions_GetSrcPixelFormat()
4420
4421```
4422Image_ErrorCode OH_PixelmapInitializationOptions_GetSrcPixelFormat(OH_Pixelmap_InitializationOptions *options, int32_t *srcpixelFormat)
4423```
4424
4425**Description**
4426
4427Obtains the source pixel format.
4428
4429**Since**: 12
4430
4431**Parameters**
4432
4433| Name| Description|
4434| -------- | -------- |
4435| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4436| srcpixelFormat | Pointer to the source pixel format. For details about the available options, see [PIXEL_FORMAT](#pixel_format). |
4437
4438**Returns**
4439
4440Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4441
4442
4443### OH_PixelmapInitializationOptions_GetWidth()
4444
4445```
4446Image_ErrorCode OH_PixelmapInitializationOptions_GetWidth(OH_Pixelmap_InitializationOptions *options, uint32_t *width)
4447```
4448
4449**Description**
4450
4451Obtains the image width.
4452
4453**Since**: 12
4454
4455**Parameters**
4456
4457| Name| Description|
4458| -------- | -------- |
4459| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4460| width | Pointer to the image width, in px. |
4461
4462**Returns**
4463
4464Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4465
4466
4467### OH_PixelmapInitializationOptions_Release()
4468
4469```
4470Image_ErrorCode OH_PixelmapInitializationOptions_Release(OH_Pixelmap_InitializationOptions *options)
4471```
4472
4473**Description**
4474
4475Releases the pointer to an **OH_Pixelmap_InitializationOptions** struct.
4476
4477**Since**: 12
4478
4479**Parameters**
4480
4481| Name| Description|
4482| -------- | -------- |
4483| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4484
4485**Returns**
4486
4487Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4488
4489
4490### OH_PixelmapInitializationOptions_SetAlphaType()
4491
4492```
4493Image_ErrorCode OH_PixelmapInitializationOptions_SetAlphaType(OH_Pixelmap_InitializationOptions *options, int32_t alphaType)
4494```
4495
4496**Description**
4497
4498Sets the alpha type.
4499
4500**Since**: 12
4501
4502**Parameters**
4503
4504| Name| Description|
4505| -------- | -------- |
4506| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4507| alphaType | Alpha type. For details about the available options, see [PIXELMAP_ALPHA_TYPE](#pixelmap_alpha_type). |
4508
4509**Returns**
4510
4511Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4512
4513
4514### OH_PixelmapInitializationOptions_SetEditable()
4515
4516```
4517Image_ErrorCode OH_PixelmapInitializationOptions_SetEditable(OH_Pixelmap_InitializationOptions *options, bool editable)
4518```
4519
4520**Description**
4521
4522Sets the editable flag.
4523
4524**Since**: 18
4525
4526**Parameters**
4527
4528| Name| Description|
4529| -------- | -------- |
4530| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct.|
4531| editable | Editable flag.|
4532
4533**Returns**
4534
4535Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4536
4537
4538### OH_PixelmapInitializationOptions_SetHeight()
4539
4540```
4541Image_ErrorCode OH_PixelmapInitializationOptions_SetHeight(OH_Pixelmap_InitializationOptions *options, uint32_t height)
4542```
4543
4544**Description**
4545
4546Sets the image height.
4547
4548**Since**: 12
4549
4550**Parameters**
4551
4552| Name| Description|
4553| -------- | -------- |
4554| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4555| height | Image height, in px. |
4556
4557**Returns**
4558
4559Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4560
4561
4562### OH_PixelmapInitializationOptions_SetPixelFormat()
4563
4564```
4565Image_ErrorCode OH_PixelmapInitializationOptions_SetPixelFormat(OH_Pixelmap_InitializationOptions *options, int32_t pixelFormat)
4566```
4567
4568**Description**
4569
4570Sets the pixel format.
4571
4572**Since**: 12
4573
4574**Parameters**
4575
4576| Name| Description|
4577| -------- | -------- |
4578| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4579| pixelFormat | Pixel format. For details about the available options, see [PIXEL_FORMAT](#pixel_format).|
4580
4581**Returns**
4582
4583Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4584
4585
4586### OH_PixelmapInitializationOptions_SetRowStride()
4587
4588```
4589Image_ErrorCode OH_PixelmapInitializationOptions_SetRowStride(OH_Pixelmap_InitializationOptions *options, int32_t rowStride)
4590```
4591
4592**Description**
4593
4594Sets the row stride.
4595
4596The 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.
4597
4598**Since**: 12
4599
4600**Parameters**
4601
4602| Name| Description|
4603| -------- | -------- |
4604| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4605| rowStride | Pointer to the stride, in bytes. |
4606
4607**Returns**
4608
4609Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNKNOWN_ERROR** if the object pointed to by **options** is released. For details, see [Image_ErrorCode](#image_errorcode).
4610
4611
4612### OH_PixelmapInitializationOptions_SetSrcPixelFormat()
4613
4614```
4615Image_ErrorCode OH_PixelmapInitializationOptions_SetSrcPixelFormat(OH_Pixelmap_InitializationOptions *options, int32_t srcpixelFormat)
4616```
4617
4618**Description**
4619
4620Sets the source pixel format.
4621
4622**Since**: 12
4623
4624**Parameters**
4625
4626| Name| Description|
4627| -------- | -------- |
4628| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4629| srcpixelFormat | Source pixel format. For details about the available options, see [PIXEL_FORMAT](#pixel_format). |
4630
4631**Returns**
4632
4633Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4634
4635
4636### OH_PixelmapInitializationOptions_SetWidth()
4637
4638```
4639Image_ErrorCode OH_PixelmapInitializationOptions_SetWidth(OH_Pixelmap_InitializationOptions *options, uint32_t width)
4640```
4641
4642**Description**
4643
4644Sets the image width.
4645
4646**Since**: 12
4647
4648**Parameters**
4649
4650| Name| Description|
4651| -------- | -------- |
4652| options | Pointer to an **OH_Pixelmap_InitializationOptions** struct. |
4653| width | Image width, in px. |
4654
4655**Returns**
4656
4657Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4658
4659
4660### OH_PixelmapNative_AccessPixels()
4661
4662```
4663Image_ErrorCode OH_PixelmapNative_AccessPixels(OH_PixelmapNative *pixelmap, void **addr)
4664```
4665
4666**Description**
4667
4668Obtains the memory address where the pixels of a PixelMap are stored and locks the memory.
4669
4670When the memory is locked, any attempts to alter or free the pixel data of the PixelMap will fail or be ineffective.
4671
4672**Since**: 15
4673
4674**Parameters**
4675
4676| Name| Description|
4677| -------- | -------- |
4678| pixelmap | Pointer to a PixelMap.|
4679| addr | Double pointer to the memory address.|
4680
4681**Returns**
4682
4683Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if the **pixelmap** or **addr** parameter is invalid; returns **IMAGE_LOCK_UNLOCK_FAILED** if the memory fails to be locked. For details, see [Image_ErrorCode](#image_errorcode).
4684
4685
4686### OH_PixelmapNative_ConvertAlphaFormat()
4687
4688```
4689Image_ErrorCode OH_PixelmapNative_ConvertAlphaFormat(OH_PixelmapNative* srcpixelmap, OH_PixelmapNative* dstpixelmap, const bool isPremul)
4690```
4691
4692**Description**
4693
4694Converts pixel data of a PixelMap from premultiplied alpha to non-premultiplied alpha, or vice versa.
4695
4696**Since**: 12
4697
4698**Parameters**
4699
4700| Name| Description|
4701| -------- | -------- |
4702| srcpixelmap | Pointer to the source PixelMap, which is an **OH_PixelmapNative** object. |
4703| dstpixelmap | Pointer to the destination PixelMap, which is an **OH_PixelmapNative** object. This pointer must be different from the pointer to the source PixelMap. |
4704| isPremul | Conversion mode. The value **true** means a conversion from premultiplied alpha to non-premultiplied alpha, and **false** means a conversion from non-premultiplied alpha to premultiplied alpha. |
4705
4706**Returns**
4707
4708Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4709
4710
4711### OH_PixelmapNative_ConvertPixelmapNativeFromNapi()
4712
4713```
4714Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeFromNapi(napi_env env, napi_value pixelmapNapi, OH_PixelmapNative **pixelmapNative)
4715```
4716
4717**Description**
4718
4719Converts a **PixelMapnapi** object to a **nativePixelMap** object.
4720
4721**Since**: 12
4722
4723**Parameters**
4724
4725| Name| Description|
4726| -------- | -------- |
4727| env | Pointer to the NAPI environment. |
4728| pixelmapNapi | **PixelMapnapi** object. |
4729| pixelmapNative | Double pointer to the **OH_PixelmapNative** object. |
4730
4731**Returns**
4732
4733Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if **pixelmapNative** is a null pointer or is not a **PixelMapNapi** object. For details, see [Image_ErrorCode](#image_errorcode).
4734
4735
4736### OH_PixelmapNative_ConvertPixelmapNativeToNapi()
4737
4738```
4739Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeToNapi(napi_env env, OH_PixelmapNative *pixelmapNative, napi_value *pixelmapNapi)
4740```
4741
4742**Description**
4743
4744Converts a **nativePixelMap** object to a **PixelMapnapi** object.
4745
4746**Since**: 12
4747
4748**Parameters**
4749
4750| Name| Description|
4751| -------- | -------- |
4752| env | Pointer to the NAPI environment. |
4753| pixelmapNative | Pointer to an **OH_PixelmapNative** object. |
4754| pixelmapNapi | Double pointer to the **PixelMapnapi** object. |
4755
4756**Returns**
4757
4758Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if **pixelmapNative** is null. For details, see [Image_ErrorCode](#image_errorcode).
4759
4760
4761### OH_PixelmapNative_CreateEmptyPixelmap()
4762
4763```
4764Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmap(OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap)
4765```
4766
4767**Description**
4768
4769Creates an empty PixelMap using **OH_Pixelmap_InitializationOptions**. The memory data is 0.
4770
4771**Since**: 12
4772
4773**Parameters**
4774
4775| Name| Description|
4776| -------- | -------- |
4777| options | Pointer to the properties. |
4778| pixelmap | Double pointer to the **OH_PixelmapNative** object created. |
4779
4780**Returns**
4781
4782Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4783
4784
4785### OH_PixelmapNative_CreatePixelmap()
4786
4787```
4788Image_ErrorCode OH_PixelmapNative_CreatePixelmap(uint8_t *data, size_t dataLength, OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap)
4789```
4790
4791**Description**
4792
4793Creates a PixelMap based on properties. By default, the BGRA_8888 format is used for data processing. For details about other formats, see [OH_PixelmapInitializationOptions_SetSrcPixelFormat](#oh_pixelmapinitializationoptions_setsrcpixelformat).
4794
4795**Since**: 12
4796
4797**Parameters**
4798
4799| Name| Description|
4800| -------- | -------- |
4801| data | Pointer to the color array in BGRA_8888 format. |
4802| dataLength | Size of the array. |
4803| options | Pointer to the properties. |
4804| pixelmap | Double pointer to the **OH_PixelmapNative** object created. |
4805
4806**Returns**
4807
4808Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_OPERATION** if the operation is not supported. For details, see [Image_ErrorCode](#image_errorcode).
4809
4810
4811### OH_PixelmapNative_CreateScaledPixelMap()
4812
4813```
4814Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMap(OH_PixelmapNative *srcPixelmap, OH_PixelmapNative **dstPixelmap, float scaleX, float scaleY)
4815```
4816
4817**Description**
4818
4819Creates a PixelMap that has been resized based on the specified scale factors of the width and height.
4820
4821**Since**: 18
4822
4823**Parameters**
4824
4825| Name| Description|
4826| -------- | -------- |
4827| srcpixelmap | Pointer to the source PixelMap, which is an **OH_PixelmapNative** object.|
4828| dstpixelmap | Double pointer to the destination pixel map, which is an **OH_PixelmapNative** object.|
4829| scaleX | Scale ratio of the width.|
4830| scaleY | Scale ratio of the height.|
4831
4832**Returns**
4833
4834Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4835
4836
4837### OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing()
4838
4839```
4840Image_ErrorCode OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing(OH_PixelmapNative *srcPixelmap, OH_PixelmapNative **dstPixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level)
4841```
4842
4843**Description**
4844
4845Creates a PixelMap that has been resized based on the specified anti-aliasing level and the scale factors of the width and height.
4846
4847**Since**: 18
4848
4849**Parameters**
4850
4851| Name| Description|
4852| -------- | -------- |
4853| srcpixelmap | Pointer to the source PixelMap, which is an **OH_PixelmapNative** object.|
4854| dstpixelmap | Double pointer to the destination pixel map, which is an **OH_PixelmapNative** object.|
4855| scaleX | Scale ratio of the width.|
4856| scaleY | Scale ratio of the height.|
4857| level | Anti-aliasing level.|
4858
4859**Returns**
4860
4861Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_TOO_LARGE** if the image is too large; returns **IMAGE_LOCK_UNLOCK_FAILED** if the memory fails to be locked. For details, see [Image_ErrorCode](#image_errorcode).
4862
4863
4864### OH_PixelmapNative_Crop()
4865
4866```
4867Image_ErrorCode OH_PixelmapNative_Crop(OH_PixelmapNative *pixelmap, Image_Region *region)
4868```
4869
4870**Description**
4871
4872Crops a PixelMap based on a given size.
4873
4874**Since**: 12
4875
4876**Parameters**
4877
4878| Name| Description|
4879| -------- | -------- |
4880| pixelmap | Pointer to an **OH_PixelmapNative** object. |
4881| region | Pointer to the region of the image after cropping. |
4882
4883**Returns**
4884
4885Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4886
4887
4888### OH_PixelmapNative_Destroy()
4889
4890```
4891Image_ErrorCode OH_PixelmapNative_Destroy(OH_PixelmapNative **pixelmap)
4892```
4893
4894**Description**
4895
4896Releases the pointer to an **OH_PixelmapNative** object.
4897
4898**Since**: 18
4899
4900**Parameters**
4901
4902| Name| Description|
4903| -------- | -------- |
4904| pixelmap | Pointer to an **OH_PixelmapNative** object.|
4905
4906**Returns**
4907
4908Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4909
4910
4911### OH_PixelmapNative_Flip()
4912
4913```
4914Image_ErrorCode OH_PixelmapNative_Flip(OH_PixelmapNative *pixelmap, bool shouldFilpHorizontally, bool shouldFilpVertically)
4915```
4916
4917**Description**
4918
4919Flips a PixelMap based on a given angle.
4920
4921**Since**: 12
4922
4923**Parameters**
4924
4925| Name| Description|
4926| -------- | -------- |
4927| pixelmap | Pointer to an **OH_PixelmapNative** object. |
4928| shouldFilpHorizontally | Whether to flip the image horizontally. |
4929| shouldFilpVertically | Whether to flip the image vertically. |
4930
4931**Returns**
4932
4933Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
4934
4935
4936### OH_PixelmapNative_GetAllocationByteCount()
4937
4938```
4939Image_ErrorCode OH_PixelmapNative_GetAllocationByteCount(OH_PixelmapNative *pixelmap, uint32_t *allocationByteCount)
4940```
4941
4942**Description**
4943
4944Obtains the number of bytes in the memory allocated by a PixelMap to store pixels.
4945
4946**Since**: 18
4947
4948**Parameters**
4949
4950| Name| Description|
4951| -------- | -------- |
4952| pixelmap | Pointer to a PixelMap.|
4953| allocationByteCount | Pointer to the number of bytes obtained.|
4954
4955**Returns**
4956
4957Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if the **pixelmap** or **allocationByteCount** parameter is invalid. For details, see [Image_ErrorCode](#image_errorcode).
4958
4959
4960### OH_PixelmapNative_GetArgbPixels()
4961
4962```
4963Image_ErrorCode OH_PixelmapNative_GetArgbPixels(OH_PixelmapNative *pixelmap, uint8_t *destination, size_t *bufferSize)
4964```
4965
4966**Description**
4967
4968Reads data in ARGB format from a PixelMap.
4969
4970**Since**: 13
4971
4972**Parameters**
4973
4974| Name| Description|
4975| -------- | -------- |
4976| pixelmap | Pointer to an **OH_PixelmapNative** object. |
4977| destination | Pointer to the buffer to which the pixels will be written. |
4978| bufferSize | Pointer to the buffer size. |
4979
4980**Returns**
4981
4982Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_CONVERSION** if the PixelMap format does not support ARGB data reading; returns **IMAGE_ALLOC_FAILED** if the memory allocation fails; returns **IMAGE_COPY_FAILED** if the memory data fails to be copied, read, or operated. For details, see [Image_ErrorCode](#image_errorcode). For details, see [Image_ErrorCode](#image_errorcode).
4983
4984
4985### OH_PixelmapNative_GetByteCount()
4986
4987```
4988Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint32_t *byteCount)
4989```
4990
4991**Description**
4992
4993Obtains the total number of bytes occupied by all pixels in a PixelMap, excluding any memory padding.
4994
4995**Since**: 18
4996
4997**Parameters**
4998
4999| Name| Description|
5000| -------- | -------- |
5001| pixelmap | Pointer to a PixelMap.|
5002| byteCount | Pointer to the number of bytes obtained.|
5003
5004**Returns**
5005
5006Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if the **pixelmap** or **byteCount** parameter is invalid. For details, see [Image_ErrorCode](#image_errorcode).
5007
5008
5009### OH_PixelmapNative_GetColorSpaceNative()
5010
5011```
5012Image_ErrorCode OH_PixelmapNative_GetColorSpaceNative(OH_PixelmapNative *pixelmap, OH_NativeColorSpaceManager **colorSpaceNative)
5013```
5014
5015**Description**
5016
5017Obtains a **NativeColorSpaceManager** object.
5018
5019**Since**: 13
5020
5021**Parameters**
5022
5023| Name| Description|
5024| -------- | -------- |
5025| pixelmap | Pointer to the source PixelMap of the **NativeColorSpaceManager**. |
5026| colorSpaceNative | Double pointer to the **NativeColorSpaceManager** object obtained. |
5027
5028**Returns**
5029
5030Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5031
5032
5033### OH_PixelmapNative_GetImageInfo()
5034
5035```
5036Image_ErrorCode OH_PixelmapNative_GetImageInfo(OH_PixelmapNative *pixelmap, OH_Pixelmap_ImageInfo *imageInfo)
5037```
5038
5039**Description**
5040
5041Obtains the image information of a PixelMap.
5042
5043**Since**: 12
5044
5045**Parameters**
5046
5047| Name| Description|
5048| -------- | -------- |
5049| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5050| imageInfo | Pointer to the image information. |
5051
5052**Returns**
5053
5054Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5055
5056
5057### OH_PixelmapNative_GetMetadata()
5058
5059```
5060Image_ErrorCode OH_PixelmapNative_GetMetadata(OH_PixelmapNative *pixelmap, OH_Pixelmap_HdrMetadataKey key, OH_Pixelmap_HdrMetadataValue **value)
5061```
5062
5063**Description**
5064
5065Obtains the metadata.
5066
5067**Since**: 12
5068
5069**Parameters**
5070
5071| Name| Description|
5072| -------- | -------- |
5073| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5074| key | Metadata key. For details, see [OH_Pixelmap_HdrMetadataKey](#oh_pixelmap_hdrmetadatakey). |
5075| value | Double pointer to the value of the metadata key. For details, see [OH_Pixelmap_HdrMetadataValue](_o_h___pixelmap___hdr_metadata_value.md). |
5076
5077**Returns**
5078
5079Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DMA_NOT_EXIST** if the DMA memory does not exist; returns **IMAGE_COPY_FAILED** if the memory copy fails. For details, see [Image_ErrorCode](#image_errorcode).
5080
5081
5082### OH_PixelmapNative_GetNativeBuffer()
5083
5084```
5085Image_ErrorCode OH_PixelmapNative_GetNativeBuffer(OH_PixelmapNative *pixelmap, OH_NativeBuffer **nativeBuffer)
5086```
5087
5088**Description**
5089
5090Obtains the **NativeBuffer** object from a PixelMap in the DMA memory.
5091
5092**Since**: 12
5093
5094**Parameters**
5095
5096| Name| Description|
5097| -------- | -------- |
5098| pixelmap | Pointer to the PixelMap. |
5099| nativeBuffer | Double pointer to the **NativeBuffer** object obtained. |
5100
5101**Returns**
5102
5103Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DMA_NOT_EXIST** if the memory is not the DMA memory; returns **IMAGE_DMA_OPERATION_FAILED** if the operation on the DMA memory fails. For details, see [Image_ErrorCode](#image_errorcode).
5104
5105
5106### OH_PixelmapNative_Opacity()
5107
5108```
5109Image_ErrorCode OH_PixelmapNative_Opacity(OH_PixelmapNative *pixelmap, float rate)
5110```
5111
5112**Description**
5113
5114Sets the opacity rate to enable the PixelMap to achieve the corresponding opacity effect.
5115
5116**Since**: 12
5117
5118**Parameters**
5119
5120| Name| Description|
5121| -------- | -------- |
5122| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5123| rate | Opacity rate to set. |
5124
5125**Returns**
5126
5127Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5128
5129
5130### OH_PixelmapNative_ReadPixels()
5131
5132```
5133Image_ErrorCode OH_PixelmapNative_ReadPixels(OH_PixelmapNative *pixelmap, uint8_t *destination, size_t *bufferSize)
5134```
5135
5136**Description**
5137
5138Reads the pixels of a PixelMap and writes the result to the buffer based on the pixel format of the PixelMap.
5139
5140**Since**: 12
5141
5142**Parameters**
5143
5144| Name| Description|
5145| -------- | -------- |
5146| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5147| destination | Pointer to the buffer to which the pixels will be written. |
5148| bufferSize | Pointer to the buffer size. The buffer size of the RGBA format is equal to width * height * 4, and the buffer size of the NV21 and NV12 formats is equal to width * height+((width+1)/2) * ((height+1)/2) * 2. |
5149
5150**Returns**
5151
5152Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
5153
5154
5155### OH_PixelmapNative_Release()
5156
5157```
5158Image_ErrorCode OH_PixelmapNative_Release(OH_PixelmapNative *pixelmap)
5159```
5160
5161**Description**
5162
5163Releases the pointer to an **OH_PixelmapNative** object. [OH_PixelmapNative_Destroy](#oh_pixelmapnative_destroy) is recommended.
5164
5165**Since**: 12
5166
5167**Parameters**
5168
5169| Name| Description|
5170| -------- | -------- |
5171| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5172
5173**Returns**
5174
5175Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5176
5177
5178### OH_PixelmapNative_Rotate()
5179
5180```
5181Image_ErrorCode OH_PixelmapNative_Rotate(OH_PixelmapNative *pixelmap, float angle)
5182```
5183
5184**Description**
5185
5186Rotates a PixelMap based on a given angle.
5187
5188**Since**: 12
5189
5190**Parameters**
5191
5192| Name| Description|
5193| -------- | -------- |
5194| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5195| angle | Image rotation angle, in degrees. |
5196
5197**Returns**
5198
5199Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5200
5201
5202### OH_PixelmapNative_Scale()
5203
5204```
5205Image_ErrorCode OH_PixelmapNative_Scale(OH_PixelmapNative *pixelmap, float scaleX, float scaleY)
5206```
5207
5208**Description**
5209
5210Scales a PixelMap based on a given width and height.
5211
5212**Since**: 12
5213
5214**Parameters**
5215
5216| Name| Description|
5217| -------- | -------- |
5218| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5219| scaleX | Scale ratio of the width. |
5220| scaleY | Scale ratio of the height. |
5221
5222**Returns**
5223
5224Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5225
5226
5227### OH_PixelmapNative_ScaleWithAntiAliasing()
5228
5229```
5230Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing(OH_PixelmapNative *pixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level)
5231```
5232
5233**Description**
5234
5235Scales a PixelMap based on the specified anti-aliasing level, width, and height.
5236
5237**Since**: 12
5238
5239**Parameters**
5240
5241| Name| Description|
5242| -------- | -------- |
5243| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5244| scaleX | Scale ratio of the width. |
5245| scaleY | Scale ratio of the height. |
5246| level | Anti-aliasing level. |
5247
5248**Returns**
5249
5250Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_TOO_LARGE** if the image is too large; returns **IMAGE_ALLOC_FAILED** if memory allocation fails; returns **IMAGE_UNKNOWN_ERROR** if the object pointed to by **pixelmap** is released. For details, see [Image_ErrorCode](#image_errorcode).
5251
5252
5253### OH_PixelmapNative_SetColorSpaceNative()
5254
5255```
5256Image_ErrorCode OH_PixelmapNative_SetColorSpaceNative(OH_PixelmapNative *pixelmap, OH_NativeColorSpaceManager *colorSpaceNative)
5257```
5258
5259**Description**
5260
5261Sets a **NativeColorSpaceManager** object.
5262
5263**Since**: 13
5264
5265**Parameters**
5266
5267| Name| Description|
5268| -------- | -------- |
5269| pixelmap | Pointer to the target PixelMap of the **NativeColorSpaceManager** object. |
5270| colorSpaceNative | Pointer to a **NativeColorSpaceManager** object. |
5271
5272**Returns**
5273
5274Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5275
5276
5277### OH_PixelmapNative_SetMemoryName()
5278
5279```
5280Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, char *name, size_t *size)
5281```
5282
5283**Description**
5284
5285Sets the memory name of a PixelMap.
5286
5287**Since**: 13
5288
5289**Parameters**
5290
5291| Name| Description|
5292| -------- | -------- |
5293| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5294| name | Pointer to the memory name. |
5295| size | Pointer to the memory size (in bytes). |
5296
5297**Returns**
5298
5299Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if the name length exceeds 31 characters or is less than 1 character; Returns **IMAGE_UNSUPPORTED_MEMORY_FORMAT** if the memory is neither DMA memory nor ASHMEM memory. For details, see [Image_ErrorCode](#image_errorcode).
5300
5301
5302### OH_PixelmapNative_SetMetadata()
5303
5304```
5305Image_ErrorCode OH_PixelmapNative_SetMetadata(OH_PixelmapNative *pixelmap, OH_Pixelmap_HdrMetadataKey key, OH_Pixelmap_HdrMetadataValue *value)
5306```
5307
5308**Description**
5309
5310Sets the metadata.
5311
5312**Since**: 12
5313
5314**Parameters**
5315
5316| Name| Description|
5317| -------- | -------- |
5318| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5319| key | Metadata key. For details, see [OH_Pixelmap_HdrMetadataKey](#oh_pixelmap_hdrmetadatakey). |
5320| value | Pointer to the value of the metadata key. For details, see [OH_Pixelmap_HdrMetadataValue](_o_h___pixelmap___hdr_metadata_value.md). |
5321
5322**Returns**
5323
5324Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_DMA_NOT_EXIST** if the DMA memory does not exist; returns **IMAGE_COPY_FAILED** if the memory copy fails. For details, see [Image_ErrorCode](#image_errorcode).
5325
5326
5327### OH_PixelmapNative_ToSdr()
5328
5329```
5330Image_ErrorCode OH_PixelmapNative_ToSdr(OH_PixelmapNative *pixelmap)
5331```
5332
5333**Description**
5334
5335Converts a PixelMap from the HDR format to the SDR format.
5336
5337**Since**: 12
5338
5339**Parameters**
5340
5341| Name| Description|
5342| -------- | -------- |
5343| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5344
5345**Returns**
5346
5347Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_OPERATION** if the operation is not supported. For details, see [Image_ErrorCode](#image_errorcode).
5348
5349
5350### OH_PixelmapNative_Translate()
5351
5352```
5353Image_ErrorCode OH_PixelmapNative_Translate(OH_PixelmapNative *pixelmap, float x, float y)
5354```
5355
5356**Description**
5357
5358Translates a PixelMap based on given coordinates.
5359
5360**Since**: 12
5361
5362**Parameters**
5363
5364| Name| Description|
5365| -------- | -------- |
5366| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5367| x | X coordinate to translate. |
5368| y | Y coordinate to translate. |
5369
5370**Returns**
5371
5372Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect. For details, see [Image_ErrorCode](#image_errorcode).
5373
5374
5375### OH_PixelmapNative_UnaccessPixels()
5376
5377```
5378Image_ErrorCode OH_PixelmapNative_UnaccessPixels(OH_PixelmapNative *pixelmap)
5379```
5380
5381**Description**
5382
5383Unlocks the memory allocated to store the pixels of a PixelMap.
5384
5385This function must be used together with [OH_PixelmapNative_AccessPixels](#oh_pixelmapnative_accesspixels).
5386
5387**Since**: 15
5388
5389**Parameters**
5390
5391| Name| Description|
5392| -------- | -------- |
5393| pixelmap | Pointer to a PixelMap.|
5394
5395**Returns**
5396
5397Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if the **pixelmap** parameter is invalid; returns **IMAGE_LOCK_UNLOCK_FAILED** if the memory fails to be unlocked. For details, see [Image_ErrorCode](#image_errorcode).
5398
5399
5400### OH_PixelmapNative_WritePixels()
5401
5402```
5403Image_ErrorCode OH_PixelmapNative_WritePixels(OH_PixelmapNative *pixelmap, uint8_t *source, size_t bufferSize)
5404```
5405
5406**Description**
5407
5408Reads the pixels in the buffer and writes the result to the PixelMap based on the pixel format of the PixelMap.
5409
5410**Since**: 12
5411
5412**Parameters**
5413
5414| Name| Description|
5415| -------- | -------- |
5416| pixelmap | Pointer to an **OH_PixelmapNative** object. |
5417| source | Pointer to the buffer from which the pixels will be read. |
5418| bufferSize | Buffer size. |
5419
5420**Returns**
5421
5422Returns **IMAGE_SUCCESS** if the operation is successful; returns **IMAGE_BAD_PARAMETER** if a parameter is incorrect; returns **IMAGE_UNSUPPORTED_OPERATION** if the operation is not supported; returns **IMAGE_UNKNOWN_ERROR** if an unknown error occurs. For details, see [Image_ErrorCode](#image_errorcode).
5423
5424
5425## Variable Description
5426
5427
5428### MIME_TYPE_BMP
5429
5430```
5431static const char* MIME_TYPE_BMP = "image/bmp"
5432```
5433
5434**Description**
5435
5436BMP image format.
5437
5438**Since**: 12
5439
5440
5441### MIME_TYPE_GIF
5442
5443```
5444static const char* MIME_TYPE_GIF = "image/gif"
5445```
5446
5447**Description**
5448
5449GIF image format.
5450
5451**Since**: 12
5452
5453
5454### MIME_TYPE_HEIC
5455
5456```
5457static const char* MIME_TYPE_HEIC = "image/heic"
5458```
5459
5460**Description**
5461
5462HEIC image format.
5463
5464**Since**: 12
5465
5466
5467### MIME_TYPE_ICON
5468
5469```
5470static const char* MIME_TYPE_ICON = "image/x-icon"
5471```
5472
5473**Description**
5474
5475ICO image format.
5476
5477**Since**: 12
5478
5479
5480### MIME_TYPE_JPEG
5481
5482```
5483static const char* MIME_TYPE_JPEG = "image/jpeg"
5484```
5485
5486**Description**
5487
5488JPEG image format.
5489
5490**Since**: 12
5491
5492
5493### MIME_TYPE_PNG
5494
5495```
5496static const char* MIME_TYPE_PNG = "image/png"
5497```
5498
5499**Description**
5500
5501PNG image format.
5502
5503**Since**: 12
5504
5505
5506### MIME_TYPE_WEBP
5507
5508```
5509static const char* MIME_TYPE_WEBP = "image/webp"
5510```
5511
5512**Description**
5513
5514WebP image format.
5515
5516**Since**: 12
5517
5518
5519### OHOS_IMAGE_PROPERTY_ARTIST
5520
5521```
5522static const char* OHOS_IMAGE_PROPERTY_ARTIST = "Artist"
5523```
5524
5525**Description**
5526
5527Person who created the image.
5528
5529**Since**: 12
5530
5531
5532### OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE
5533
5534```
5535static const char* OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"
5536```
5537
5538**Description**
5539
5540Number of bits per sample.
5541
5542**Since**: 12
5543
5544
5545### OHOS_IMAGE_PROPERTY_BODY_SERIAL_NUMBER
5546
5547```
5548static const char* OHOS_IMAGE_PROPERTY_BODY_SERIAL_NUMBER = "BodySerialNumber"
5549```
5550
5551**Description**
5552
5553Serial number of the camera body.
5554
5555**Since**: 12
5556
5557
5558### OHOS_IMAGE_PROPERTY_BRIGHTNESS_VALUE
5559
5560```
5561static const char* OHOS_IMAGE_PROPERTY_BRIGHTNESS_VALUE = "BrightnessValue"
5562```
5563
5564**Description**
5565
5566Value of brightness, expressed in APEX values.
5567
5568**Since**: 12
5569
5570
5571### OHOS_IMAGE_PROPERTY_BURST_NUMBER
5572
5573```
5574static const char* OHOS_IMAGE_PROPERTY_BURST_NUMBER = "HwMnoteBurstNumber"
5575```
5576
5577**Description**
5578
5579Number of burst shooting times.
5580
5581**Since**: 12
5582
5583
5584### OHOS_IMAGE_PROPERTY_CAMERA_OWNER_NAME
5585
5586```
5587static const char* OHOS_IMAGE_PROPERTY_CAMERA_OWNER_NAME = "CameraOwnerName"
5588```
5589
5590**Description**
5591
5592Name of the camera owner.
5593
5594**Since**: 12
5595
5596
5597### OHOS_IMAGE_PROPERTY_CFA_PATTERN
5598
5599```
5600static const char* OHOS_IMAGE_PROPERTY_CFA_PATTERN = "CFAPattern"
5601```
5602
5603**Description**
5604
5605Color Filter Array (CFA) geometric pattern of the image sensor.
5606
5607**Since**: 12
5608
5609
5610### OHOS_IMAGE_PROPERTY_COLOR_SPACE
5611
5612```
5613static const char* OHOS_IMAGE_PROPERTY_COLOR_SPACE = "ColorSpace"
5614```
5615
5616**Description**
5617
5618Color space information, which is usually recorded as a color space specifier.
5619
5620**Since**: 12
5621
5622
5623### OHOS_IMAGE_PROPERTY_COMPONENTS_CONFIGURATION
5624
5625```
5626static const char* OHOS_IMAGE_PROPERTY_COMPONENTS_CONFIGURATION = "ComponentsConfiguration"
5627```
5628
5629**Description**
5630
5631Specific information about compressed data.
5632
5633**Since**: 12
5634
5635
5636### OHOS_IMAGE_PROPERTY_COMPOSITE_IMAGE
5637
5638```
5639static const char* OHOS_IMAGE_PROPERTY_COMPOSITE_IMAGE = "CompositeImage"
5640```
5641
5642**Description**
5643
5644Whether the image is a composite image.
5645
5646**Since**: 12
5647
5648
5649### OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL
5650
5651```
5652static const char* OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel"
5653```
5654
5655**Description**
5656
5657Number of bits per pixel. It is specific to compressed data.
5658
5659**Since**: 12
5660
5661
5662### OHOS_IMAGE_PROPERTY_COMPRESSION
5663
5664```
5665static const char* OHOS_IMAGE_PROPERTY_COMPRESSION = "Compression"
5666```
5667
5668**Description**
5669
5670Compression scheme used on the image data.
5671
5672**Since**: 12
5673
5674
5675### OHOS_IMAGE_PROPERTY_CONTRAST
5676
5677```
5678static const char* OHOS_IMAGE_PROPERTY_CONTRAST = "Contrast"
5679```
5680
5681**Description**
5682
5683Direction of contrast processing used by the camera.
5684
5685**Since**: 12
5686
5687
5688### OHOS_IMAGE_PROPERTY_COPYRIGHT
5689
5690```
5691static const char* OHOS_IMAGE_PROPERTY_COPYRIGHT = "Copyright"
5692```
5693
5694**Description**
5695
5696Copyright notice of the image.
5697
5698**Since**: 12
5699
5700
5701### OHOS_IMAGE_PROPERTY_CUSTOM_RENDERED
5702
5703```
5704static const char* OHOS_IMAGE_PROPERTY_CUSTOM_RENDERED = "CustomRendered"
5705```
5706
5707**Description**
5708
5709Special processing on image data.
5710
5711**Since**: 12
5712
5713
5714### OHOS_IMAGE_PROPERTY_DATE_TIME_DIGITIZED
5715
5716```
5717static const char* OHOS_IMAGE_PROPERTY_DATE_TIME_DIGITIZED = "DateTimeDigitized"
5718```
5719
5720**Description**
5721
5722Date and time when the image was stored as digital data, in the format of YYYY:MM:DD HH:MM:SS.
5723
5724**Since**: 12
5725
5726
5727### OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL
5728
5729```
5730static const char* OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"
5731```
5732
5733**Description**
5734
5735Shooting time, for example, 2022:09:06 15:48:00.
5736
5737**Since**: 12
5738
5739
5740### OHOS_IMAGE_PROPERTY_DEFAULT_CROP_SIZE
5741
5742```
5743static const char* OHOS_IMAGE_PROPERTY_DEFAULT_CROP_SIZE = "DefaultCropSize"
5744```
5745
5746**Description**
5747
5748Size of the final image area, in raw image coordinates, taking into account extra pixels around the edges of the final image.
5749
5750**Since**: 12
5751
5752
5753### OHOS_IMAGE_PROPERTY_DEVICE_SETTING_DESCRIPTION
5754
5755```
5756static const char* OHOS_IMAGE_PROPERTY_DEVICE_SETTING_DESCRIPTION = "DeviceSettingDescription"
5757```
5758
5759**Description**
5760
5761Information about the photographing conditions of a specific camera model.
5762
5763**Since**: 12
5764
5765
5766### OHOS_IMAGE_PROPERTY_DIGITAL_ZOOM_RATIO
5767
5768```
5769static const char* OHOS_IMAGE_PROPERTY_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio"
5770```
5771
5772**Description**
5773
5774Digital zoom ratio when the image was captured.
5775
5776**Since**: 12
5777
5778
5779### OHOS_IMAGE_PROPERTY_DNG_VERSION
5780
5781```
5782static const char* OHOS_IMAGE_PROPERTY_DNG_VERSION = "DNGVersion"
5783```
5784
5785**Description**
5786
5787DNG version. It encodes the DNG 4-tier version number.
5788
5789**Since**: 12
5790
5791
5792### OHOS_IMAGE_PROPERTY_EXIF_VERSION
5793
5794```
5795static const char* OHOS_IMAGE_PROPERTY_EXIF_VERSION = "ExifVersion"
5796```
5797
5798**Description**
5799
5800Version of the supported EXIF standard.
5801
5802**Since**: 12
5803
5804
5805### OHOS_IMAGE_PROPERTY_EXPOSURE_INDEX
5806
5807```
5808static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_INDEX = "ExposureIndex"
5809```
5810
5811**Description**
5812
5813Exposure index selected at the time the image is captured.
5814
5815**Since**: 12
5816
5817
5818### OHOS_IMAGE_PROPERTY_EXPOSURE_MODE
5819
5820```
5821static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_MODE = "ExposureMode"
5822```
5823
5824**Description**
5825
5826Exposure mode set when the image was captured.
5827
5828**Since**: 12
5829
5830
5831### OHOS_IMAGE_PROPERTY_EXPOSURE_PROGRAM
5832
5833```
5834static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_PROGRAM = "ExposureProgram"
5835```
5836
5837**Description**
5838
5839Class of the program used by the camera to set exposure when the image was captured.
5840
5841**Since**: 12
5842
5843
5844### OHOS_IMAGE_PROPERTY_EXPOSURE_TIME
5845
5846```
5847static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"
5848```
5849
5850**Description**
5851
5852Exposure time, for example, 1/33 seconds.
5853
5854**Since**: 12
5855
5856
5857### OHOS_IMAGE_PROPERTY_F_NUMBER
5858
5859```
5860static const char* OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"
5861```
5862
5863**Description**
5864
5865F number, for example, f/1.8.
5866
5867**Since**: 12
5868
5869
5870### OHOS_IMAGE_PROPERTY_FACE_CONF
5871
5872```
5873static const char* OHOS_IMAGE_PROPERTY_FACE_CONF = "HwMnoteFaceConf"
5874```
5875
5876**Description**
5877
5878Face confidence.
5879
5880**Since**: 12
5881
5882
5883### OHOS_IMAGE_PROPERTY_FACE_LEYE_CENTER
5884
5885```
5886static const char* OHOS_IMAGE_PROPERTY_FACE_LEYE_CENTER = "HwMnoteFaceLeyeCenter"
5887```
5888
5889**Description**
5890
5891Left eye centered. It is used in **OH_ImageSource_GetImageProperty** and **OH_ImageSource_ModifyImageProperty**.
5892
5893**Since**: 12
5894
5895
5896### OHOS_IMAGE_PROPERTY_FACE_MOUTH_CENTER
5897
5898```
5899static const char* OHOS_IMAGE_PROPERTY_FACE_MOUTH_CENTER = "HwMnoteFaceMouthCenter"
5900```
5901
5902**Description**
5903
5904Mouth centered.
5905
5906**Since**: 12
5907
5908
5909### OHOS_IMAGE_PROPERTY_FACE_POINTER
5910
5911```
5912static const char* OHOS_IMAGE_PROPERTY_FACE_POINTER = "HwMnoteFacePointer"
5913```
5914
5915**Description**
5916
5917Face pointer.
5918
5919**Since**: 12
5920
5921
5922### OHOS_IMAGE_PROPERTY_FACE_RECT
5923
5924```
5925static const char* OHOS_IMAGE_PROPERTY_FACE_RECT = "HwMnoteFaceRect"
5926```
5927
5928**Description**
5929
5930Face rectangle.
5931
5932**Since**: 12
5933
5934
5935### OHOS_IMAGE_PROPERTY_FACE_REYE_CENTER
5936
5937```
5938static const char* OHOS_IMAGE_PROPERTY_FACE_REYE_CENTER = "HwMnoteFaceReyeCenter"
5939```
5940
5941**Description**
5942
5943Right eye centered.
5944
5945**Since**: 12
5946
5947
5948### OHOS_IMAGE_PROPERTY_FACE_SMILE_SCORE
5949
5950```
5951static const char* OHOS_IMAGE_PROPERTY_FACE_SMILE_SCORE = "HwMnoteFaceSmileScore"
5952```
5953
5954**Description**
5955
5956Smile score of for faces.
5957
5958**Since**: 12
5959
5960
5961### OHOS_IMAGE_PROPERTY_FACE_VERSION
5962
5963```
5964static const char* OHOS_IMAGE_PROPERTY_FACE_VERSION = "HwMnoteFaceVersion"
5965```
5966
5967**Description**
5968
5969Facial recognition algorithm version.
5970
5971**Since**: 12
5972
5973
5974### OHOS_IMAGE_PROPERTY_FILE_SOURCE
5975
5976```
5977static const char* OHOS_IMAGE_PROPERTY_FILE_SOURCE = "FileSource"
5978```
5979
5980**Description**
5981
5982Image source.
5983
5984**Since**: 12
5985
5986
5987### OHOS_IMAGE_PROPERTY_FLASH_ENERGY
5988
5989```
5990static const char* OHOS_IMAGE_PROPERTY_FLASH_ENERGY = "FlashEnergy"
5991```
5992
5993**Description**
5994
5995Strobe energy at the time the image was captured, in Beam Candle Power Seconds (BCPS).
5996
5997**Since**: 12
5998
5999
6000### OHOS_IMAGE_PROPERTY_FLASHPIX_VERSION
6001
6002```
6003static const char* OHOS_IMAGE_PROPERTY_FLASHPIX_VERSION = "FlashpixVersion"
6004```
6005
6006**Description**
6007
6008FlashPix format version supported by an FPXR file. It is used to enhance device compatibility.
6009
6010**Since**: 12
6011
6012
6013### OHOS_IMAGE_PROPERTY_FOCAL_PLANE_RESOLUTION_UNIT
6014
6015```
6016static const char* OHOS_IMAGE_PROPERTY_FOCAL_PLANE_RESOLUTION_UNIT = "FocalPlaneResolutionUnit"
6017```
6018
6019**Description**
6020
6021Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution.
6022
6023**Since**: 12
6024
6025
6026### OHOS_IMAGE_PROPERTY_FOCAL_PLANE_X_RESOLUTION
6027
6028```
6029static const char* OHOS_IMAGE_PROPERTY_FOCAL_PLANE_X_RESOLUTION = "FocalPlaneXResolution"
6030```
6031
6032**Description**
6033
6034Number of pixels in the image width (X) direction per FocalPlaneResolutionUnit.
6035
6036**Since**: 12
6037
6038
6039### OHOS_IMAGE_PROPERTY_FOCAL_PLANE_Y_RESOLUTION
6040
6041```
6042static const char* OHOS_IMAGE_PROPERTY_FOCAL_PLANE_Y_RESOLUTION = "FocalPlaneYResolution"
6043```
6044
6045**Description**
6046
6047Number of pixels in the image height (Y) direction per FocalPlaneResolutionUnit.
6048
6049**Since**: 12
6050
6051
6052### OHOS_IMAGE_PROPERTY_FRAGMENT_HEIGHT
6053
6054```
6055static const char *OHOS_IMAGE_PROPERTY_FRAGMENT_HEIGHT = "FragmentImageHeight"
6056```
6057
6058**Description**
6059
6060Height of the fragment map.
6061
6062**Since**: 13
6063
6064
6065### OHOS_IMAGE_PROPERTY_FRAGMENT_WIDTH
6066
6067```
6068static const char *OHOS_IMAGE_PROPERTY_FRAGMENT_WIDTH = "FragmentImageWidth"
6069```
6070
6071**Description**
6072
6073Width of the fragment map.
6074
6075**Since**: 13
6076
6077
6078### OHOS_IMAGE_PROPERTY_FRONT_CAMERA
6079
6080```
6081static const char* OHOS_IMAGE_PROPERTY_FRONT_CAMERA = "HwMnoteFrontCamera"
6082```
6083
6084**Description**
6085
6086Whether the front camera is used to take a selfie.
6087
6088**Since**: 12
6089
6090
6091### OHOS_IMAGE_PROPERTY_GAIN_CONTROL
6092
6093```
6094static const char* OHOS_IMAGE_PROPERTY_GAIN_CONTROL = "GainControl"
6095```
6096
6097**Description**
6098
6099Degree of overall image gain adjustment.
6100
6101**Since**: 12
6102
6103
6104### OHOS_IMAGE_PROPERTY_GAMMA
6105
6106```
6107static const char* OHOS_IMAGE_PROPERTY_GAMMA = "Gamma"
6108```
6109
6110**Description**
6111
6112Gamma value.
6113
6114**Since**: 12
6115
6116
6117### OHOS_IMAGE_PROPERTY_GIF_LOOP_COUNT
6118
6119```
6120static const char* OHOS_IMAGE_PROPERTY_GIF_LOOP_COUNT = "GIFLoopCount"
6121```
6122
6123**Description**
6124
6125Number of GIF loops.
6126
6127**Since**: 12
6128
6129
6130### OHOS_IMAGE_PROPERTY_GPS_ALTITUDE
6131
6132```
6133static const char* OHOS_IMAGE_PROPERTY_GPS_ALTITUDE = "GPSAltitude"
6134```
6135
6136**Description**
6137
6138Altitude based on the reference in GPSAltitudeRef.
6139
6140**Since**: 12
6141
6142
6143### OHOS_IMAGE_PROPERTY_GPS_ALTITUDE_REF
6144
6145```
6146static const char* OHOS_IMAGE_PROPERTY_GPS_ALTITUDE_REF = "GPSAltitudeRef"
6147```
6148
6149**Description**
6150
6151Whether the latitude is north or south latitude.
6152
6153**Since**: 12
6154
6155
6156### OHOS_IMAGE_PROPERTY_GPS_AREA_INFORMATION
6157
6158```
6159static const char* OHOS_IMAGE_PROPERTY_GPS_AREA_INFORMATION = "GPSAreaInformation"
6160```
6161
6162**Description**
6163
6164String that records the name of the GPS area.
6165
6166**Since**: 12
6167
6168
6169### OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING
6170
6171```
6172static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING = "GPSDestBearing"
6173```
6174
6175**Description**
6176
6177Bearing to the destination point.
6178
6179**Since**: 12
6180
6181
6182### OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING_REF
6183
6184```
6185static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING_REF = "GPSDestBearingRef"
6186```
6187
6188**Description**
6189
6190Reference of the bearing to the destination point.
6191
6192**Since**: 12
6193
6194
6195### OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE
6196
6197```
6198static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE = "GPSDestDistance"
6199```
6200
6201**Description**
6202
6203Distance to the destination point.
6204
6205**Since**: 12
6206
6207
6208### OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE_REF
6209
6210```
6211static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE_REF = "GPSDestDistanceRef"
6212```
6213
6214**Description**
6215
6216Unit used to express the distance to the destination point.
6217
6218**Since**: 12
6219
6220
6221### OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE
6222
6223```
6224static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE = "GPSDestLatitude"
6225```
6226
6227**Description**
6228
6229Latitude of the destination point.
6230
6231**Since**: 12
6232
6233
6234### OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE_REF
6235
6236```
6237static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE_REF = "GPSDestLatitudeRef"
6238```
6239
6240**Description**
6241
6242Whether the latitude of the destination point is north or south latitude.
6243
6244**Since**: 12
6245
6246
6247### OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE
6248
6249```
6250static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE = "GPSDestLongitude"
6251```
6252
6253**Description**
6254
6255Longitude of the destination point.
6256
6257**Since**: 12
6258
6259
6260### OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE_REF
6261
6262```
6263static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE_REF = "GPSDestLongitudeRef"
6264```
6265
6266**Description**
6267
6268Whether the longitude of the destination point is east or west longitude.
6269
6270**Since**: 12
6271
6272
6273### OHOS_IMAGE_PROPERTY_GPS_DIFFERENTIAL
6274
6275```
6276static const char* OHOS_IMAGE_PROPERTY_GPS_DIFFERENTIAL = "GPSDifferential"
6277```
6278
6279**Description**
6280
6281Whether differential correction is applied to the GPS receiver. It is critical to accurate location accuracy.
6282
6283**Since**: 12
6284
6285
6286### OHOS_IMAGE_PROPERTY_GPS_DOP
6287
6288```
6289static const char* OHOS_IMAGE_PROPERTY_GPS_DOP = "GPSDOP"
6290```
6291
6292**Description**
6293
6294GPS DOP (data degree of precision)
6295
6296**Since**: 12
6297
6298
6299### OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR
6300
6301```
6302static const char* OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR = "GPSHPositioningError"
6303```
6304
6305**Description**
6306
6307Horizontal positioning error, in meters.
6308
6309**Since**: 12
6310
6311
6312### OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION
6313
6314```
6315static const char* OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION = "GPSImgDirection"
6316```
6317
6318**Description**
6319
6320Direction of the image when it was captured.
6321
6322**Since**: 12
6323
6324
6325### OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION_REF
6326
6327```
6328static const char* OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION_REF = "GPSImgDirectionRef"
6329```
6330
6331**Description**
6332
6333Reference of the direction of the image when it was captured.
6334
6335**Since**: 12
6336
6337
6338### OHOS_IMAGE_PROPERTY_GPS_LATITUDE
6339
6340```
6341static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"
6342```
6343
6344**Description**
6345
6346Image latitude.
6347
6348**Since**: 12
6349
6350
6351### OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF
6352
6353```
6354static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"
6355```
6356
6357**Description**
6358
6359Whether the latitude is north or south latitude.
6360
6361**Since**: 12
6362
6363
6364### OHOS_IMAGE_PROPERTY_GPS_LONGITUDE
6365
6366```
6367static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"
6368```
6369
6370**Description**
6371
6372Image longitude.
6373
6374**Since**: 12
6375
6376
6377### OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF
6378
6379```
6380static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"
6381```
6382
6383**Description**
6384
6385Whether the longitude is east or west longitude.
6386
6387**Since**: 12
6388
6389
6390### OHOS_IMAGE_PROPERTY_GPS_MAP_DATUM
6391
6392```
6393static const char* OHOS_IMAGE_PROPERTY_GPS_MAP_DATUM = "GPSMapDatum"
6394```
6395
6396**Description**
6397
6398Geodetic survey data used by the GPS receiver.
6399
6400**Since**: 12
6401
6402
6403### OHOS_IMAGE_PROPERTY_GPS_MEASURE_MODE
6404
6405```
6406static const char* OHOS_IMAGE_PROPERTY_GPS_MEASURE_MODE = "GPSMeasureMode"
6407```
6408
6409**Description**
6410
6411GPS measurement pmode.
6412
6413**Since**: 12
6414
6415
6416### OHOS_IMAGE_PROPERTY_GPS_PROCESSING_METHOD
6417
6418```
6419static const char* OHOS_IMAGE_PROPERTY_GPS_PROCESSING_METHOD = "GPSProcessingMethod"
6420```
6421
6422**Description**
6423
6424String that records the name of the method used for positioning.
6425
6426**Since**: 12
6427
6428
6429### OHOS_IMAGE_PROPERTY_GPS_SATELLITES
6430
6431```
6432static const char* OHOS_IMAGE_PROPERTY_GPS_SATELLITES = "GPSSatellites"
6433```
6434
6435**Description**
6436
6437GPS satellites used for measurement.
6438
6439**Since**: 12
6440
6441
6442### OHOS_IMAGE_PROPERTY_GPS_SPEED
6443
6444```
6445static const char* OHOS_IMAGE_PROPERTY_GPS_SPEED = "GPSSpeed"
6446```
6447
6448**Description**
6449
6450Movement speed of the GPS receiver.
6451
6452**Since**: 12
6453
6454
6455### OHOS_IMAGE_PROPERTY_GPS_SPEED_REF
6456
6457```
6458static const char* OHOS_IMAGE_PROPERTY_GPS_SPEED_REF = "GPSSpeedRef"
6459```
6460
6461**Description**
6462
6463Unit used to express the movement speed of the GPS receiver.
6464
6465**Since**: 12
6466
6467
6468### OHOS_IMAGE_PROPERTY_GPS_STATUS
6469
6470```
6471static const char* OHOS_IMAGE_PROPERTY_GPS_STATUS = "GPSStatus"
6472```
6473
6474**Description**
6475
6476Status of the GPS receiver when the image was recorded.
6477
6478**Since**: 12
6479
6480
6481### OHOS_IMAGE_PROPERTY_GPS_TRACK
6482
6483```
6484static const char* OHOS_IMAGE_PROPERTY_GPS_TRACK = "GPSTrack"
6485```
6486
6487**Description**
6488
6489Movement direction of the GPS receiver.
6490
6491**Since**: 12
6492
6493
6494### OHOS_IMAGE_PROPERTY_GPS_TRACK_REF
6495
6496```
6497static const char* OHOS_IMAGE_PROPERTY_GPS_TRACK_REF = "GPSTrackRef"
6498```
6499
6500**Description**
6501
6502Reference of the movement direction of the GPS receiver.
6503
6504**Since**: 12
6505
6506
6507### OHOS_IMAGE_PROPERTY_GPS_VERSION_ID
6508
6509```
6510static const char* OHOS_IMAGE_PROPERTY_GPS_VERSION_ID = "GPSVersionID"
6511```
6512
6513**Description**
6514
6515Version of GPSInfoIFD.
6516
6517**Since**: 12
6518
6519
6520### OHOS_IMAGE_PROPERTY_IMAGE_LENGTH
6521
6522```
6523static const char* OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"
6524```
6525
6526**Description**
6527
6528Image length.
6529
6530**Since**: 12
6531
6532
6533### OHOS_IMAGE_PROPERTY_IMAGE_UNIQUE_ID
6534
6535```
6536static const char* OHOS_IMAGE_PROPERTY_IMAGE_UNIQUE_ID = "ImageUniqueID"
6537```
6538
6539**Description**
6540
6541Unique identifier assigned to each image.
6542
6543**Since**: 12
6544
6545
6546### OHOS_IMAGE_PROPERTY_IMAGE_WIDTH
6547
6548```
6549static const char* OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"
6550```
6551
6552**Description**
6553
6554Image width.
6555
6556**Since**: 12
6557
6558
6559### OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEYYY
6560
6561```
6562static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEYYY = "ISOSpeedLatitudeyyy"
6563```
6564
6565**Description**
6566
6567ISO speed latitude yyy value of the camera or input device, which is defined in ISO 12232.
6568
6569**Since**: 12
6570
6571
6572### OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEZZZ
6573
6574```
6575static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEZZZ = "ISOSpeedLatitudezzz"
6576```
6577
6578**Description**
6579
6580ISO speed latitude zzz value of the camera or input device, which is defined in ISO 12232.
6581
6582**Since**: 12
6583
6584
6585### OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS
6586
6587```
6588static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"
6589```
6590
6591**Description**
6592
6593ISO sensitivity or ISO speed, for example, 400.
6594
6595**Since**: 12
6596
6597
6598### OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT
6599
6600```
6601static const char* OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT = "JPEGInterchangeFormat"
6602```
6603
6604**Description**
6605
6606Offset of the SOI marker of a JPEG interchange format bitstream.
6607
6608**Since**: 12
6609
6610
6611### OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT_LENGTH
6612
6613```
6614static const char* OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT_LENGTH = "JPEGInterchangeFormatLength"
6615```
6616
6617**Description**
6618
6619Number of bytes of the JPEG stream.
6620
6621**Since**: 12
6622
6623
6624### OHOS_IMAGE_PROPERTY_LENS_MAKE
6625
6626```
6627static const char* OHOS_IMAGE_PROPERTY_LENS_MAKE = "LensMake"
6628```
6629
6630**Description**
6631
6632Manufacturer of the lens.
6633
6634**Since**: 12
6635
6636
6637### OHOS_IMAGE_PROPERTY_LENS_MODEL
6638
6639```
6640static const char* OHOS_IMAGE_PROPERTY_LENS_MODEL = "LensModel"
6641```
6642
6643**Description**
6644
6645Model of the lens.
6646
6647**Since**: 12
6648
6649
6650### OHOS_IMAGE_PROPERTY_LENS_SERIAL_NUMBER
6651
6652```
6653static const char* OHOS_IMAGE_PROPERTY_LENS_SERIAL_NUMBER = "LensSerialNumber"
6654```
6655
6656**Description**
6657
6658Serial number of the lens.
6659
6660**Since**: 12
6661
6662
6663### OHOS_IMAGE_PROPERTY_LENS_SPECIFICATION
6664
6665```
6666static const char* OHOS_IMAGE_PROPERTY_LENS_SPECIFICATION = "LensSpecification"
6667```
6668
6669**Description**
6670
6671Specifications of the lens.
6672
6673**Since**: 12
6674
6675
6676### OHOS_IMAGE_PROPERTY_MAKER_NOTE
6677
6678```
6679static const char* OHOS_IMAGE_PROPERTY_MAKER_NOTE = "MakerNote"
6680```
6681
6682**Description**
6683
6684Marker used by EXIF/DCF manufacturers to record any required information.
6685
6686**Since**: 12
6687
6688
6689### OHOS_IMAGE_PROPERTY_MAX_APERTURE_VALUE
6690
6691```
6692static const char* OHOS_IMAGE_PROPERTY_MAX_APERTURE_VALUE = "MaxApertureValue"
6693```
6694
6695**Description**
6696
6697Smallest F number of the lens.
6698
6699**Since**: 12
6700
6701
6702### OHOS_IMAGE_PROPERTY_NEW_SUBFILE_TYPE
6703
6704```
6705static const char* OHOS_IMAGE_PROPERTY_NEW_SUBFILE_TYPE = "NewSubfileType"
6706```
6707
6708**Description**
6709
6710Data type of a subfile, such as a full-resolution image, a thumbnail, or a part of a multi-frame image. The value is a bit mask. The value 0 indicates a full-resolution image, **1** indicates a thumbnail, and **2** indicates a part of a multi-frame image.
6711
6712**Since**: 12
6713
6714
6715### OHOS_IMAGE_PROPERTY_OECF
6716
6717```
6718static const char* OHOS_IMAGE_PROPERTY_OECF = "OECF"
6719```
6720
6721**Description**
6722
6723Opto-Electric Conversion Function (OECF) specified in ISO 14524.
6724
6725**Since**: 12
6726
6727
6728### OHOS_IMAGE_PROPERTY_OFFSET_TIME
6729
6730```
6731static const char* OHOS_IMAGE_PROPERTY_OFFSET_TIME = "OffsetTime"
6732```
6733
6734**Description**
6735
6736Time with an offset from UTC when the image was captured, in the format of ±HH:MM.
6737
6738**Since**: 12
6739
6740
6741### OHOS_IMAGE_PROPERTY_OFFSET_TIME_DIGITIZED
6742
6743```
6744static const char* OHOS_IMAGE_PROPERTY_OFFSET_TIME_DIGITIZED = "OffsetTimeDigitized"
6745```
6746
6747**Description**
6748
6749Time with an offset from UTC when the image was digitized. It helps to accurately adjust the timestamp.
6750
6751**Since**: 12
6752
6753
6754### OHOS_IMAGE_PROPERTY_OFFSET_TIME_ORIGINAL
6755
6756```
6757static const char* OHOS_IMAGE_PROPERTY_OFFSET_TIME_ORIGINAL = "OffsetTimeOriginal"
6758```
6759
6760**Description**
6761
6762Time with an offset from UTC when the original image was created. It is critical for time-sensitive applications.
6763
6764**Since**: 12
6765
6766
6767### OHOS_IMAGE_PROPERTY_ORIENTATION
6768
6769```
6770static const char* OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"
6771```
6772
6773**Description**
6774
6775Image orientation.
6776
6777**Since**: 12
6778
6779
6780### OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY
6781
6782```
6783static const char* OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY = "PhotographicSensitivity"
6784```
6785
6786**Description**
6787
6788Sensitivity of the camera or input device when the image was captured.
6789
6790**Since**: 12
6791
6792
6793### OHOS_IMAGE_PROPERTY_PHOTOMETRIC_INTERPRETATION
6794
6795```
6796static const char* OHOS_IMAGE_PROPERTY_PHOTOMETRIC_INTERPRETATION = "PhotometricInterpretation"
6797```
6798
6799**Description**
6800
6801Color space of the image data, for example, RGB or YCbCr.
6802
6803**Since**: 12
6804
6805
6806### OHOS_IMAGE_PROPERTY_PLANAR_CONFIGURATION
6807
6808```
6809const char* OHOS_IMAGE_PROPERTY_PLANAR_CONFIGURATION = "PlanarConfiguration"
6810```
6811
6812**Description**
6813
6814Storage format of components of each pixel, which can be chunky or planar.
6815
6816**Since**: 12
6817
6818
6819### OHOS_IMAGE_PROPERTY_PRIMARY_CHROMATICITIES
6820
6821```
6822static const char* OHOS_IMAGE_PROPERTY_PRIMARY_CHROMATICITIES = "PrimaryChromaticities"
6823```
6824
6825**Description**
6826
6827Chromaticities of the primaries of the image.
6828
6829**Since**: 12
6830
6831
6832### OHOS_IMAGE_PROPERTY_REFERENCE_BLACK_WHITE
6833
6834```
6835static const char* OHOS_IMAGE_PROPERTY_REFERENCE_BLACK_WHITE = "ReferenceBlackWhite"
6836```
6837
6838**Description**
6839
6840A pair of headroom and footroom image data values (codes) for each pixel component.
6841
6842**Since**: 12
6843
6844
6845### OHOS_IMAGE_PROPERTY_RELATED_SOUND_FILE
6846
6847```
6848static const char* OHOS_IMAGE_PROPERTY_RELATED_SOUND_FILE = "RelatedSoundFile"
6849```
6850
6851**Description**
6852
6853Name of an audio file related to the image data.
6854
6855**Since**: 12
6856
6857
6858### OHOS_IMAGE_PROPERTY_RESOLUTION_UNIT
6859
6860```
6861static const char* OHOS_IMAGE_PROPERTY_RESOLUTION_UNIT = "ResolutionUnit"
6862```
6863
6864**Description**
6865
6866Unit of measurement for XResolution and YResolution.
6867
6868**Since**: 12
6869
6870
6871### OHOS_IMAGE_PROPERTY_ROWS_PER_STRIP
6872
6873```
6874static const char* OHOS_IMAGE_PROPERTY_ROWS_PER_STRIP = "RowsPerStrip"
6875```
6876
6877**Description**
6878
6879Number of rows per strip.
6880
6881**Since**: 12
6882
6883
6884### OHOS_IMAGE_PROPERTY_SAMPLES_PER_PIXEL
6885
6886```
6887static const char* OHOS_IMAGE_PROPERTY_SAMPLES_PER_PIXEL = "SamplesPerPixel"
6888```
6889
6890**Description**
6891
6892Number of components per pixel. The value is **3** for RGB and YCbCr images. The **JPEG** key is used in JPEG compressed data.
6893
6894**Since**: 12
6895
6896
6897### OHOS_IMAGE_PROPERTY_SATURATION
6898
6899```
6900static const char* OHOS_IMAGE_PROPERTY_SATURATION = "Saturation"
6901```
6902
6903**Description**
6904
6905Direction of saturation processing used by the camera.
6906
6907**Since**: 12
6908
6909
6910### OHOS_IMAGE_PROPERTY_SCENE_CAPTURE_TYPE
6911
6912```
6913static const char* OHOS_IMAGE_PROPERTY_SCENE_CAPTURE_TYPE = "SceneCaptureType"
6914```
6915
6916**Description**
6917
6918Type of the scene that was captured.
6919
6920**Since**: 12
6921
6922
6923### OHOS_IMAGE_PROPERTY_SCENE_POINTER
6924
6925```
6926static const char* OHOS_IMAGE_PROPERTY_SCENE_POINTER = "HwMnoteScenePointer"
6927```
6928
6929**Description**
6930
6931Pointer to the scene.
6932
6933**Since**: 12
6934
6935
6936### OHOS_IMAGE_PROPERTY_SCENE_TYPE
6937
6938```
6939static const char* OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"
6940```
6941
6942**Description**
6943
6944Type of the scene, for example, portrait, scenery, motion, and night.
6945
6946**Since**: 12
6947
6948
6949### OHOS_IMAGE_PROPERTY_SCENE_VERSION
6950
6951```
6952static const char* OHOS_IMAGE_PROPERTY_SCENE_VERSION = "HwMnoteSceneVersion"
6953```
6954
6955**Description**
6956
6957Scene algorithm version.
6958
6959**Since**: 12
6960
6961
6962### OHOS_IMAGE_PROPERTY_SENSING_METHOD
6963
6964```
6965static const char* OHOS_IMAGE_PROPERTY_SENSING_METHOD = "SensingMethod"
6966```
6967
6968**Description**
6969
6970Type of the image sensor on the camera.
6971
6972**Since**: 12
6973
6974
6975### OHOS_IMAGE_PROPERTY_SHARPNESS
6976
6977```
6978static const char* OHOS_IMAGE_PROPERTY_SHARPNESS = "Sharpness"
6979```
6980
6981**Description**
6982
6983Direction of sharpness processing used by the camera.
6984
6985**Since**: 12
6986
6987
6988### OHOS_IMAGE_PROPERTY_SHUTTER_SPEED_VALUE
6989
6990```
6991static const char* OHOS_IMAGE_PROPERTY_SHUTTER_SPEED_VALUE = "ShutterSpeedValue"
6992```
6993
6994**Description**
6995
6996Shutter speed, expressed in Additive System of Photographic Exposure (APEX) values.
6997
6998**Since**: 12
6999
7000
7001### OHOS_IMAGE_PROPERTY_SOFTWARE
7002
7003```
7004static const char* OHOS_IMAGE_PROPERTY_SOFTWARE = "Software"
7005```
7006
7007**Description**
7008
7009Name and version number of the software used to create the image.
7010
7011**Since**: 12
7012
7013
7014### OHOS_IMAGE_PROPERTY_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE
7015
7016```
7017static const char* OHOS_IMAGE_PROPERTY_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = "SourceExposureTimesOfCompositeImage"
7018```
7019
7020**Description**
7021
7022Exposure time of source images of the composite image.
7023
7024**Since**: 12
7025
7026
7027### OHOS_IMAGE_PROPERTY_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE
7028
7029```
7030static const char* OHOS_IMAGE_PROPERTY_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = "SourceImageNumberOfCompositeImage"
7031```
7032
7033**Description**
7034
7035Number of source images of the composite image.
7036
7037**Since**: 12
7038
7039
7040### OHOS_IMAGE_PROPERTY_SPATIAL_FREQUENCY_RESPONSE
7041
7042```
7043static const char* OHOS_IMAGE_PROPERTY_SPATIAL_FREQUENCY_RESPONSE = "SpatialFrequencyResponse"
7044```
7045
7046**Description**
7047
7048Spatial frequency table of the camera or input device.
7049
7050**Since**: 12
7051
7052
7053### OHOS_IMAGE_PROPERTY_SPECTRAL_SENSITIVITY
7054
7055```
7056static const char* OHOS_IMAGE_PROPERTY_SPECTRAL_SENSITIVITY = "SpectralSensitivity"
7057```
7058
7059**Description**
7060
7061Spectral sensitivity of each channel of the camera.
7062
7063**Since**: 12
7064
7065
7066### OHOS_IMAGE_PROPERTY_STRIP_BYTE_COUNTS
7067
7068```
7069static const char* OHOS_IMAGE_PROPERTY_STRIP_BYTE_COUNTS = "StripByteCounts"
7070```
7071
7072**Description**
7073
7074Number of bytes in each strip after compression.
7075
7076**Since**: 12
7077
7078
7079### OHOS_IMAGE_PROPERTY_STRIP_OFFSETS
7080
7081```
7082static const char* OHOS_IMAGE_PROPERTY_STRIP_OFFSETS = "StripOffsets"
7083```
7084
7085**Description**
7086
7087Byte offset of each strip.
7088
7089**Since**: 12
7090
7091
7092### OHOS_IMAGE_PROPERTY_SUBFILE_TYPE
7093
7094```
7095static const char* OHOS_IMAGE_PROPERTY_SUBFILE_TYPE = "SubfileType"
7096```
7097
7098**Description**
7099
7100Type of data contained in this subfile. This tag has been deprecated. Use **NewSubfileType** instead.
7101
7102**Since**: 12
7103
7104
7105### OHOS_IMAGE_PROPERTY_SUBJECT_AREA
7106
7107```
7108static const char* OHOS_IMAGE_PROPERTY_SUBJECT_AREA = "SubjectArea"
7109```
7110
7111**Description**
7112
7113Location and area of the main subject in the entire scene.
7114
7115**Since**: 12
7116
7117
7118### OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE
7119
7120```
7121static const char* OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE = "SubjectDistance"
7122```
7123
7124**Description**
7125
7126Distance to the subject, in meters.
7127
7128**Since**: 12
7129
7130
7131### OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE_RANGE
7132
7133```
7134static const char* OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE_RANGE = "SubjectDistanceRange"
7135```
7136
7137**Description**
7138
7139Distance to the subject.
7140
7141**Since**: 12
7142
7143
7144### OHOS_IMAGE_PROPERTY_SUBJECT_LOCATION
7145
7146```
7147static const char* OHOS_IMAGE_PROPERTY_SUBJECT_LOCATION = "SubjectLocation"
7148```
7149
7150**Description**
7151
7152Location of the main subject relative to the left edge.
7153
7154**Since**: 12
7155
7156
7157### OHOS_IMAGE_PROPERTY_SUBSEC_TIME
7158
7159```
7160static const char* OHOS_IMAGE_PROPERTY_SUBSEC_TIME = "SubsecTime"
7161```
7162
7163**Description**
7164
7165Tag used to record fractions of seconds for the **DateTime** tag.
7166
7167**Since**: 12
7168
7169
7170### OHOS_IMAGE_PROPERTY_SUBSEC_TIME_DIGITIZED
7171
7172```
7173static const char* OHOS_IMAGE_PROPERTY_SUBSEC_TIME_DIGITIZED = "SubsecTimeDigitized"
7174```
7175
7176**Description**
7177
7178Tag used to record fractions of seconds for the **DateTimeDigitized** tag.
7179
7180**Since**: 12
7181
7182
7183### OHOS_IMAGE_PROPERTY_SUBSEC_TIME_ORIGINAL
7184
7185```
7186static const char* OHOS_IMAGE_PROPERTY_SUBSEC_TIME_ORIGINAL = "SubsecTimeOriginal"
7187```
7188
7189**Description**
7190
7191Tag used to record fractions of seconds for the **DateTimeOriginal** tag.
7192
7193**Since**: 12
7194
7195
7196### OHOS_IMAGE_PROPERTY_TRANSFER_FUNCTION
7197
7198```
7199static const char* OHOS_IMAGE_PROPERTY_TRANSFER_FUNCTION = "TransferFunction"
7200```
7201
7202**Description**
7203
7204Transfer function for the image, which is usually used for color correction.
7205
7206**Since**: 12
7207
7208
7209### OHOS_IMAGE_PROPERTY_WHITE_POINT
7210
7211```
7212static const char* OHOS_IMAGE_PROPERTY_WHITE_POINT = "WhitePoint"
7213```
7214
7215**Description**
7216
7217Chromaticity of the white point of the image.
7218
7219**Since**: 12
7220
7221
7222### OHOS_IMAGE_PROPERTY_X_IN_ORIGINAL
7223
7224```
7225static const char *OHOS_IMAGE_PROPERTY_X_IN_ORIGINAL = "XInOriginal"
7226```
7227
7228**Description**
7229
7230X coordinate of the upper left corner of the fragment map in the original image.
7231
7232**Since**: 13
7233
7234
7235### OHOS_IMAGE_PROPERTY_X_RESOLUTION
7236
7237```
7238static const char* OHOS_IMAGE_PROPERTY_X_RESOLUTION = "XResolution"
7239```
7240
7241**Description**
7242
7243Number of pixels per ResolutionUnit in the image width (X) direction.
7244
7245**Since**: 12
7246
7247
7248### OHOS_IMAGE_PROPERTY_Y_IN_ORIGINAL
7249
7250```
7251static const char *OHOS_IMAGE_PROPERTY_Y_IN_ORIGINAL = "YInOriginal"
7252```
7253
7254**Description**
7255
7256Y coordinate of the upper left corner of the fragment map in the original image.
7257
7258**Since**: 13
7259
7260
7261### OHOS_IMAGE_PROPERTY_Y_RESOLUTION
7262
7263```
7264static const char* OHOS_IMAGE_PROPERTY_Y_RESOLUTION = "YResolution"
7265```
7266
7267**Description**
7268
7269Number of pixels per ResolutionUnit in the image height (Y) direction.
7270
7271**Since**: 12
7272
7273
7274### OHOS_IMAGE_PROPERTY_YCBCR_COEFFICIENTS
7275
7276```
7277static const char* OHOS_IMAGE_PROPERTY_YCBCR_COEFFICIENTS = "YCbCrCoefficients"
7278```
7279
7280**Description**
7281
7282Transformation from RGB to YCbCr image data.
7283
7284**Since**: 12
7285
7286
7287### OHOS_IMAGE_PROPERTY_YCBCR_POSITIONING
7288
7289```
7290static const char* OHOS_IMAGE_PROPERTY_YCBCR_POSITIONING = "YCbCrPositioning"
7291```
7292
7293**Description**
7294
7295Positioning of subsampled chrominance components relative to luminance samples.
7296
7297**Since**: 12
7298
7299
7300### OHOS_IMAGE_PROPERTY_YCBCR_SUB_SAMPLING
7301
7302```
7303static const char* OHOS_IMAGE_PROPERTY_YCBCR_SUB_SAMPLING = "YCbCrSubSampling"
7304```
7305
7306**Description**
7307
7308Subsampling factors used for the chrominance components of a YCbCr image.
7309
7310**Since**: 12
7311