1e41f4b71Sopenharmony_ci# Introduction to the Image_NativeModule Structs
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThis topic describes certain structs provided by the Image_NativeModule module. For details about other structs, see the [API Reference](../../reference/apis-image-kit/_image___native_module.md#structs).
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci## OH_ImageNative Struct
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciOH_ImageNative is the image object struct encapsulated at the native layer. The struct cannot be directly operated. Instead, its fields must be operated by calling functions. The table below describes the content and operation mode of the OH_ImageNative struct.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
10e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
11e41f4b71Sopenharmony_ci| Image_Size| imageSize | Image size.|[OH_ImageNative_GetImageSize](../../reference/apis-image-kit/_image___native_module.md#oh_imagenative_getimagesize) | Obtains the image size of an **OH_ImageNative** object.|
12e41f4b71Sopenharmony_ci| uint32_t | types |Component type.|[OH_ImageNative_GetComponentTypes](../../reference/apis-image-kit/_image___native_module.md#oh_imagenative_getcomponenttypes) | Obtains the component types of an **OH_ImageNative** object.|
13e41f4b71Sopenharmony_ci| OH_NativeBuffer | nativeBuffer | Component buffer.|[OH_ImageNative_GetByteBuffer](../../reference/apis-image-kit/_image___native_module.md#oh_imagenative_getbytebuffer) | Obtains the buffer corresponding to a component type in an **OH_ImageNative** object.|
14e41f4b71Sopenharmony_ci| size_t | bufferSize | Buffer size.| [OH_ImageNative_GetBufferSize](../../reference/apis-image-kit/_image___native_module.md#oh_imagenative_getbuffersize) | Obtains the size of the buffer corresponding to a component type in an **OH_ImageNative** object.|
15e41f4b71Sopenharmony_ci| int32_t | rowStride | Row stride.| [OH_ImageNative_GetRowStride](../../reference/apis-image-kit/_image___native_module.md#oh_imagenative_getrowstride) | Obtains the row stride corresponding to a component type in an **OH_ImageNative** object.|
16e41f4b71Sopenharmony_ci| int32_t | pixelStride | Pixel stride.| [OH_ImageNative_GetPixelStride](../../reference/apis-image-kit/_image___native_module.md#oh_imagenative_getpixelstride) | Obtains the pixel stride corresponding to a component type in an **OH_ImageNative** object.|
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ciYou can run [OH_ImageNative_Release](../../reference/apis-image-kit/_image___native_module.md#oh_imagenative_release) to release an **OH_ImageNative** object.
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci## OH_ImagePackerNative Struct
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ciOH_ImagePackerNative is the image packer struct encapsulated at the native layer. The struct cannot be directly operated. Instead, its fields must be operated by calling functions. The table below describes the content and operation mode of the OH_ImagePackerNative struct.
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
25e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
26e41f4b71Sopenharmony_ci| OH_ImageSourceNative | imageSource | Image source.| [OH_ImagePackerNative_PackToDataFromImageSource](../../reference/apis-image-kit/_image___native_module.md#oh_imagepackernative_packtodatafromimagesource) | Encodes an image source into data in a given format.|
27e41f4b71Sopenharmony_ci|OH_PixelmapNative | pixelmap | Pixel map at the native layer.| [OH_ImagePackerNative_PackToDataFromPixelmap](../../reference/apis-image-kit/_image___native_module.md#oh_imagepackernative_packtodatafrompixelmap) | Encodes a pixel map into data in a given format.|
28e41f4b71Sopenharmony_ci|int32_t | imagesourceFd | File descriptor of an image source.| [OH_ImagePackerNative_PackToFileFromImageSource](../../reference/apis-image-kit/_image___native_module.md#oh_imagepackernative_packtofilefromimagesource) | Encodes an image source into a file.|
29e41f4b71Sopenharmony_ci|int32_t | pixelmapFd | File descriptor of a pixel map.| [OH_ImagePackerNative_PackToFileFromPixelmap](../../reference/apis-image-kit/_image___native_module.md#oh_imagepackernative_packtofilefrompixelmap) | Encodes a pixel map into a file.|
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ciYou can run [OH_ImagePackerNative_Create](../../reference/apis-image-kit/_image___native_module.md#oh_imagepackernative_create) to create an **OH_ImagePackerNative** object.
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ciYou can run [OH_ImagePackerNative_Release](../../reference/apis-image-kit/_image___native_module.md#oh_imagepackernative_release) to release an **OH_ImagePackerNative** object.
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci## OH_PackingOptions Struct
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ciOH_PackingOptions is the image packing option struct encapsulated at the native layer. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ciYou can run [OH_PackingOptions_Create](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_create) to create an **OH_PackingOptions** object.
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ciYou can run [OH_PackingOptions_Release](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_release) to release an **OH_PackingOptions** object.
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_PackingOptions struct.
44e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
45e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
46e41f4b71Sopenharmony_ci| Image_MimeType | mimeType | MIME type.| [OH_PackingOptions_GetMimeType](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_getmimetype) | Obtains the MIME type.|
47e41f4b71Sopenharmony_ci| Image_MimeType | mimeType | MIME type.| [OH_PackingOptions_SetMimeType](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_setmimetype) | Sets the MIME type.|
48e41f4b71Sopenharmony_ci| uint32_t | quality | Encoding quality.| [OH_PackingOptions_GetQuality](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_getquality) | Obtains the encoding quality.|
49e41f4b71Sopenharmony_ci| uint32_t | quality | Encoding quality.| [OH_PackingOptions_SetQuality](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_setquality) | Sets the encoding quality.|
50e41f4b71Sopenharmony_ci| int32_t | desiredDynamicRange | Desired dynamic range.| [OH_PackingOptions_GetDesiredDynamicRange](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_getdesireddynamicrange) | Obtains the desired dynamic range during encoding.|
51e41f4b71Sopenharmony_ci| int32_t | desiredDynamicRange | Desired dynamic range.| [OH_PackingOptions_SetDesiredDynamicRange](../../reference/apis-image-kit/_image___native_module.md#oh_packingoptions_setdesireddynamicrange) | Sets the desired dynamic range during encoding.|
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci## OH_ImageReceiverNative Struct
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ciOH_ImageReceiverNative is the image receiver struct encapsulated at the native layer. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_ciYou can run [OH_ImageReceiverNative_Create](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_create) to create an **OH_ImageReceiverNative** object.
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ciYou can run [OH_ImageReceiverNative_Release](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_release) to release an **OH_ImageReceiverNative** object.
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_ImageReceiverNative struct.
62e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
63e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
64e41f4b71Sopenharmony_ci| uint64_t | surfaceId | Surface ID of the receiver.| [OH_ImageReceiverNative_GetReceivingSurfaceId](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_getreceivingsurfaceid) |Obtains the receiver ID of an **OH_ImageReceiverNative** object.|
65e41f4b71Sopenharmony_ci| OH_ImageNative | image | Image at the native layer.| [OH_ImageReceiverNative_ReadLatestImage](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_readlatestimage) | Obtains the latest image through an **OH_ImageReceiverNative** object.|
66e41f4b71Sopenharmony_ci| OH_ImageNative | image | Image at the native layer.| [OH_ImageReceiverNative_ReadNextImage](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_readnextimage) |Obtains the next image through an **OH_ImageReceiverNative** object.|
67e41f4b71Sopenharmony_ci| OH_ImageReceiver_OnCallback | callback| Callback function of the image receiver.| [OH_ImageReceiverNative_On](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_on) |Registers an **OH_ImageReceiver_OnCallback**.|
68e41f4b71Sopenharmony_ci| OH_ImageReceiver_OnCallback | callback| Callback function of the image receiver.| [OH_ImageReceiverNative_Off](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_off) |Unregisters an **OH_ImageReceiver_OnCallback**.|
69e41f4b71Sopenharmony_ci| Image_Size | size | Size of an image receiver.| [OH_ImageReceiverNative_GetSize](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_getsize) |Obtains the size of an **OH_ImageReceiverNative**.|
70e41f4b71Sopenharmony_ci|int32_t | capacity| Capacity of an image receiver.| [OH_ImageReceiverNative_GetCapacity](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceivernative_getcapacity) |Obtains the capacity of an **OH_ImageReceiverNative**.|
71e41f4b71Sopenharmony_ci
72e41f4b71Sopenharmony_ci## OH_ImageReceiverOptions Struct
73e41f4b71Sopenharmony_ci
74e41f4b71Sopenharmony_ciOH_ImageReceiverOptions is the image receiver option struct encapsulated at the native layer. This struct is used to transfer parameters for creating an **OH_ImageReceiverNative** object.
75e41f4b71Sopenharmony_ciThe struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_ciYou can run [OH_ImageReceiverOptions_Create](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceiveroptions_create) to create an **OH_ImageReceiverOptions** object.
78e41f4b71Sopenharmony_ci
79e41f4b71Sopenharmony_ciYou can run [OH_ImageReceiverOptions_Release](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceiveroptions_release) to release an **OH_ImageReceiverOptions** object.
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_ImageReceiverOptions struct.
82e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
83e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
84e41f4b71Sopenharmony_ci| Image_Size | size | Image size.| [OH_ImageReceiverOptions_GetSize](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceiveroptions_getsize)	|Obtains the image size of an **OH_ImageReceiverOptions** object.|
85e41f4b71Sopenharmony_ci| Image_Size | size | Image size.| [OH_ImageReceiverOptions_SetSize](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceiveroptions_setsize)	|Sets the image size for an **OH_ImageReceiverOptions** object.|
86e41f4b71Sopenharmony_ci| int32_t | capacity | Capacity of the image buffer.| [OH_ImageReceiverOptions_GetCapacity](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceiveroptions_getcapacity)	|Obtains the capacity of an **OH_ImageReceiverOptions** object.|
87e41f4b71Sopenharmony_ci| int32_t | capacity | Capacity of the image buffer.| [OH_ImageReceiverOptions_SetCapacity](../../reference/apis-image-kit/_image___native_module.md#oh_imagereceiveroptions_setcapacity)	|Sets the capacity for an **OH_ImageReceiverOptions** object.|
88e41f4b71Sopenharmony_ci
89e41f4b71Sopenharmony_ci## OH_ImageSourceNative Struct
90e41f4b71Sopenharmony_ci
91e41f4b71Sopenharmony_ciOH_ImageSourceNative is the image source struct encapsulated at the native layer and is used to create image data. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
92e41f4b71Sopenharmony_ci
93e41f4b71Sopenharmony_ciYou can create an **OH_ImageSourceNative** object in multiple ways, as described below.
94e41f4b71Sopenharmony_ci| Function| Description|
95e41f4b71Sopenharmony_ci| -------- | -------- |
96e41f4b71Sopenharmony_ci| [OH_ImageSourceNative_CreateFromUri](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_createfromuri)	|Creates an **OH_ImageSourceNative** object based on a URI.|
97e41f4b71Sopenharmony_ci| [OH_ImageSourceNative_CreateFromFd](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_createfromfd)	|Creates an **OH_ImageSourceNative** object based on a file descriptor.|
98e41f4b71Sopenharmony_ci| [OH_ImageSourceNative_CreateFromData](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_createfromdata)	|Creates an **OH_ImageSourceNative** object based on buffer data.|
99e41f4b71Sopenharmony_ci| [OH_ImageSourceNative_CreateFromRawFile](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_createfromrawfile)	|Creates an **OH_ImageSourceNative** object by using the raw file descriptor of an image resource file.|
100e41f4b71Sopenharmony_ci| [OH_ImageSourceNative_CreatePixelmap](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_createpixelmap)	|Creates an **OH_PixelmapNative** object based on image decoding parameters.|
101e41f4b71Sopenharmony_ci| [OH_ImageSourceNative_CreatePixelmapList](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_createpixelmaplist)	|Creates an array of **OH_PixelmapNative** objects based on image decoding parameters.|
102e41f4b71Sopenharmony_ci
103e41f4b71Sopenharmony_ciYou can run [OH_ImageSourceNative_Release](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_release) to release an **OH_ImageSourceNative** object.
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_ImageSourceNative struct.
106e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
107e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
108e41f4b71Sopenharmony_ci| int32_t | delayTimeList | Image delay time list.| [OH_ImageSourceNative_GetDelayTimeList](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_getdelaytimelist)	|Obtains the image delay time list.|
109e41f4b71Sopenharmony_ci| OH_ImageSource_Info | info | Image source information.| [OH_ImageSourceNative_GetImageInfo](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_getimageinfo)	|Obtains the information about an image with a given index.|
110e41f4b71Sopenharmony_ci| Image_String | value | Configuration item.| [OH_ImageSourceNative_GetImageProperty](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_getimageproperty)	|Obtains the value of an image property.|
111e41f4b71Sopenharmony_ci| Image_String | value | Configuration item.| [OH_ImageSourceNative_ModifyImageProperty](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_modifyimageproperty)	|Modifies the value of an image property.|
112e41f4b71Sopenharmony_ci| uint32_t | frameCount | Number of frames| [OH_ImageSourceNative_GetFrameCount](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_getframecount)	|Obtains the number of image frames.|
113e41f4b71Sopenharmony_ci
114e41f4b71Sopenharmony_ci## OH_ImageSource_Info Struct
115e41f4b71Sopenharmony_ci
116e41f4b71Sopenharmony_ciOH_ImageSource_Info is the image source information struct encapsulated at the native layer. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
117e41f4b71Sopenharmony_ci
118e41f4b71Sopenharmony_ciYou can run [OH_ImageSourceInfo_Create](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourceinfo_create) to create an **OH_ImageSource_Info** object.
119e41f4b71Sopenharmony_ci
120e41f4b71Sopenharmony_ciYou can run [OH_ImageSourceInfo_Release](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourceinfo_release) to release an **OH_ImageSource_Info** object.
121e41f4b71Sopenharmony_ci
122e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_ImageSource_Info struct.
123e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
124e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
125e41f4b71Sopenharmony_ci| uint32_t | width | Image width.| [OH_ImageSourceInfo_GetWidth](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourceinfo_getwidth)	|Obtains the image width.|
126e41f4b71Sopenharmony_ci| uint32_t | height | Image height.| [OH_ImageSourceInfo_GetHeight](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourceinfo_getheight)	|Obtains the image height.|
127e41f4b71Sopenharmony_ci| bool | isHdr | Dynamic range.| [OH_ImageSourceInfo_GetDynamicRange](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourceinfo_getdynamicrange)	|Obtains the dynamic range of an image.|
128e41f4b71Sopenharmony_ci
129e41f4b71Sopenharmony_ci## OH_DecodingOptions Struct
130e41f4b71Sopenharmony_ci
131e41f4b71Sopenharmony_ciOH_DecodingOptions is the decoding options struct encapsulated at the native layer. This struct is used to set decoding options and is passed in as an input parameter for creating a pixel map. For details, see [OH_ImageSourceNative_CreatePixelmap](../../reference/apis-image-kit/_image___native_module.md#oh_imagesourcenative_createpixelmap).
132e41f4b71Sopenharmony_ci
133e41f4b71Sopenharmony_ciThe struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
134e41f4b71Sopenharmony_ci
135e41f4b71Sopenharmony_ciYou can run [OH_DecodingOptions_Create](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_create) to create an **OH_DecodingOptions** object.
136e41f4b71Sopenharmony_ci
137e41f4b71Sopenharmony_ciYou can run [OH_DecodingOptions_Release](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_release) to release an **OH_DecodingOptions** object.
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_DecodingOptions struct.
140e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
141e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
142e41f4b71Sopenharmony_ci| int32_t | pixelFormat | Pixel format.| [OH_DecodingOptions_GetPixelFormat](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_getpixelformat)	|Obtains the pixel format.|
143e41f4b71Sopenharmony_ci| int32_t | pixelFormat | Pixel format.| [OH_DecodingOptions_SetPixelFormat](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_setpixelformat)	| Sets the pixel format.|
144e41f4b71Sopenharmony_ci| uint32_t | index | Index of the image to decode.| [OH_DecodingOptions_GetIndex](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_getindex)	| Obtains the index of an image.|
145e41f4b71Sopenharmony_ci| uint32_t | index | Index of the image to decode.| [OH_DecodingOptions_SetIndex](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_setindex)	| Sets the index for an image.|
146e41f4b71Sopenharmony_ci| float | rotate | Rotation angle.| [OH_DecodingOptions_GetRotate](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_getrotate)	| Obtains the rotation degree.|
147e41f4b71Sopenharmony_ci| float | rotate | Rotation angle.| [OH_DecodingOptions_SetRotate](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_setrotate)	| Sets the rotation angle.|
148e41f4b71Sopenharmony_ci| Image_Size | desiredSize | Desired output size.| [OH_DecodingOptions_GetDesiredSize](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_getdesiredsize)	| Obtains the desired output size.|
149e41f4b71Sopenharmony_ci| Image_Size | desiredSize | Desired output size.| [OH_DecodingOptions_SetDesiredSize](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_setdesiredsize)	| Sets the desired output size.|
150e41f4b71Sopenharmony_ci| Image_Region | desiredRegion | Region to decode.| [OH_DecodingOptions_GetDesiredRegion](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_getdesiredregion) | Obtains the region to decode.|
151e41f4b71Sopenharmony_ci| Image_Region | desiredRegion | Region to decode.| [OH_DecodingOptions_SetDesiredRegion](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_setdesiredregion) | Sets the region to decode.|
152e41f4b71Sopenharmony_ci| int32_t | desiredDynamicRange | Desired dynamic range.| [OH_DecodingOptions_GetDesiredDynamicRange](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_getdesireddynamicrange)	|Obtains the desired dynamic range configured during decoding.|
153e41f4b71Sopenharmony_ci| int32_t | desiredDynamicRange | Desired dynamic range.| [OH_DecodingOptions_SetDesiredDynamicRange](../../reference/apis-image-kit/_image___native_module.md#oh_decodingoptions_setdesireddynamicrange)|Sets the desired dynamic range during decoding.|
154e41f4b71Sopenharmony_ci
155e41f4b71Sopenharmony_ci## OH_PixelmapNative Struct
156e41f4b71Sopenharmony_ci
157e41f4b71Sopenharmony_ciOH_PixelmapNative is an uncompressed pixel map format struct encapsulated at the native layer after images are decoded.
158e41f4b71Sopenharmony_ci
159e41f4b71Sopenharmony_ciYou can run [OH_PixelmapNative_CreatePixelmap](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_createpixelmap) to create an **OH_PixelmapNative** object. By default, the BGRA_8888 format is used to process data.
160e41f4b71Sopenharmony_ci
161e41f4b71Sopenharmony_ciYou can run [OH_PixelmapNative_Release](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_release) to release an **OH_PixelmapNative** object.
162e41f4b71Sopenharmony_ci
163e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_PixelmapNative struct.
164e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
165e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
166e41f4b71Sopenharmony_ci| uint8_t | data | Image pixel data.| [OH_PixelmapNative_ReadPixels](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_readpixels)	| Reads the image pixel data and writes the data to an ArrayBuffer.|
167e41f4b71Sopenharmony_ci| uint8_t | data | Image pixel data.| [OH_PixelmapNative_WritePixels](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_writepixels)	| Reads the image pixel data in the buffer and writes the data to a pixel map.|
168e41f4b71Sopenharmony_ci| OH_Pixelmap_ImageInfo | imageInfo | Image information.| [OH_PixelmapNative_GetImageInfo](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_getimageinfo)	| Obtains the image information.|
169e41f4b71Sopenharmony_ci| float | alphaRate | Opacity rate.| [OH_PixelmapNative_Opacity](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_opacity)	| Sets the opacity rate to enable the pixel map to achieve the corresponding opacity effect.|
170e41f4b71Sopenharmony_ci|float, float, | scaleX, scaleY | Scale ratios along the X axis and Y axis, respectively.|[OH_PixelmapNative_Scale](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_scale)	| Scales an image based on a given width and height.|
171e41f4b71Sopenharmony_ci| float, float| x, y | Distances to translate along the X axis and Y axis, respectively.| [OH_PixelmapNative_Translate](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_translate)	| Translates an image based on given coordinates.|
172e41f4b71Sopenharmony_ci| float | angle | Rotation angle.|[OH_PixelmapNative_Rotate](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_rotate) | Rotates an image based on a given angle.|
173e41f4b71Sopenharmony_ci| bool, bool | shouldFilpHorizontally, shouldFilpVertically | Whether to flip horizontally or vertically| [OH_PixelmapNative_Flip](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_flip)	| Flips an image based on a given angle.|
174e41f4b71Sopenharmony_ci| Image_Region | region | Cropping region.| [OH_PixelmapNative_Crop](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapnative_crop)	| Crops an image based on a given size.|
175e41f4b71Sopenharmony_ci
176e41f4b71Sopenharmony_ci## OH_Pixelmap_InitializationOptions Struct
177e41f4b71Sopenharmony_ci
178e41f4b71Sopenharmony_ciOH_Pixelmap_InitializationOptions is the initialization option struct encapsulated at the native layer. It is used to set the initialization parameters for a pixel map.
179e41f4b71Sopenharmony_ci
180e41f4b71Sopenharmony_ciYou can run [OH_PixelmapInitializationOptions_Create](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_create) to create an **OH_Pixelmap_InitializationOptions** object.
181e41f4b71Sopenharmony_ci
182e41f4b71Sopenharmony_ciYou can run [OH_PixelmapInitializationOptions_Release](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_release) to release an **OH_Pixelmap_InitializationOptions** object.
183e41f4b71Sopenharmony_ci
184e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_Pixelmap_InitializationOptions struct.
185e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
186e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
187e41f4b71Sopenharmony_ci| uint32_t | width | Image width.| [OH_PixelmapInitializationOptions_GetWidth](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_getwidth)	|Obtains the image width.|
188e41f4b71Sopenharmony_ci| uint32_t | width | Image width.| [OH_PixelmapInitializationOptions_SetWidth](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_setwidth)	|Sets the image width.|
189e41f4b71Sopenharmony_ci| uint32_t | height | Image height.| [OH_PixelmapInitializationOptions_GetHeight](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_getheight)	|Obtains the image height.|
190e41f4b71Sopenharmony_ci| uint32_t | height | Image height.| [OH_PixelmapInitializationOptions_SetHeight](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_setheight)	|Sets the image height.|
191e41f4b71Sopenharmony_ci| int32_t | pixelFormat | Pixel format.| [OH_PixelmapInitializationOptions_GetPixelFormat](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_getpixelformat)	|Obtains the pixel format.|
192e41f4b71Sopenharmony_ci| int32_t | pixelFormat | Pixel format.| [OH_PixelmapInitializationOptions_SetPixelFormat](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_setpixelformat)	|Sets the pixel format.|
193e41f4b71Sopenharmony_ci| int32_t | alphaType | Alpha type.| [OH_PixelmapInitializationOptions_GetAlphaType](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_getalphatype)	|Obtains the alpha type.|
194e41f4b71Sopenharmony_ci| int32_t | alphaType | Alpha type.| [OH_PixelmapInitializationOptions_SetAlphaType](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapinitializationoptions_setalphatype)	|Sets the alpha type.|
195e41f4b71Sopenharmony_ci
196e41f4b71Sopenharmony_ci## OH_Pixelmap_ImageInfo Struct
197e41f4b71Sopenharmony_ci
198e41f4b71Sopenharmony_ciOH_Pixelmap_ImageInfo is the image information struct encapsulated at the native layer. It stores the width, height, row stride, pixel format, and HDR of an image.
199e41f4b71Sopenharmony_ci
200e41f4b71Sopenharmony_ciYou can run [OH_PixelmapImageInfo_Create](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_create) to create an **OH_Pixelmap_ImageInfo** object.
201e41f4b71Sopenharmony_ci
202e41f4b71Sopenharmony_ciYou can run [OH_PixelmapImageInfo_Release](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_release) to release an **OH_Pixelmap_ImageInfo** object.
203e41f4b71Sopenharmony_ci
204e41f4b71Sopenharmony_ciThe table below describes the content and operation mode of the OH_Pixelmap_ImageInfo struct.
205e41f4b71Sopenharmony_ci| Field Type| Field Name| Field Description|Operation Function| Function Description|
206e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
207e41f4b71Sopenharmony_ci| uint32_t | width | Image width.| [OH_PixelmapImageInfo_GetWidth](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_getwidth)	| Obtains the image width.|
208e41f4b71Sopenharmony_ci| uint32_t | height | Image height.| [OH_PixelmapImageInfo_GetHeight](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_getheight)	| Obtains the image height.|
209e41f4b71Sopenharmony_ci| uint32_t | rowStride | Row stride.| [OH_PixelmapImageInfo_GetRowStride](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_getrowstride)	| Obtains the row stride.|
210e41f4b71Sopenharmony_ci| int32_t | pixelFormat| Pixel format.| [OH_PixelmapImageInfo_GetPixelFormat](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_getpixelformat)	|Obtains the pixel format.|
211e41f4b71Sopenharmony_ci| int32_t | alphaType | Alpha type.| [OH_PixelmapImageInfo_GetAlphaType](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_getalphatype)	|Obtains the alpha type.|
212e41f4b71Sopenharmony_ci| bool | isHdr | Dynamic range.| [OH_PixelmapImageInfo_GetDynamicRange](../../reference/apis-image-kit/_image___native_module.md#oh_pixelmapimageinfo_getdynamicrange)	|Obtains the dynamic range of a pixel map.|
213