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