Skip to main content

ohos_image_native_sys/
lib.rs

1/* automatically generated by rust-bindgen 0.65.1 */
2
3#![allow(non_snake_case)]
4#![allow(non_upper_case_globals)]
5#![allow(non_camel_case_types)]
6#![allow(clippy::missing_safety_doc)]
7
8use napi_sys_ohos::*;
9use ohos_native_buffer_sys::*;
10use ohos_resource_manager_sys::*;
11
12#[link(name = "image_ndk.z")]
13#[link(name = "image_packer_ndk.z")]
14#[link(name = "pixelmap_ndk.z")]
15#[link(name = "image_receiver_ndk.z")]
16#[link(name = "image_source_ndk.z")]
17#[link(name = "image_source")]
18#[link(name = "pixelmap")]
19unsafe extern "C" {}
20
21#[repr(C)]
22#[derive(Default)]
23pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
24impl<T> __IncompleteArrayField<T> {
25    #[inline]
26    pub const fn new() -> Self {
27        __IncompleteArrayField(::std::marker::PhantomData, [])
28    }
29    #[inline]
30    pub fn as_ptr(&self) -> *const T {
31        self as *const _ as *const T
32    }
33    #[inline]
34    pub fn as_mut_ptr(&mut self) -> *mut T {
35        self as *mut _ as *mut T
36    }
37    #[inline]
38    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
39        ::std::slice::from_raw_parts(self.as_ptr(), len)
40    }
41    #[inline]
42    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
43        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
44    }
45}
46impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
47    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
48        fmt.write_str("__IncompleteArrayField")
49    }
50}
51#[doc = " @brief Defines the image size.\n\n @since 12"]
52#[repr(C)]
53#[derive(Debug, Copy, Clone)]
54pub struct Image_Size {
55    #[doc = " Image width, in pixels."]
56    pub width: u32,
57    #[doc = " Image height, in pixels."]
58    pub height: u32,
59}
60#[doc = " @brief Defines the region of the image source to decode.\n\n @since 12"]
61#[repr(C)]
62#[derive(Debug, Copy, Clone)]
63pub struct Image_Region {
64    #[doc = " X coordinate of the start point, in pixels."]
65    pub x: u32,
66    #[doc = " Y coordinate of the start point, in pixels."]
67    pub y: u32,
68    #[doc = " Width of the region, in pixels."]
69    pub width: u32,
70    #[doc = " Height of the region, in pixels."]
71    pub height: u32,
72}
73#[doc = " @brief Defines the area of the image pixels to read or write.\n\n @since 22"]
74#[cfg(feature = "api-22")]
75#[repr(C)]
76#[derive(Debug, Copy, Clone)]
77pub struct Image_PositionArea {
78    #[doc = " Image pixels data that will be read or written."]
79    pub pixels: *mut u8,
80    #[doc = " Length of the image pixels data."]
81    pub pixelsSize: usize,
82    #[doc = " Offset for data reading or writing."]
83    pub offset: u32,
84    #[doc = " Number of bytes per row of the region."]
85    pub stride: u32,
86    #[doc = " Region to read or write."]
87    pub region: Image_Region,
88}
89#[doc = " @brief Defines the image scale ratio.\n\n @since 22"]
90#[cfg(feature = "api-22")]
91#[repr(C)]
92#[derive(Debug, Copy, Clone)]
93pub struct Image_Scale {
94    #[doc = " Scale ratio on the x-axis."]
95    pub x: f32,
96    #[doc = " Scale ratio on the y-axis."]
97    pub y: f32,
98}
99#[doc = " @brief Defines the region of the image source to decode.\n\n @since 12"]
100#[repr(C)]
101#[derive(Debug, Copy, Clone)]
102pub struct Image_String {
103    #[doc = " data for string type"]
104    pub data: *mut ::std::os::raw::c_char,
105    #[doc = " data lenth for string type"]
106    pub size: usize,
107}
108#[doc = " @brief Define a PictureMetadata struct type, used for picture metadata.\n\n @since 13"]
109#[cfg(feature = "api-13")]
110#[repr(C)]
111#[derive(Debug, Copy, Clone)]
112pub struct OH_PictureMetadata {
113    _unused: [u8; 0],
114}
115#[doc = " @brief Defines the image encode format.\n\n @since 12"]
116pub type Image_MimeType = Image_String;
117#[doc = " operation success"]
118pub const Image_ErrorCode_IMAGE_SUCCESS: Image_ErrorCode = 0;
119#[doc = " invalid parameter"]
120pub const Image_ErrorCode_IMAGE_BAD_PARAMETER: Image_ErrorCode = 401;
121#[doc = " unsupported mime type"]
122pub const Image_ErrorCode_IMAGE_UNSUPPORTED_MIME_TYPE: Image_ErrorCode = 7600101;
123#[doc = " unknown mime type"]
124pub const Image_ErrorCode_IMAGE_UNKNOWN_MIME_TYPE: Image_ErrorCode = 7600102;
125#[doc = " too large data or image"]
126pub const Image_ErrorCode_IMAGE_TOO_LARGE: Image_ErrorCode = 7600103;
127#[doc = " @error Failed to get image data.\n @since 23"]
128#[cfg(feature = "api-23")]
129pub const Image_ErrorCode_IMAGE_GET_IMAGE_DATA_FAILED: Image_ErrorCode = 7600104;
130#[doc = " @error DMA memory does not exist"]
131pub const Image_ErrorCode_IMAGE_DMA_NOT_EXIST: Image_ErrorCode = 7600173;
132#[doc = " @error DMA operation failed"]
133pub const Image_ErrorCode_IMAGE_DMA_OPERATION_FAILED: Image_ErrorCode = 7600174;
134#[doc = " unsupported operations"]
135pub const Image_ErrorCode_IMAGE_UNSUPPORTED_OPERATION: Image_ErrorCode = 7600201;
136#[doc = " unsupported metadata"]
137pub const Image_ErrorCode_IMAGE_UNSUPPORTED_METADATA: Image_ErrorCode = 7600202;
138#[doc = " unsupported conversion"]
139pub const Image_ErrorCode_IMAGE_UNSUPPORTED_CONVERSION: Image_ErrorCode = 7600203;
140#[doc = " invalid region"]
141pub const Image_ErrorCode_IMAGE_INVALID_REGION: Image_ErrorCode = 7600204;
142#[doc = " @error unsupported memory format\n @since 13"]
143#[cfg(feature = "api-13")]
144pub const Image_ErrorCode_IMAGE_UNSUPPORTED_MEMORY_FORMAT: Image_ErrorCode = 7600205;
145#[doc = " @error Invalid parameter.\n @since 19"]
146#[cfg(feature = "api-19")]
147pub const Image_ErrorCode_IMAGE_INVALID_PARAMETER: Image_ErrorCode = 7600206;
148#[doc = " @error Unsupported data format\n @since 22"]
149#[cfg(feature = "api-22")]
150pub const Image_ErrorCode_IMAGE_UNSUPPORTED_DATA_FORMAT: Image_ErrorCode = 7600207;
151#[doc = " failed to allocate memory"]
152pub const Image_ErrorCode_IMAGE_ALLOC_FAILED: Image_ErrorCode = 7600301;
153#[doc = " memory copy failed"]
154pub const Image_ErrorCode_IMAGE_COPY_FAILED: Image_ErrorCode = 7600302;
155#[doc = " @error memory lock or unlock failed\n @since 15"]
156#[cfg(feature = "api-15")]
157pub const Image_ErrorCode_IMAGE_LOCK_UNLOCK_FAILED: Image_ErrorCode = 7600303;
158#[doc = " @error Initialization failed\n @since 22"]
159#[cfg(feature = "api-22")]
160pub const Image_ErrorCode_IMAGE_INIT_FAILED: Image_ErrorCode = 7600304;
161#[doc = " @error Create PixelMap failed\n @since 22"]
162#[cfg(feature = "api-22")]
163pub const Image_ErrorCode_IMAGE_CREATE_PIXELMAP_FAILED: Image_ErrorCode = 7600305;
164#[doc = " @error unsupported allocator mode, e.g., use share memory to create a HDR image as only\n DMA supported hdr metadata.\n @since 20"]
165#[cfg(feature = "api-20")]
166pub const Image_ErrorCode_IMAGE_ALLOCATOR_MODE_UNSUPPORTED: Image_ErrorCode = 7600501;
167#[doc = " unknown error"]
168pub const Image_ErrorCode_IMAGE_UNKNOWN_ERROR: Image_ErrorCode = 7600901;
169#[doc = " decode data source exception"]
170pub const Image_ErrorCode_IMAGE_BAD_SOURCE: Image_ErrorCode = 7700101;
171#[doc = " @error unsupported mime type\n @since 15"]
172#[cfg(feature = "api-15")]
173pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE: Image_ErrorCode = 7700102;
174#[doc = " @error image to large\n @since 15"]
175#[cfg(feature = "api-15")]
176pub const Image_ErrorCode_IMAGE_SOURCE_TOO_LARGE: Image_ErrorCode = 7700103;
177#[doc = " @error unsupported allocator type, e.g., use share memory to decode a HDR image as only\n DMA supported hdr metadata.\n @since 15"]
178#[cfg(feature = "api-15")]
179pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE: Image_ErrorCode = 7700201;
180#[doc = " @error Unsupported metadata. For example, the property key is not supported,\n     or the property value is invalid.\n @since 23"]
181#[cfg(feature = "api-23")]
182pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_METADATA: Image_ErrorCode = 7700202;
183pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_OPTIONS: Image_ErrorCode = 7700203;
184#[doc = " @error Invalid parameter.\n @since 19"]
185#[cfg(feature = "api-19")]
186pub const Image_ErrorCode_IMAGE_SOURCE_INVALID_PARAMETER: Image_ErrorCode = 7700204;
187#[doc = " decode failed"]
188pub const Image_ErrorCode_IMAGE_DECODE_FAILED: Image_ErrorCode = 7700301;
189#[doc = " @error memory allocation failed\n @since 15"]
190#[cfg(feature = "api-15")]
191pub const Image_ErrorCode_IMAGE_SOURCE_ALLOC_FAILED: Image_ErrorCode = 7700302;
192#[doc = " @error Invalid parameter for ImagePacker.\n @since 19"]
193#[cfg(feature = "api-19")]
194pub const Image_ErrorCode_IMAGE_PACKER_INVALID_PARAMETER: Image_ErrorCode = 7800202;
195#[doc = " encode failed"]
196pub const Image_ErrorCode_IMAGE_ENCODE_FAILED: Image_ErrorCode = 7800301;
197#[doc = " @error Invalid parameter for ImageReceiver.\n @since 20"]
198#[cfg(feature = "api-20")]
199pub const Image_ErrorCode_IMAGE_RECEIVER_INVALID_PARAMETER: Image_ErrorCode = 7900201;
200#[doc = " @brief Enumerates the return values that may be used by the interface.\n\n @since 12"]
201pub type Image_ErrorCode = u32;
202#[doc = " EXIF metadata."]
203#[cfg(feature = "api-13")]
204pub const Image_MetadataType_EXIF_METADATA: Image_MetadataType = 1;
205#[doc = " Fragment metadata."]
206#[cfg(feature = "api-13")]
207pub const Image_MetadataType_FRAGMENT_METADATA: Image_MetadataType = 2;
208#[doc = " Metadata of a GIF image.\n\n @since 20"]
209#[cfg(feature = "api-20")]
210pub const Image_MetadataType_GIF_METADATA: Image_MetadataType = 5;
211#[doc = " @brief Define the metadata type.\n\n @since 13"]
212#[cfg(feature = "api-13")]
213pub type Image_MetadataType = u32;
214#[doc = " The system determines which memory to use to create the PixelMap.\n\n @since 20"]
215#[cfg(feature = "api-20")]
216pub const IMAGE_ALLOCATOR_MODE_IMAGE_ALLOCATOR_MODE_AUTO: IMAGE_ALLOCATOR_MODE = 0;
217#[doc = " Use DMA buffer to create the PixelMap.\n\n @since 20"]
218#[cfg(feature = "api-20")]
219pub const IMAGE_ALLOCATOR_MODE_IMAGE_ALLOCATOR_MODE_DMA: IMAGE_ALLOCATOR_MODE = 1;
220#[doc = " Use share memory to create the PixelMap.\n\n @since 20"]
221#[cfg(feature = "api-20")]
222pub const IMAGE_ALLOCATOR_MODE_IMAGE_ALLOCATOR_MODE_SHARED_MEMORY: IMAGE_ALLOCATOR_MODE = 2;
223#[doc = " @brief Type of allocator used to allocate memory of a PixelMap.\n\n @since 20"]
224#[cfg(feature = "api-20")]
225pub type IMAGE_ALLOCATOR_MODE = u32;
226extern "C" {
227    #[doc = " @brief Creates a <b>PictureMetadata</b> object.\n\n @param metadataType The type of metadata.\n @param metadata The PictureMetadata pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr.\n @since 13"]
228    #[cfg(feature = "api-13")]
229    pub fn OH_PictureMetadata_Create(
230        metadataType: Image_MetadataType,
231        metadata: *mut *mut OH_PictureMetadata,
232    ) -> Image_ErrorCode;
233}
234extern "C" {
235    #[doc = " @brief Obtains the property of picture metadata.\n\n @param metadata The PictureMetadata pointer will be operated.\n @param key The property's key.\n @param value The property's value.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr, or key is nullptr, or value is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\n @since 13"]
236    #[cfg(feature = "api-13")]
237    pub fn OH_PictureMetadata_GetProperty(
238        metadata: *mut OH_PictureMetadata,
239        key: *mut Image_String,
240        value: *mut Image_String,
241    ) -> Image_ErrorCode;
242}
243extern "C" {
244    #[doc = " @brief Set picture metadata property.\n\n @param metadata The PictureMetadata pointer will be operated.\n @param key The property's key.\n @param value The property's value.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr, or key is nullptr, or value is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\n @since 13"]
245    #[cfg(feature = "api-13")]
246    pub fn OH_PictureMetadata_SetProperty(
247        metadata: *mut OH_PictureMetadata,
248        key: *mut Image_String,
249        value: *mut Image_String,
250    ) -> Image_ErrorCode;
251}
252extern "C" {
253    #[doc = " @brief Obtains the property of picture metadata. The output value.data is null-terminated.\n\n @param metadata Pointer to OH_PictureMetadata.\n @param key Pointer to property's key.\n @param value Pointer to property's value. Output parameter.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_INVALID_PARAMETER} metadata is nullptr, or key is nullptr, or value is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\n @since 19"]
254    #[cfg(feature = "api-19")]
255    pub fn OH_PictureMetadata_GetPropertyWithNull(
256        metadata: *mut OH_PictureMetadata,
257        key: *mut Image_String,
258        value: *mut Image_String,
259    ) -> Image_ErrorCode;
260}
261extern "C" {
262    #[doc = " @brief Releases this PictureMetadata object.\n\n @param metadata The PictureMetadata pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr.\n @since 13"]
263    #[cfg(feature = "api-13")]
264    pub fn OH_PictureMetadata_Release(metadata: *mut OH_PictureMetadata) -> Image_ErrorCode;
265}
266extern "C" {
267    #[doc = " @brief Obtains a clone of metadata.\n\n @param oldMetadata The PictureMetadata pointer will be operated.\n @param newMetadata The PictureMetadata pointer will be cloned.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr.\n         {@link IMAGE_ALLOC_FAILED} memory alloc failed.\n         {@link IMAGE_COPY_FAILED} memory copy failed.\n @since 13"]
268    #[cfg(feature = "api-13")]
269    pub fn OH_PictureMetadata_Clone(
270        oldMetadata: *mut OH_PictureMetadata,
271        newMetadata: *mut *mut OH_PictureMetadata,
272    ) -> Image_ErrorCode;
273}
274#[repr(C)]
275#[derive(Debug, Copy, Clone)]
276pub struct OHIPCParcel {
277    _unused: [u8; 0],
278}
279#[doc = " if rects is nullptr, fill the Buffer dirty size by default"]
280#[repr(C)]
281#[derive(Debug, Copy, Clone)]
282pub struct Region_Rect {
283    pub x: i32,
284    pub y: i32,
285    pub w: u32,
286    pub h: u32,
287}
288#[doc = " the window content is not updated until a buffer of\n the window size is received"]
289pub const OHScalingMode_OH_SCALING_MODE_FREEZE: OHScalingMode = 0;
290#[doc = " the buffer is scaled in two dimensions to match the window size"]
291pub const OHScalingMode_OH_SCALING_MODE_SCALE_TO_WINDOW: OHScalingMode = 1;
292#[doc = " the buffer is uniformly scaled so that the smaller size of\n the buffer matches the window size"]
293pub const OHScalingMode_OH_SCALING_MODE_SCALE_CROP: OHScalingMode = 2;
294#[doc = " the window is clipped to the size of the buffer's clipping rectangle\n pixels outside the clipping rectangle are considered fully transparent."]
295pub const OHScalingMode_OH_SCALING_MODE_NO_SCALE_CROP: OHScalingMode = 3;
296#[doc = " @brief Indicates Scaling Mode.\n @since 9\n @deprecated since 10\n @useinstead OHScalingModeV2"]
297pub type OHScalingMode = u32;
298#[doc = " the window content is not updated until a buffer of\n the window size is received"]
299pub const OHScalingModeV2_OH_SCALING_MODE_FREEZE_V2: OHScalingModeV2 = 0;
300#[doc = " the buffer is scaled in two dimensions to match the window size"]
301pub const OHScalingModeV2_OH_SCALING_MODE_SCALE_TO_WINDOW_V2: OHScalingModeV2 = 1;
302#[doc = " the buffer is uniformly scaled so that the smaller size of\n the buffer matches the window size"]
303pub const OHScalingModeV2_OH_SCALING_MODE_SCALE_CROP_V2: OHScalingModeV2 = 2;
304#[doc = " the window is clipped to the size of the buffer's clipping rectangle\n pixels outside the clipping rectangle are considered fully transparent."]
305pub const OHScalingModeV2_OH_SCALING_MODE_NO_SCALE_CROP_V2: OHScalingModeV2 = 3;
306#[doc = " Adapt to the buffer and scale proportionally to the buffer size. Prioritize displaying all buffer content.\n If the size is not the same as the window size, fill the unfilled area of the window with a background color."]
307pub const OHScalingModeV2_OH_SCALING_MODE_SCALE_FIT_V2: OHScalingModeV2 = 4;
308#[doc = " @brief Indicates Scaling Mode.\n @since 12"]
309pub type OHScalingModeV2 = u32;
310pub const OHHDRMetadataKey_OH_METAKEY_RED_PRIMARY_X: OHHDRMetadataKey = 0;
311pub const OHHDRMetadataKey_OH_METAKEY_RED_PRIMARY_Y: OHHDRMetadataKey = 1;
312pub const OHHDRMetadataKey_OH_METAKEY_GREEN_PRIMARY_X: OHHDRMetadataKey = 2;
313pub const OHHDRMetadataKey_OH_METAKEY_GREEN_PRIMARY_Y: OHHDRMetadataKey = 3;
314pub const OHHDRMetadataKey_OH_METAKEY_BLUE_PRIMARY_X: OHHDRMetadataKey = 4;
315pub const OHHDRMetadataKey_OH_METAKEY_BLUE_PRIMARY_Y: OHHDRMetadataKey = 5;
316pub const OHHDRMetadataKey_OH_METAKEY_WHITE_PRIMARY_X: OHHDRMetadataKey = 6;
317pub const OHHDRMetadataKey_OH_METAKEY_WHITE_PRIMARY_Y: OHHDRMetadataKey = 7;
318pub const OHHDRMetadataKey_OH_METAKEY_MAX_LUMINANCE: OHHDRMetadataKey = 8;
319pub const OHHDRMetadataKey_OH_METAKEY_MIN_LUMINANCE: OHHDRMetadataKey = 9;
320pub const OHHDRMetadataKey_OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL: OHHDRMetadataKey = 10;
321pub const OHHDRMetadataKey_OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL: OHHDRMetadataKey = 11;
322pub const OHHDRMetadataKey_OH_METAKEY_HDR10_PLUS: OHHDRMetadataKey = 12;
323pub const OHHDRMetadataKey_OH_METAKEY_HDR_VIVID: OHHDRMetadataKey = 13;
324#[doc = " @brief Enumerates the HDR metadata keys.\n @since 9\n @deprecated since 10"]
325pub type OHHDRMetadataKey = u32;
326#[doc = " @brief Defines the HDR metadata.\n @since 9\n @deprecated since 10"]
327#[repr(C)]
328#[derive(Debug, Copy, Clone)]
329pub struct OHHDRMetaData {
330    pub key: OHHDRMetadataKey,
331    pub value: f32,
332}
333#[doc = " @brief Defines the ExtData Handle\n @since 9\n @deprecated since 10"]
334#[repr(C)]
335#[derive(Debug)]
336pub struct OHExtDataHandle {
337    pub fd: i32,
338    pub reserveInts: u32,
339    pub reserve: __IncompleteArrayField<i32>,
340}
341#[doc = " @brief Defines an <b>OH_ImageNative</b> object.\n\n @since 12"]
342#[repr(C)]
343#[derive(Debug, Copy, Clone)]
344pub struct OH_ImageNative {
345    _unused: [u8; 0],
346}
347#[doc = " @brief Defines the image buffer data.\n\n @since 23"]
348#[cfg(feature = "api-23")]
349#[repr(C)]
350#[derive(Debug, Copy, Clone)]
351pub struct OH_ImageBufferData {
352    #[doc = " rowStride of each component."]
353    pub rowStride: *mut i32,
354    #[doc = " pixelStride of each component."]
355    pub pixelStride: *mut i32,
356    #[doc = " number of strides."]
357    pub numStride: i32,
358    #[doc = " byte length of the buffer"]
359    pub bufferSize: usize,
360    #[doc = " native buffer of the image."]
361    pub nativeBuffer: *mut OH_NativeBuffer,
362}
363extern "C" {
364    #[doc = " @brief Obtains {@link Image_Size} of an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param size Indicates the pointer to the {@link Image_Size} object obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n @since 12"]
365    pub fn OH_ImageNative_GetImageSize(
366        image: *mut OH_ImageNative,
367        size: *mut Image_Size,
368    ) -> Image_ErrorCode;
369}
370extern "C" {
371    #[doc = " @brief Get type arry from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param types Indicates the pointer to an {@link OH_ImageNative} component arry obtained.\n @param typeSize Indicates the pointer to the {@link OH_ImageNative} component arry size obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
372    pub fn OH_ImageNative_GetComponentTypes(
373        image: *mut OH_ImageNative,
374        types: *mut *mut u32,
375        typeSize: *mut usize,
376    ) -> Image_ErrorCode;
377}
378extern "C" {
379    #[doc = " @brief Get byte buffer from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param nativeBuffer Indicates the pointer to the component buffer obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
380    pub fn OH_ImageNative_GetByteBuffer(
381        image: *mut OH_ImageNative,
382        componentType: u32,
383        nativeBuffer: *mut *mut OH_NativeBuffer,
384    ) -> Image_ErrorCode;
385}
386extern "C" {
387    #[doc = " @brief Get size of buffer from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param size Indicates the pointer to the size of buffer obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
388    pub fn OH_ImageNative_GetBufferSize(
389        image: *mut OH_ImageNative,
390        componentType: u32,
391        size: *mut usize,
392    ) -> Image_ErrorCode;
393}
394extern "C" {
395    #[doc = " @brief Get row stride from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param rowStride Indicates the pointer to the row stride obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
396    pub fn OH_ImageNative_GetRowStride(
397        image: *mut OH_ImageNative,
398        componentType: u32,
399        rowStride: *mut i32,
400    ) -> Image_ErrorCode;
401}
402extern "C" {
403    #[doc = " @brief Get pixel stride from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param pixelStride Indicates the pointer to the pixel stride obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
404    pub fn OH_ImageNative_GetPixelStride(
405        image: *mut OH_ImageNative,
406        componentType: u32,
407        pixelStride: *mut i32,
408    ) -> Image_ErrorCode;
409}
410extern "C" {
411    #[doc = " @brief Get timestamp from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param timestamp Indicates the pointer to the timestamp obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} if the input parameter is invalid.\n @since 12"]
412    pub fn OH_ImageNative_GetTimestamp(
413        image: *mut OH_ImageNative,
414        timestamp: *mut i64,
415    ) -> Image_ErrorCode;
416}
417extern "C" {
418    #[doc = " @brief Releases an {@link OH_ImageNative} object.\n It is used to release the object {@link OH_ImageNative}.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
419    pub fn OH_ImageNative_Release(image: *mut OH_ImageNative) -> Image_ErrorCode;
420}
421extern "C" {
422    #[doc = " @brief Obtains the color space from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param colorSpaceName Indicates the pointer to the obtained color space name, see {@link ColorSpaceName}.\n @return Returns one of the following result codes:\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@link IMAGE_BAD_PARAMETER} if bad parameter.\n @since 23"]
423    #[cfg(feature = "api-23")]
424    pub fn OH_ImageNative_GetColorSpace(
425        image: *mut OH_ImageNative,
426        colorSpaceName: *mut i32,
427    ) -> Image_ErrorCode;
428}
429extern "C" {
430    #[doc = " @brief Obtains the image format from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param format Indicates the pointer to the obtained image format.\n @return Returns one of the following result codes:\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@link IMAGE_BAD_PARAMETER} if bad parameter.\n @since 23"]
431    #[cfg(feature = "api-23")]
432    pub fn OH_ImageNative_GetFormat(
433        image: *mut OH_ImageNative,
434        format: *mut OH_NativeBuffer_Format,
435    ) -> Image_ErrorCode;
436}
437extern "C" {
438    #[doc = " @brief Obtains the image buffer data from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param imageBufferData Indicates the pointer to the obtained image buffer data.\n @return Returns one of the following result codes:\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@link IMAGE_BAD_PARAMETER} if bad parameter.\n @since 23"]
439    #[cfg(feature = "api-23")]
440    pub fn OH_ImageNative_GetBufferData(
441        image: *mut OH_ImageNative,
442        imageBufferData: *mut OH_ImageBufferData,
443    ) -> Image_ErrorCode;
444}
445#[doc = " @brief Define a Pixelmap struct type, used for pixelmap pointer controls.\n\n @since 12"]
446#[repr(C)]
447#[derive(Debug, Copy, Clone)]
448pub struct OH_PixelmapNative {
449    _unused: [u8; 0],
450}
451#[repr(C)]
452#[derive(Debug, Copy, Clone)]
453pub struct OH_NativeColorSpaceManager {
454    _unused: [u8; 0],
455}
456pub const PIXEL_FORMAT_PIXEL_FORMAT_UNKNOWN: PIXEL_FORMAT = 0;
457pub const PIXEL_FORMAT_PIXEL_FORMAT_RGB_565: PIXEL_FORMAT = 2;
458pub const PIXEL_FORMAT_PIXEL_FORMAT_RGBA_8888: PIXEL_FORMAT = 3;
459pub const PIXEL_FORMAT_PIXEL_FORMAT_BGRA_8888: PIXEL_FORMAT = 4;
460pub const PIXEL_FORMAT_PIXEL_FORMAT_RGB_888: PIXEL_FORMAT = 5;
461pub const PIXEL_FORMAT_PIXEL_FORMAT_ALPHA_8: PIXEL_FORMAT = 6;
462pub const PIXEL_FORMAT_PIXEL_FORMAT_RGBA_F16: PIXEL_FORMAT = 7;
463pub const PIXEL_FORMAT_PIXEL_FORMAT_NV21: PIXEL_FORMAT = 8;
464pub const PIXEL_FORMAT_PIXEL_FORMAT_NV12: PIXEL_FORMAT = 9;
465pub const PIXEL_FORMAT_PIXEL_FORMAT_RGBA_1010102: PIXEL_FORMAT = 10;
466pub const PIXEL_FORMAT_PIXEL_FORMAT_YCBCR_P010: PIXEL_FORMAT = 11;
467pub const PIXEL_FORMAT_PIXEL_FORMAT_YCRCB_P010: PIXEL_FORMAT = 12;
468pub type PIXEL_FORMAT = u32;
469#[doc = " Nearest-neighbor interpolation algorithm"]
470pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_NONE:
471    OH_PixelmapNative_AntiAliasingLevel = 0;
472#[doc = " Bilinear interpolation algorithm"]
473pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_LOW:
474    OH_PixelmapNative_AntiAliasingLevel = 1;
475#[doc = " Bilinear interpolation algorithm with mipmap linear filtering"]
476pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_MEDIUM:
477    OH_PixelmapNative_AntiAliasingLevel = 2;
478#[doc = " Cubic interpolation algorithm"]
479pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_HIGH:
480    OH_PixelmapNative_AntiAliasingLevel = 3;
481#[doc = " @brief Defines the anti-aliasing level.\n\n @since 12"]
482pub type OH_PixelmapNative_AntiAliasingLevel = u32;
483#[doc = " Indicate the types of metadata that image needs to use."]
484pub const OH_Pixelmap_HdrMetadataKey_HDR_METADATA_TYPE: OH_Pixelmap_HdrMetadataKey = 0;
485#[doc = " Static metadata key."]
486pub const OH_Pixelmap_HdrMetadataKey_HDR_STATIC_METADATA: OH_Pixelmap_HdrMetadataKey = 1;
487#[doc = " Dynamic metadata key."]
488pub const OH_Pixelmap_HdrMetadataKey_HDR_DYNAMIC_METADATA: OH_Pixelmap_HdrMetadataKey = 2;
489#[doc = " Gainmap metadata key."]
490pub const OH_Pixelmap_HdrMetadataKey_HDR_GAINMAP_METADATA: OH_Pixelmap_HdrMetadataKey = 3;
491#[doc = " @brief Enumerates the HDR metadata types that need to be stored in Pixelmap.\n\n @since 12"]
492pub type OH_Pixelmap_HdrMetadataKey = u32;
493#[doc = " No metadata."]
494pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_NONE: OH_Pixelmap_HdrMetadataType = 0;
495#[doc = " Indicates that metadata will be used for the base image."]
496pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_BASE: OH_Pixelmap_HdrMetadataType = 1;
497#[doc = " Indicates that metadata will be used for the gainmap image."]
498pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_GAINMAP: OH_Pixelmap_HdrMetadataType = 2;
499#[doc = " Indicates that metadata will be used for the alternate image."]
500pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_ALTERNATE: OH_Pixelmap_HdrMetadataType = 3;
501#[doc = " @brief Value for HDR_METADATA_TYPE.\n\n @since 12"]
502pub type OH_Pixelmap_HdrMetadataType = u32;
503#[doc = " @brief Value for HDR_STATIC_METADATA.\n\n @since 12"]
504#[repr(C)]
505#[derive(Debug, Copy, Clone)]
506pub struct OH_Pixelmap_HdrStaticMetadata {
507    #[doc = " The X-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b."]
508    pub displayPrimariesX: [f32; 3usize],
509    #[doc = " The Y-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b."]
510    pub displayPrimariesY: [f32; 3usize],
511    #[doc = " The X-coordinate of the white point value."]
512    pub whitePointX: f32,
513    #[doc = " The Y-coordinate of the white point value."]
514    pub whitePointY: f32,
515    #[doc = " Max luminance."]
516    pub maxLuminance: f32,
517    #[doc = " Min luminance."]
518    pub minLuminance: f32,
519    #[doc = " Maximum brightness of displayed content."]
520    pub maxContentLightLevel: f32,
521    #[doc = " Maximum average brightness of displayed content."]
522    pub maxFrameAverageLightLevel: f32,
523}
524#[doc = " @brief Value for HDR_DYNAMIC_METADATA.\n\n @since 12"]
525#[repr(C)]
526#[derive(Debug, Copy, Clone)]
527pub struct OH_Pixelmap_HdrDynamicMetadata {
528    #[doc = " The value of dynamic metadata."]
529    pub data: *mut u8,
530    #[doc = " The length of dynamic metadata."]
531    pub length: u32,
532}
533#[doc = " @brief Value for HDR_GAINMAP_METADATA.\n\n @since 12"]
534#[repr(C)]
535#[derive(Debug, Copy, Clone)]
536pub struct OH_Pixelmap_HdrGainmapMetadata {
537    #[doc = " The version used by the writer."]
538    pub writerVersion: u16,
539    #[doc = " The minimum version a parser needs to understand."]
540    pub miniVersion: u16,
541    #[doc = " The number of gain map channels, with a value of 1 or 3."]
542    pub gainmapChannelNum: u8,
543    #[doc = " Indicate whether to use the color space of the base image."]
544    pub useBaseColorFlag: bool,
545    #[doc = " The baseline hdr headroom."]
546    pub baseHeadroom: f32,
547    #[doc = " The alternate hdr headroom."]
548    pub alternateHeadroom: f32,
549    #[doc = " The per-component max gain map values."]
550    pub gainmapMax: [f32; 3usize],
551    #[doc = " The per-component min gain map values."]
552    pub gainmapMin: [f32; 3usize],
553    #[doc = " The per-component gamma values."]
554    pub gamma: [f32; 3usize],
555    #[doc = " The per-component baseline offset."]
556    pub baselineOffset: [f32; 3usize],
557    #[doc = " The per-component alternate offset."]
558    pub alternateOffset: [f32; 3usize],
559}
560#[doc = " @brief Value for HDR_METADATA_KEY. Corresponding relationship with HDR_METADATA_KEY.\n\n @since 12"]
561#[repr(C)]
562#[derive(Debug, Copy, Clone)]
563pub struct OH_Pixelmap_HdrMetadataValue {
564    #[doc = " The value corresponding to the HDR_METADATA_TYPE key"]
565    pub type_: OH_Pixelmap_HdrMetadataType,
566    #[doc = " The value corresponding to the HDR_STATIC_METADATA key"]
567    pub staticMetadata: OH_Pixelmap_HdrStaticMetadata,
568    #[doc = " The value corresponding to the HDR_DYNAMIC_METADATA key"]
569    pub dynamicMetadata: OH_Pixelmap_HdrDynamicMetadata,
570    #[doc = " The value corresponding to the HDR_GAINMAP_METADATA key"]
571    pub gainmapMetadata: OH_Pixelmap_HdrGainmapMetadata,
572}
573#[doc = " @brief Defines the options used for creating a pixel map.\n\n @since 12"]
574#[repr(C)]
575#[derive(Debug, Copy, Clone)]
576pub struct OH_Pixelmap_InitializationOptions {
577    _unused: [u8; 0],
578}
579extern "C" {
580    #[doc = " @brief Create a for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter is nullptr or\n         create OH_Pixelmap_InitializationOptions object failed.\n @since 12"]
581    pub fn OH_PixelmapInitializationOptions_Create(
582        options: *mut *mut OH_Pixelmap_InitializationOptions,
583    ) -> Image_ErrorCode;
584}
585extern "C" {
586    #[doc = " @brief Get width number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param width the number of image width.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or width is null.\n @since 12"]
587    pub fn OH_PixelmapInitializationOptions_GetWidth(
588        options: *mut OH_Pixelmap_InitializationOptions,
589        width: *mut u32,
590    ) -> Image_ErrorCode;
591}
592extern "C" {
593    #[doc = " @brief Set width number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param width the number of image width.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
594    pub fn OH_PixelmapInitializationOptions_SetWidth(
595        options: *mut OH_Pixelmap_InitializationOptions,
596        width: u32,
597    ) -> Image_ErrorCode;
598}
599extern "C" {
600    #[doc = " @brief Get height number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param height the number of image height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or height is null.\n @since 12"]
601    pub fn OH_PixelmapInitializationOptions_GetHeight(
602        options: *mut OH_Pixelmap_InitializationOptions,
603        height: *mut u32,
604    ) -> Image_ErrorCode;
605}
606extern "C" {
607    #[doc = " @brief Set height number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param height the number of image height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
608    pub fn OH_PixelmapInitializationOptions_SetHeight(
609        options: *mut OH_Pixelmap_InitializationOptions,
610        height: u32,
611    ) -> Image_ErrorCode;
612}
613extern "C" {
614    #[doc = " @brief Get pixelFormat number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or pixelFormat is null.\n @since 12"]
615    pub fn OH_PixelmapInitializationOptions_GetPixelFormat(
616        options: *mut OH_Pixelmap_InitializationOptions,
617        pixelFormat: *mut i32,
618    ) -> Image_ErrorCode;
619}
620extern "C" {
621    #[doc = " @brief Set pixelFormat number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
622    pub fn OH_PixelmapInitializationOptions_SetPixelFormat(
623        options: *mut OH_Pixelmap_InitializationOptions,
624        pixelFormat: i32,
625    ) -> Image_ErrorCode;
626}
627extern "C" {
628    #[doc = " @brief Get pixelFormat number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param srcpixelFormat the number of image srcpixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or srcpixelFormat is null.\n @since 12"]
629    pub fn OH_PixelmapInitializationOptions_GetSrcPixelFormat(
630        options: *mut OH_Pixelmap_InitializationOptions,
631        srcpixelFormat: *mut i32,
632    ) -> Image_ErrorCode;
633}
634extern "C" {
635    #[doc = " @brief Set pixelFormat number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param srcpixelFormat the number of image srcpixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
636    pub fn OH_PixelmapInitializationOptions_SetSrcPixelFormat(
637        options: *mut OH_Pixelmap_InitializationOptions,
638        srcpixelFormat: i32,
639    ) -> Image_ErrorCode;
640}
641extern "C" {
642    #[doc = " @brief Get rowStride for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param rowStride the rowStride of image buffer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if rowStride is null.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error, maybe options is released.\n @since 12"]
643    pub fn OH_PixelmapInitializationOptions_GetRowStride(
644        options: *mut OH_Pixelmap_InitializationOptions,
645        rowStride: *mut i32,
646    ) -> Image_ErrorCode;
647}
648extern "C" {
649    #[doc = " @brief Set rowStride number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param rowStride the rowStride of image buffer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if rowStride does not match width.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error, maybe options is released.\n @since 12"]
650    pub fn OH_PixelmapInitializationOptions_SetRowStride(
651        options: *mut OH_Pixelmap_InitializationOptions,
652        rowStride: i32,
653    ) -> Image_ErrorCode;
654}
655extern "C" {
656    #[doc = " @brief Get alphaType number for InitializationOtions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param alphaType the number of image alphaType.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or alphaType is null.\n @since 12"]
657    pub fn OH_PixelmapInitializationOptions_GetAlphaType(
658        options: *mut OH_Pixelmap_InitializationOptions,
659        alphaType: *mut i32,
660    ) -> Image_ErrorCode;
661}
662extern "C" {
663    #[doc = " @brief Set alphaType number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param alphaType the number of image alphaType.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
664    pub fn OH_PixelmapInitializationOptions_SetAlphaType(
665        options: *mut OH_Pixelmap_InitializationOptions,
666        alphaType: i32,
667    ) -> Image_ErrorCode;
668}
669extern "C" {
670    #[doc = " @brief Get editable for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param editable The boolean value representing the editable status.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if options or editable is invalid.\n @since 18"]
671    #[cfg(feature = "api-18")]
672    pub fn OH_PixelmapInitializationOptions_GetEditable(
673        options: *mut OH_Pixelmap_InitializationOptions,
674        editable: *mut bool,
675    ) -> Image_ErrorCode;
676}
677extern "C" {
678    #[doc = " @brief Set editable for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param editable The boolean value representing the editable status.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if options is invalid.\n @since 18"]
679    #[cfg(feature = "api-18")]
680    pub fn OH_PixelmapInitializationOptions_SetEditable(
681        options: *mut OH_Pixelmap_InitializationOptions,
682        editable: bool,
683    ) -> Image_ErrorCode;
684}
685extern "C" {
686    #[doc = " @brief delete InitializationOtions pointer.\n\n @param options The InitializationOtions pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
687    pub fn OH_PixelmapInitializationOptions_Release(
688        options: *mut OH_Pixelmap_InitializationOptions,
689    ) -> Image_ErrorCode;
690}
691#[doc = " @brief Defines the pixel map information.\n\n @since 12"]
692#[repr(C)]
693#[derive(Debug, Copy, Clone)]
694pub struct OH_Pixelmap_ImageInfo {
695    _unused: [u8; 0],
696}
697extern "C" {
698    #[doc = " @brief Create imageinfo struct  .\n\n @param info The imageinfo pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter is nullptr or\n         create OH_Pixelmap_ImageInfo object failed.\n @since 12"]
699    pub fn OH_PixelmapImageInfo_Create(info: *mut *mut OH_Pixelmap_ImageInfo) -> Image_ErrorCode;
700}
701extern "C" {
702    #[doc = " @brief Get width number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param width The number of imageinfo width.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or width is null.\n @since 12"]
703    pub fn OH_PixelmapImageInfo_GetWidth(
704        info: *mut OH_Pixelmap_ImageInfo,
705        width: *mut u32,
706    ) -> Image_ErrorCode;
707}
708extern "C" {
709    #[doc = " @brief Get height number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param height The number of imageinfo height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or height is null.\n @since 12"]
710    pub fn OH_PixelmapImageInfo_GetHeight(
711        info: *mut OH_Pixelmap_ImageInfo,
712        height: *mut u32,
713    ) -> Image_ErrorCode;
714}
715extern "C" {
716    #[doc = " @brief Get alphaMode number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param alphaMode The number of imageinfo alphaMode.\n @return Image functions result code.\n     {@link IMAGE_SUCCESS} if the execution is successful.\n     {@link IMAGE_BAD_PARAMETER} info is nullptr, or alphaMode is nullptr.\n @since 20"]
717    #[cfg(feature = "api-20")]
718    pub fn OH_PixelmapImageInfo_GetAlphaMode(
719        info: *mut OH_Pixelmap_ImageInfo,
720        alphaMode: *mut i32,
721    ) -> Image_ErrorCode;
722}
723extern "C" {
724    #[doc = " @brief Get rowStride number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param rowStride The number of imageinfo rowStride.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or rowStride is null.\n @since 12"]
725    pub fn OH_PixelmapImageInfo_GetRowStride(
726        info: *mut OH_Pixelmap_ImageInfo,
727        rowStride: *mut u32,
728    ) -> Image_ErrorCode;
729}
730extern "C" {
731    #[doc = " @brief Get pixelFormat number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param pixelFormat The number of imageinfo pixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or pixelFormat is null.\n @since 12"]
732    pub fn OH_PixelmapImageInfo_GetPixelFormat(
733        info: *mut OH_Pixelmap_ImageInfo,
734        pixelFormat: *mut i32,
735    ) -> Image_ErrorCode;
736}
737extern "C" {
738    #[doc = " @brief Get alphaType number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param alphaType The number of imageinfo alphaType.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or alphaType is null.\n @since 12"]
739    pub fn OH_PixelmapImageInfo_GetAlphaType(
740        info: *mut OH_Pixelmap_ImageInfo,
741        alphaType: *mut i32,
742    ) -> Image_ErrorCode;
743}
744extern "C" {
745    #[doc = " @brief Get isHdr boolean for imageinfo struct.\n\n @param info The imageinfo pointer will be operated. Pointer connot be null.\n @param isHdr Whether the image has a high dynamic range.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or isHdr is null.\n @since 12"]
746    pub fn OH_PixelmapImageInfo_GetDynamicRange(
747        info: *mut OH_Pixelmap_ImageInfo,
748        isHdr: *mut bool,
749    ) -> Image_ErrorCode;
750}
751extern "C" {
752    #[doc = " @brief Delete imageinfo struct pointer.\n\n @param info The imageinfo pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info is null.\n @since 12"]
753    pub fn OH_PixelmapImageInfo_Release(info: *mut OH_Pixelmap_ImageInfo) -> Image_ErrorCode;
754}
755extern "C" {
756    #[doc = " @brief Creates a <b>PixelMap</b> object.\n\n @param data Color buffer in BGRA_8888 format.\n @param dataLength Color buffer size in BGRA_8888 format.\n @param options IPixel properties, including the alpha type, size, pixel format, and editable.\n @param pixelmap Pixelmap pointer for created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Possible causes:\n         if data or options is null or failed to create pixelmap due to invalid options.\n @since 12"]
757    pub fn OH_PixelmapNative_CreatePixelmap(
758        data: *mut u8,
759        dataLength: usize,
760        options: *mut OH_Pixelmap_InitializationOptions,
761        pixelmap: *mut *mut OH_PixelmapNative,
762    ) -> Image_ErrorCode;
763}
764extern "C" {
765    #[doc = " @brief Creates a pixelmap based on options {@link OH_Pixelmap_InitializationOptions}, the memory type used by the\n pixelmap can be specified by allocatorType {@link IMAGE_ALLOCATOR_MODE}. By default, the system selects the memory\n type based on the image type, image size, platform capability, etc. When processing the pixelmap returned by this\n interface, please always consider the impact of stride.\n\n @param data Input color buffer in BGRA_8888 format by default.\n @param dataLength Length of input buffer in bytes.\n @param options Pixelmap initialization properties including size, pixel format, alpha type, and editable flags.\n @param allocator Indicate which memory type will be used by the returned pixelmap.\n @param pixelmap Output parameter receiving the created pixelmap object pointer.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n         {@link IMAGE_TOO_LARGE} too large data or image.\n         {@link IMAGE_UNSUPPORTED_OPERATION} unsupported operations.\n         {@link IMAGE_DMA_OPERATION_FAILED} DMA operation failed.\n         {@link IMAGE_ALLOCATOR_MODE_UNSUPPORTED} unsupported allocator mode, e.g.,\n         use share memory to create a HDR image as only DMA supported hdr metadata.\n @since 20"]
766    #[cfg(feature = "api-20")]
767    pub fn OH_PixelmapNative_CreatePixelmapUsingAllocator(
768        data: *mut u8,
769        dataLength: usize,
770        options: *mut OH_Pixelmap_InitializationOptions,
771        allocator: IMAGE_ALLOCATOR_MODE,
772        pixelmap: *mut *mut OH_PixelmapNative,
773    ) -> Image_ErrorCode;
774}
775extern "C" {
776    #[doc = " @brief Convert a native <b>PixelMap</b> object to <b>PixelMap</b> napi object.\n\n @param env Indicates the NAPI environment pointer.\n @param pixelmapNative Indicates a pointer to the <b>PixelMap</b> object created at the native layer.\n @param pixelmapNapi the <b>PixelMap</b> pointer will be converted.\n @return Image functions result code.\n     {@link IMAGE_SUCCESS} if the execution is successful.\n     {@link IMAGE_BAD_PARAMETER} pixelmapNative is nullptr\n @since 12"]
777    pub fn OH_PixelmapNative_ConvertPixelmapNativeToNapi(
778        env: napi_env,
779        pixelmapNative: *mut OH_PixelmapNative,
780        pixelmapNapi: *mut napi_value,
781    ) -> Image_ErrorCode;
782}
783extern "C" {
784    #[doc = " @brief Convert a <b>PixelMap</b> napi object to native <b>PixelMap</b> object.\n\n @param env Indicates the NAPI environment pointer.\n @param pixelmapNapi Indicates napi <b>PixelMap</b> object.\n @param pixelmapNative Indicates native <b>PixelMap</b> pointer to created.\n @return Image functions result code.\n     {@link IMAGE_SUCCESS} if the execution is successful.\n     {@link IMAGE_BAD_PARAMETER} pixelmapNative is nullptr, or pixelmapNapi is not a PixelMap\n @since 12"]
785    pub fn OH_PixelmapNative_ConvertPixelmapNativeFromNapi(
786        env: napi_env,
787        pixelmapNapi: napi_value,
788        pixelmapNative: *mut *mut OH_PixelmapNative,
789    ) -> Image_ErrorCode;
790}
791extern "C" {
792    #[doc = " @brief Reads data of this pixel map to an Buffer. If this pixel map is created in the BGRA_8888 format,\n the data read is the same as the original data.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param destination Buffer to which the image pixel map data will be written.\n @param bufferSize Buffer size to which the image pixel map data will be written.\n @return Function result code:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} Parameter error. Possible causes:\n         1.Parameter is nullptr\n         2.pixelmap's inner pixelmap is nullptr.\n         3.Parameter bufferSize is less than the actual data size.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g.\n         memory copy failed or pixelmap's attributes are incorrect.\n @since 12"]
793    pub fn OH_PixelmapNative_ReadPixels(
794        pixelmap: *mut OH_PixelmapNative,
795        destination: *mut u8,
796        bufferSize: *mut usize,
797    ) -> Image_ErrorCode;
798}
799extern "C" {
800    #[doc = " @brief Reads image data in an Buffer and writes the data to a Pixelmap object.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param source Buffer from which the image data will be read.\n @param bufferSize Buffer size from which the image data will be read.\n @return Function result code:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} Parameter error. Possible causes:\n         1.Parameter is nullptr\n         2.pixelmap's inner pixelmap is nullptr.\n         3.Parameter bufferSize is less than the actual data size.\n         {@link IMAGE_UNSUPPORTED_OPERATION} If the pixelmap is not editable.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g.\n         memory copy failed or pixelmap's attributes are incorrect.\n @since 12"]
801    pub fn OH_PixelmapNative_WritePixels(
802        pixelmap: *mut OH_PixelmapNative,
803        source: *mut u8,
804        bufferSize: usize,
805    ) -> Image_ErrorCode;
806}
807extern "C" {
808    #[doc = " @brief Reads data from a certain area of the PixelMap to a buffer. The resulting data will be in BGRA_8888 format.\n\n @param pixelmap The PixelMap to be read.\n @param area Area of the PixelMap to read the data. Data will be read and copied into area->pixels.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or area is incorrect.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g. unsupported pixel format.\n @see OH_PixelmapNative\n @since 22"]
809    #[cfg(feature = "api-22")]
810    pub fn OH_PixelmapNative_ReadPixelsFromArea(
811        pixelmap: *mut OH_PixelmapNative,
812        area: *mut Image_PositionArea,
813    ) -> Image_ErrorCode;
814}
815extern "C" {
816    #[doc = " @brief Writes data from a buffer to a certain area of the PixelMap. The source data should be in BGRA_8888 format.\n\n @param pixelmap The PixelMap to be written.\n @param area Area of the PixelMap to write the data.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or area is incorrect.\n         {@link IMAGE_UNSUPPORTED_OPERATION} If the PixelMap is not editable.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g. unsupported pixel format.\n @see OH_PixelmapNative\n @since 22"]
817    #[cfg(feature = "api-22")]
818    pub fn OH_PixelmapNative_WritePixelsToArea(
819        pixelmap: *mut OH_PixelmapNative,
820        area: *mut Image_PositionArea,
821    ) -> Image_ErrorCode;
822}
823extern "C" {
824    #[doc = " @brief Get argb pixel buffer from pixelmap.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param destination Buffer to which the image pixel map data will be written.\n @param bufferSize Buffer size to which the image pixel map data will be written.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, destination and bufferSize are incorrect.\n         {@link IMAGE_UNSUPPORTED_CONVERSION} If format does not support conversion to argb or conversion failed.\n         {@link IMAGE_ALLOC_FAILED} If device has no memory.\n         {@link IMAGE_COPY_FAILED} If memory copy failed.\n @see OH_PixelmapNative\n @since 13"]
825    #[cfg(feature = "api-13")]
826    pub fn OH_PixelmapNative_GetArgbPixels(
827        pixelmap: *mut OH_PixelmapNative,
828        destination: *mut u8,
829        bufferSize: *mut usize,
830    ) -> Image_ErrorCode;
831}
832extern "C" {
833    #[doc = " @brief Convert {@link OH_PixelmapNative} to standard dynamic range.\n\n @param pixelmap The Pixelmap pointer will be operated. Pointer connot be null.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - Parameter error.Possible causes:Parameter verification failed.\n returns {@link Image_ErrorCode} IMAGE_UNSUPPORTED_OPERATION - Unsupported operation.Pixelmap can't be converted.\n @since 12"]
834    pub fn OH_PixelmapNative_ToSdr(pixelmap: *mut OH_PixelmapNative) -> Image_ErrorCode;
835}
836extern "C" {
837    #[doc = " @brief Obtains pixel map information of this image.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param imageInfo Indicates the pointer to the image information.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n         3.imageInfo is nullptr.\n @since 12"]
838    pub fn OH_PixelmapNative_GetImageInfo(
839        pixelmap: *mut OH_PixelmapNative,
840        imageInfo: *mut OH_Pixelmap_ImageInfo,
841    ) -> Image_ErrorCode;
842}
843extern "C" {
844    #[doc = " @brief Sets an opacity rate for this image pixel map.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param rate Opacity rate to set. The value ranges from 0 to 1.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
845    pub fn OH_PixelmapNative_Opacity(
846        pixelmap: *mut OH_PixelmapNative,
847        rate: f32,
848    ) -> Image_ErrorCode;
849}
850extern "C" {
851    #[doc = " @brief Scales this image based on the input width and height.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
852    pub fn OH_PixelmapNative_Scale(
853        pixelmap: *mut OH_PixelmapNative,
854        scaleX: f32,
855        scaleY: f32,
856    ) -> Image_ErrorCode;
857}
858extern "C" {
859    #[doc = " @brief Scales this image based on the input width and height with anti-aliasing.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @param level The anti-aliasing algorithm to be used.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, x and y are incorrect.\n returns {@link Image_ErrorCode} IMAGE_TOO_LARGE - if image is too large.\n returns {@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if device has no memory.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error, maybe source pixelmap is released.\n @see OH_PixelmapNative\n @since 12"]
860    pub fn OH_PixelmapNative_ScaleWithAntiAliasing(
861        pixelmap: *mut OH_PixelmapNative,
862        scaleX: f32,
863        scaleY: f32,
864        level: OH_PixelmapNative_AntiAliasingLevel,
865    ) -> Image_ErrorCode;
866}
867extern "C" {
868    #[doc = " @brief Create a scaled pixelmap based on the source pixelmap and the input width and height.\n\n @param srcPixelmap The source native pixelmap.\n @param dstPixelmap The destination native pixelmap for create.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n @see OH_PixelmapNative\n @since 18"]
869    #[cfg(feature = "api-18")]
870    pub fn OH_PixelmapNative_CreateScaledPixelMap(
871        srcPixelmap: *mut OH_PixelmapNative,
872        dstPixelmap: *mut *mut OH_PixelmapNative,
873        scaleX: f32,
874        scaleY: f32,
875    ) -> Image_ErrorCode;
876}
877extern "C" {
878    #[doc = " @brief Create a scaled pixelmap based on the source pixelmap and the input width and height with anti-aliasing.\n\n @param srcPixelmap The source native pixelmap.\n @param dstPixelmap The destination native pixelmap for create.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @param level The anti-aliasing algorithm to be used.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n         {@link IMAGE_TOO_LARGE} If image is too large.\n         {@link IMAGE_ALLOC_FAILED} If device has no memory.\n @see OH_PixelmapNative\n @since 18"]
879    #[cfg(feature = "api-18")]
880    pub fn OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing(
881        srcPixelmap: *mut OH_PixelmapNative,
882        dstPixelmap: *mut *mut OH_PixelmapNative,
883        scaleX: f32,
884        scaleY: f32,
885        level: OH_PixelmapNative_AntiAliasingLevel,
886    ) -> Image_ErrorCode;
887}
888extern "C" {
889    #[doc = " @brief Translates this image based on the input coordinates.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param x The distance to be translate in the X direction.\n @param y The distance to be translate in the Y direction.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
890    pub fn OH_PixelmapNative_Translate(
891        pixelmap: *mut OH_PixelmapNative,
892        x: f32,
893        y: f32,
894    ) -> Image_ErrorCode;
895}
896extern "C" {
897    #[doc = " @brief Creates a PixelMap with only alpha channel from the source PixelMap.\n\n @param srcPixelmap The source PixelMap.\n @param dstPixelmap The target PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. srcPixelmap or dstPixelmap is incorrect.\n @see OH_PixelmapNative\n @since 22"]
898    #[cfg(feature = "api-22")]
899    pub fn OH_PixelmapNative_CreateAlphaPixelmap(
900        srcPixelmap: *mut OH_PixelmapNative,
901        dstPixelmap: *mut *mut OH_PixelmapNative,
902    ) -> Image_ErrorCode;
903}
904extern "C" {
905    #[doc = " @brief Clones a PixelMap from the source PixelMap.\n\n @param srcPixelmap The source PixelMap to be cloned.\n @param dstPixelmap The target PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. srcPixelmap or dstPixelmap is incorrect.\n         {@link IMAGE_UNSUPPORTED_DATA_FORMAT} If the pixel format is unsupported.\n         {@link IMAGE_TOO_LARGE} If the PixelMap size is too large.\n         {@link IMAGE_INIT_FAILED} If the PixelMap initialization failed.\n         {@link IMAGE_ALLOC_FAILED} If the copying of PixelMap data failed.\n @see OH_PixelmapNative\n @since 22"]
906    #[cfg(feature = "api-22")]
907    pub fn OH_PixelmapNative_Clone(
908        srcPixelmap: *mut OH_PixelmapNative,
909        dstPixelmap: *mut *mut OH_PixelmapNative,
910    ) -> Image_ErrorCode;
911}
912extern "C" {
913    #[doc = " @brief Creates a cropped and then scaled PixelMap based on the source PixelMap.\n\n @param srcPixelmap The source PixelMap.\n @param region The crop region.\n @param scale The scale ratio of width and height.\n @param level The anti-aliasing algorithm to be used.\n @param dstPixelmap The target PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. srcPixelmap, region, scale, or dstPixelmap is\n                                     incorrect.\n         {@link IMAGE_UNSUPPORTED_DATA_FORMAT} If the pixel format is unsupported.\n         {@link IMAGE_TOO_LARGE} If the PixelMap size is too large.\n         {@link IMAGE_INIT_FAILED} If the PixelMap initialization failed.\n         {@link IMAGE_ALLOC_FAILED} If the copying of PixelMap data failed.\n @see OH_PixelmapNative\n @since 22"]
914    #[cfg(feature = "api-22")]
915    pub fn OH_PixelmapNative_CreateCroppedAndScaledPixelMap(
916        srcPixelmap: *mut OH_PixelmapNative,
917        region: *mut Image_Region,
918        scale: *mut Image_Scale,
919        level: OH_PixelmapNative_AntiAliasingLevel,
920        dstPixelmap: *mut *mut OH_PixelmapNative,
921    ) -> Image_ErrorCode;
922}
923extern "C" {
924    #[doc = " @brief Rotates this image based on the input angle.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param angle Angle to rotate.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
925    pub fn OH_PixelmapNative_Rotate(
926        pixelmap: *mut OH_PixelmapNative,
927        angle: f32,
928    ) -> Image_ErrorCode;
929}
930extern "C" {
931    #[doc = " @brief Flips this image horizontally or vertically, or both.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param shouldFlipHorizontally Whether to flip the image horizontally.\n @param shouldFlipVertically Whether to flip the image vertically.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
932    pub fn OH_PixelmapNative_Flip(
933        pixelmap: *mut OH_PixelmapNative,
934        shouldFlipHorizontally: bool,
935        shouldFlipVertically: bool,
936    ) -> Image_ErrorCode;
937}
938extern "C" {
939    #[doc = " @brief Crops this image based on the input size.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param region Area size, read according to area.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER}  - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.region is nullptr.\n         3.pixelmap's inner pixelmap is nullptr.\n @since 12"]
940    pub fn OH_PixelmapNative_Crop(
941        pixelmap: *mut OH_PixelmapNative,
942        region: *mut Image_Region,
943    ) -> Image_ErrorCode;
944}
945extern "C" {
946    #[doc = " @brief Releases an <b>OH_Pixelmap</b> object.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if either:\n         1.Pixelmap is nullptr.\n         2.It's inner pixelmap is nullptr.\n         3.Pixelmap is not allowed to release.\n @since 12"]
947    pub fn OH_PixelmapNative_Release(pixelmap: *mut OH_PixelmapNative) -> Image_ErrorCode;
948}
949extern "C" {
950    #[doc = " @brief Destroys an <b>OH_PixelmapNative</b> object and deallocates its resources.\n\n @param pixelmap A pointer to the OH_PixelmapNative pointer to destroy.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if pixelmap is null or *pixelmap is null.\n @since 18"]
951    #[cfg(feature = "api-18")]
952    pub fn OH_PixelmapNative_Destroy(pixelmap: *mut *mut OH_PixelmapNative) -> Image_ErrorCode;
953}
954extern "C" {
955    #[doc = " @brief Converting images to alpha format\n\n @param srcpixelmap The source pixel map pointer will be operated.\n @param dstpixelmap The destination pixel map pointer will be operated.\n @param isPremul Whether it is pre-multiplied, true for prediction, false for non-pre-multiplied.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if either:\n         1.srcpixelmap or dstpixelmap is null pointer.\n         2.Their inner pixelmap structures are unavailable.\n @since 12"]
956    pub fn OH_PixelmapNative_ConvertAlphaFormat(
957        srcpixelmap: *mut OH_PixelmapNative,
958        dstpixelmap: *mut OH_PixelmapNative,
959        isPremul: bool,
960    ) -> Image_ErrorCode;
961}
962extern "C" {
963    #[doc = " @brief Create a empty <b>PixelMap</b> object.\n\n @param options IPixel properties, including the alpha type, size, pixel format, and editable.\n @param pixelmap Pixelmap pointer for created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null or\n         failed to create pixelmap due to invalid options.\n @since 12"]
964    pub fn OH_PixelmapNative_CreateEmptyPixelmap(
965        options: *mut OH_Pixelmap_InitializationOptions,
966        pixelmap: *mut *mut OH_PixelmapNative,
967    ) -> Image_ErrorCode;
968}
969extern "C" {
970    #[doc = " @brief Creates a empty pixelmap based on options {@link OH_Pixelmap_InitializationOptions}, the memory type used\n by the pixelmap can be specified by allocatorType {@link IMAGE_ALLOCATOR_MODE}. By default,\n the system selects the memory type based on the image type, image size, platform capability, etc. When processing\n the pixelmap returned by this interface, please always consider the impact of stride.\n\n @param options Pixelmap initialization properties including size, pixel format, alpha type, and editable flags.\n @param allocator Indicate which memory type will be used by the returned pixelmap.\n @param pixelmap Output parameter receiving the created pixelmap object pointer.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n         {@link IMAGE_TOO_LARGE} too large data or image.\n         {@link IMAGE_UNSUPPORTED_OPERATION} unsupported operations.\n         {@link IMAGE_ALLOCATOR_MODE_UNSUPPORTED} unsupported allocator mode, e.g., use\n         share memory to create a HDR image as only DMA supported hdr metadata.\n @since 20"]
971    #[cfg(feature = "api-20")]
972    pub fn OH_PixelmapNative_CreateEmptyPixelmapUsingAllocator(
973        options: *mut OH_Pixelmap_InitializationOptions,
974        allocator: IMAGE_ALLOCATOR_MODE,
975        pixelmap: *mut *mut OH_PixelmapNative,
976    ) -> Image_ErrorCode;
977}
978extern "C" {
979    #[doc = " @brief Creates a PixelMap from a Surface with the Surface ID.\n\n @param surfaceId The Surface ID.\n @param length Length of the Surface ID.\n @param pixelmap The PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. surfaceId or pixelmap is incorrect.\n         {@link IMAGE_CREATE_PIXELMAP_FAILED} If the PixelMap creation failed.\n @see OH_PixelmapNative\n @since 22"]
980    #[cfg(feature = "api-22")]
981    pub fn OH_PixelmapNative_CreatePixelmapFromSurface(
982        surfaceId: *const ::std::os::raw::c_char,
983        length: usize,
984        pixelmap: *mut *mut OH_PixelmapNative,
985    ) -> Image_ErrorCode;
986}
987extern "C" {
988    #[doc = " @brief Creates a PixelMap object based on the ID of a Surface with transformation.\n\n @param surfaceId ID of the Surface.\n @param length Length of the Surface ID.\n @param transformEnabled Whether to inverse transform the PixelMap to cancel out the transformation from the Surface.\n     If true, the PixelMap will be transformed by the same amount from the Surface but in a reversed direction;\n     if false, the PixelMap will not be transformed.\n @param pixelmap The PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} Operation is successful.\n         {@link IMAGE_INVALID_PARAMETER} Invalid parameter, e.g. surfaceId or pixelmap is incorrect.\n         {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation, e.g. on cross-platform.\n         {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get the data from Surface.\n         {@link IMAGE_CREATE_PIXELMAP_FAILED} Failed to create the PixelMap.\n @see OH_PixelmapNative\n @since 23"]
989    #[cfg(feature = "api-23")]
990    pub fn OH_PixelmapNative_CreatePixelmapFromSurfaceWithTransformation(
991        surfaceId: *const ::std::os::raw::c_char,
992        length: usize,
993        transformEnabled: bool,
994        pixelmap: *mut *mut OH_PixelmapNative,
995    ) -> Image_ErrorCode;
996}
997extern "C" {
998    #[doc = " @brief Creates a PixelMap from a native buffer.\n\n @param nativeBuffer The native buffer.\n @param pixelmap The PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. nativeBuffer or pixelmap is incorrect.\n         {@link IMAGE_CREATE_PIXELMAP_FAILED} If the PixelMap creation failed.\n @see OH_PixelmapNative\n @since 22"]
999    #[cfg(feature = "api-22")]
1000    pub fn OH_PixelmapNative_CreatePixelmapFromNativeBuffer(
1001        nativeBuffer: *mut OH_NativeBuffer,
1002        pixelmap: *mut *mut OH_PixelmapNative,
1003    ) -> Image_ErrorCode;
1004}
1005extern "C" {
1006    #[doc = " @brief Get metadata.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param key Type of metadata.\n @param value Value of metadata.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, key and value are incorrect.\n returns {@link Image_ErrorCode} IMAGE_DMA_NOT_EXIST - if DMA memory does not exist.\n returns {@link Image_ErrorCode} IMAGE_COPY_FAILED - if memory copy failed.\n @see OH_PixelmapNative\n @since 12"]
1007    pub fn OH_PixelmapNative_GetMetadata(
1008        pixelmap: *mut OH_PixelmapNative,
1009        key: OH_Pixelmap_HdrMetadataKey,
1010        value: *mut *mut OH_Pixelmap_HdrMetadataValue,
1011    ) -> Image_ErrorCode;
1012}
1013extern "C" {
1014    #[doc = " @brief Set metadata.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param key Type of metadata.\n @param value Value of metadata.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, key and value are incorrect.\n returns {@link Image_ErrorCode} IMAGE_DMA_NOT_EXIST - if DMA memory does not exist.\n returns {@link Image_ErrorCode} IMAGE_COPY_FAILED - if memory copy failed.\n @see OH_PixelmapNative\n @since 12"]
1015    pub fn OH_PixelmapNative_SetMetadata(
1016        pixelmap: *mut OH_PixelmapNative,
1017        key: OH_Pixelmap_HdrMetadataKey,
1018        value: *mut OH_Pixelmap_HdrMetadataValue,
1019    ) -> Image_ErrorCode;
1020}
1021extern "C" {
1022    #[doc = " @brief Get the native buffer from the PixelMap.\n\n @param pixelmap The PixelMap to get the native buffer from.\n @param nativeBuffer The native buffer to retrieve.\n @return Returns {@link Image_ErrorCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, pixelmap or nativeBuffer is null.\n returns {@link Image_ErrorCode} IMAGE_DMA_NOT_EXIST - if DMA memory dose not exist.\n returns {@link Image_ErrorCode} IMAGE_DMA_OPERATION_FAILED - if operations related to DMA memory has failed.\n @see OH_PixelmapNative\n @since 12"]
1023    pub fn OH_PixelmapNative_GetNativeBuffer(
1024        pixelmap: *mut OH_PixelmapNative,
1025        nativeBuffer: *mut *mut OH_NativeBuffer,
1026    ) -> Image_ErrorCode;
1027}
1028extern "C" {
1029    #[doc = " @brief Get the native colorspace from the PixelMap.\n\n @param pixelmap The native pixelmap to get the native colorspace from.\n @param colorSpaceNative The native colorspace to retrieve.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} The param of pixelmap or colorSpaceNative is nullptr or invalid.\n @see OH_PixelmapNative\n @since 13"]
1030    #[cfg(feature = "api-13")]
1031    pub fn OH_PixelmapNative_GetColorSpaceNative(
1032        pixelmap: *mut OH_PixelmapNative,
1033        colorSpaceNative: *mut *mut OH_NativeColorSpaceManager,
1034    ) -> Image_ErrorCode;
1035}
1036extern "C" {
1037    #[doc = " @brief Set the native colorspace for the PixelMap.\n\n @param pixelmap The native pixelmap to set the native colorspace for.\n @param colorSpaceNative The native colorspace to set.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} The param of pixelmap or colorSpaceNative is nullptr or invalid.\n @see OH_PixelmapNative\n @since 13"]
1038    #[cfg(feature = "api-13")]
1039    pub fn OH_PixelmapNative_SetColorSpaceNative(
1040        pixelmap: *mut OH_PixelmapNative,
1041        colorSpaceNative: *mut OH_NativeColorSpaceManager,
1042    ) -> Image_ErrorCode;
1043}
1044extern "C" {
1045    #[doc = " @brief Set pixelmap memory name.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param name The pointer of name that needs to be set.\n @param size The size of name size that needs to be set.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, name and size are incorrect.\n         {@link IMAGE_UNSUPPORTED_MEMORY_FORMAT} If memory format is unsupported.\n @see OH_PixelmapNative\n @since 13"]
1046    #[cfg(feature = "api-13")]
1047    pub fn OH_PixelmapNative_SetMemoryName(
1048        pixelmap: *mut OH_PixelmapNative,
1049        name: *mut ::std::os::raw::c_char,
1050        size: *mut usize,
1051    ) -> Image_ErrorCode;
1052}
1053extern "C" {
1054    #[doc = " @brief Get the total number of bytes occupied by all pixels in the Pixelmap, without any padding.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param byteCount The total number of bytes to be retrieved.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid.\n @see OH_PixelmapNative\n @since 18"]
1055    #[cfg(feature = "api-18")]
1056    pub fn OH_PixelmapNative_GetByteCount(
1057        pixelmap: *mut OH_PixelmapNative,
1058        byteCount: *mut u32,
1059    ) -> Image_ErrorCode;
1060}
1061extern "C" {
1062    #[doc = " @brief Get the size of the allocated memory used to store this pixelmap's pixels.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param allocationByteCount The size of the allocated memory.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or allocationByteCount are invalid.\n @see OH_PixelmapNative\n @since 18"]
1063    #[cfg(feature = "api-18")]
1064    pub fn OH_PixelmapNative_GetAllocationByteCount(
1065        pixelmap: *mut OH_PixelmapNative,
1066        allocationByteCount: *mut u32,
1067    ) -> Image_ErrorCode;
1068}
1069extern "C" {
1070    #[doc = " @brief Obtains the memory address of a PixelMap and locks the memory.\n        When the memory is locked, any operation that modifies or releases the PixelMap will fail and return\n        {@link IMAGE_BAD_PARAMETER}.\n\n @param pixelmap The PixelMap pointer to be operated.\n @param addr The double pointer to the memory address of the PixelMap.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or addr are invalid.\n         {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be locked.\n @see OH_PixelmapNative\n @since 15"]
1071    #[cfg(feature = "api-15")]
1072    pub fn OH_PixelmapNative_AccessPixels(
1073        pixelmap: *mut OH_PixelmapNative,
1074        addr: *mut *mut ::std::os::raw::c_void,
1075    ) -> Image_ErrorCode;
1076}
1077extern "C" {
1078    #[doc = " @brief Unlocks the memory of the PixelMap data.\n        This function is used with {@link OH_PixelmapNative_AccessPixels} in pairs.\n\n @param pixelmap The PixelMap pointer to be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap is invalid.\n         {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be unlocked.\n @see OH_PixelmapNative\n @since 15"]
1079    #[cfg(feature = "api-15")]
1080    pub fn OH_PixelmapNative_UnaccessPixels(pixelmap: *mut OH_PixelmapNative) -> Image_ErrorCode;
1081}
1082extern "C" {
1083    #[doc = " @brief Gets the unique ID of a PixelMap.\n\n @param pixelmap The PixelMap to retrieve the unique ID.\n @param uniqueId The resulting unique ID.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or uniqueId is incorrect.\n @see OH_PixelmapNative\n @since 22"]
1084    #[cfg(feature = "api-22")]
1085    pub fn OH_PixelmapNative_GetUniqueId(
1086        pixelmap: *mut OH_PixelmapNative,
1087        uniqueId: *mut u32,
1088    ) -> Image_ErrorCode;
1089}
1090extern "C" {
1091    #[doc = " @brief Checks whether the PixelMap has been released.\n\n @param pixelmap The PixelMap to check.\n @param released The resulting release status.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or released is incorrect.\n @see OH_PixelmapNative\n @since 22"]
1092    #[cfg(feature = "api-22")]
1093    pub fn OH_PixelmapNative_IsReleased(
1094        pixelmap: *mut OH_PixelmapNative,
1095        released: *mut bool,
1096    ) -> Image_ErrorCode;
1097}
1098#[doc = " @brief Define a Picture struct type, used for picture pointer controls.\n\n @since 13"]
1099#[cfg(feature = "api-13")]
1100#[repr(C)]
1101#[derive(Debug, Copy, Clone)]
1102pub struct OH_PictureNative {
1103    _unused: [u8; 0],
1104}
1105#[doc = " @brief Define a AuxiliaryPicture struct type, used for auxiliary\n picture pointer controls.\n\n @since 13"]
1106#[cfg(feature = "api-13")]
1107#[repr(C)]
1108#[derive(Debug, Copy, Clone)]
1109pub struct OH_AuxiliaryPictureNative {
1110    _unused: [u8; 0],
1111}
1112#[doc = " @brief Define a AuxiliaryPictureInfo struct type, used for auxiliary\n picture info controls.\n\n @since 13"]
1113#[cfg(feature = "api-13")]
1114#[repr(C)]
1115#[derive(Debug, Copy, Clone)]
1116pub struct OH_AuxiliaryPictureInfo {
1117    _unused: [u8; 0],
1118}
1119#[cfg(feature = "api-13")]
1120pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_GAINMAP: Image_AuxiliaryPictureType = 1;
1121#[cfg(feature = "api-13")]
1122pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_DEPTH_MAP: Image_AuxiliaryPictureType =
1123    2;
1124#[cfg(feature = "api-13")]
1125pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_UNREFOCUS_MAP:
1126    Image_AuxiliaryPictureType = 3;
1127#[cfg(feature = "api-13")]
1128pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_LINEAR_MAP: Image_AuxiliaryPictureType =
1129    4;
1130#[cfg(feature = "api-13")]
1131pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_FRAGMENT_MAP:
1132    Image_AuxiliaryPictureType = 5;
1133#[doc = " @brief Define a auxiliary picture type.\n\n @since 13"]
1134#[cfg(feature = "api-13")]
1135pub type Image_AuxiliaryPictureType = u32;
1136#[repr(C)]
1137#[derive(Debug, Copy, Clone)]
1138pub struct OH_ComposeOptions {
1139    _unused: [u8; 0],
1140}
1141extern "C" {
1142    #[doc = " @brief Create a instance for OH_ComposeOptions struct.\n\n @param options The OH_ComposeOptions pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 23"]
1143    #[cfg(feature = "api-23")]
1144    pub fn OH_ComposeOptions_Create(options: *mut *mut OH_ComposeOptions) -> Image_ErrorCode;
1145}
1146extern "C" {
1147    #[doc = " @brief Set desired pixel format for ComposeOptions.\n\n @param options The OH_ComposeOptions pointer will be operated.\n @param desiredPixelFormat The desired pixel format will be set, RGBA_1010102\\YCBCR_P010\\YCRCB_P010 are supported.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredPixelFormat is not supported.\n @since 23"]
1148    #[cfg(feature = "api-23")]
1149    pub fn OH_ComposeOptions_SetDesiredPixelFormat(
1150        options: *mut OH_ComposeOptions,
1151        desiredPixelFormat: PIXEL_FORMAT,
1152    ) -> Image_ErrorCode;
1153}
1154extern "C" {
1155    #[doc = " @brief Get desired pixel format for ComposeOptions.\n\n @param options The OH_ComposeOptions pointer will be operated.\n @param desiredPixelFormat The desired pixel format.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredPixelFormat is nullptr.\n @since 23"]
1156    #[cfg(feature = "api-23")]
1157    pub fn OH_ComposeOptions_GetDesiredPixelFormat(
1158        options: *mut OH_ComposeOptions,
1159        desiredPixelFormat: *mut PIXEL_FORMAT,
1160    ) -> Image_ErrorCode;
1161}
1162extern "C" {
1163    #[doc = " @brief Releases an OH_ComposeOptions object.\n\n @param options Indicates a OH_ComposeOptions pointer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 23"]
1164    #[cfg(feature = "api-23")]
1165    pub fn OH_ComposeOptions_Release(options: *mut OH_ComposeOptions) -> Image_ErrorCode;
1166}
1167extern "C" {
1168    #[doc = " @brief Create a <b>Picture</b> object.\n\n @param mainPixelmap The pixel map of the main image.\n @param picture Picture pointer for created.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} mainPixelmap is nullptr, or picture is nullptr.\n @since 13"]
1169    #[cfg(feature = "api-13")]
1170    pub fn OH_PictureNative_CreatePicture(
1171        mainPixelmap: *mut OH_PixelmapNative,
1172        picture: *mut *mut OH_PictureNative,
1173    ) -> Image_ErrorCode;
1174}
1175extern "C" {
1176    #[doc = " @brief Obtains the pixel map of the main image.\n\n @param picture The Picture pointer will be operated.\n @param mainPixelmap Main pixel map pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or mainPixelmap is nullptr.\n @since 13"]
1177    #[cfg(feature = "api-13")]
1178    pub fn OH_PictureNative_GetMainPixelmap(
1179        picture: *mut OH_PictureNative,
1180        mainPixelmap: *mut *mut OH_PixelmapNative,
1181    ) -> Image_ErrorCode;
1182}
1183extern "C" {
1184    #[doc = " @brief Obtains the hdr pixel map.\n\n @param picture The Picture pointer will be operated.\n @param hdrPixelmap Hdr pixel map pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or hdrPixelmap is nullptr.\n         {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation, e.g. the picture does not has a gainmap.\n @since 13"]
1185    #[cfg(feature = "api-13")]
1186    pub fn OH_PictureNative_GetHdrComposedPixelmap(
1187        picture: *mut OH_PictureNative,
1188        hdrPixelmap: *mut *mut OH_PixelmapNative,
1189    ) -> Image_ErrorCode;
1190}
1191extern "C" {
1192    #[doc = " @brief Obtains the hdr pixel map with options.\n\n @param picture The Picture pointer will be operated.\n @param options The compose options.\n @param hdrPixelmap Hdr pixel map pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or hdrPixelmap is nullptr.\n         {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation, e.g. the picture does not has a gainmap.\n @since 23"]
1193    #[cfg(feature = "api-23")]
1194    pub fn OH_PictureNative_GetHdrComposedPixelmapWithOptions(
1195        picture: *mut OH_PictureNative,
1196        options: *mut OH_ComposeOptions,
1197        hdrPixelmap: *mut *mut OH_PixelmapNative,
1198    ) -> Image_ErrorCode;
1199}
1200extern "C" {
1201    #[doc = " @brief Obtains the gainmap pixel map.\n\n @param picture The Picture pointer will be operated.\n @param gainmapPixelmap Gainmap pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or gainmapPixelmap is nullptr.\n @since 13"]
1202    #[cfg(feature = "api-13")]
1203    pub fn OH_PictureNative_GetGainmapPixelmap(
1204        picture: *mut OH_PictureNative,
1205        gainmapPixelmap: *mut *mut OH_PixelmapNative,
1206    ) -> Image_ErrorCode;
1207}
1208extern "C" {
1209    #[doc = " @brief Set auxiliary picture.\n\n @param picture The Picture pointer will be operated.\n @param type The type of auxiliary picture.\n @param auxiliaryPicture AuxiliaryPicture object.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or auxiliaryPicture is nullptr, or the type is invalid.\n @since 13"]
1210    #[cfg(feature = "api-13")]
1211    pub fn OH_PictureNative_SetAuxiliaryPicture(
1212        picture: *mut OH_PictureNative,
1213        type_: Image_AuxiliaryPictureType,
1214        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1215    ) -> Image_ErrorCode;
1216}
1217extern "C" {
1218    #[doc = " @brief Obtains the auxiliary picture based on type.\n\n @param picture The Picture pointer will be operated.\n @param type The type of auxiliary picture.\n @param auxiliaryPicture AuxiliaryPicture pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or auxiliaryPicture is nullptr, or the type is invalid.\n @since 13"]
1219    #[cfg(feature = "api-13")]
1220    pub fn OH_PictureNative_GetAuxiliaryPicture(
1221        picture: *mut OH_PictureNative,
1222        type_: Image_AuxiliaryPictureType,
1223        auxiliaryPicture: *mut *mut OH_AuxiliaryPictureNative,
1224    ) -> Image_ErrorCode;
1225}
1226extern "C" {
1227    #[doc = " @brief Obtains the metadata of main picture.\n\n @param picture The Picture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata of main picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or metadata is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.\n @since 13"]
1228    #[cfg(feature = "api-13")]
1229    pub fn OH_PictureNative_GetMetadata(
1230        picture: *mut OH_PictureNative,
1231        metadataType: Image_MetadataType,
1232        metadata: *mut *mut OH_PictureMetadata,
1233    ) -> Image_ErrorCode;
1234}
1235extern "C" {
1236    #[doc = " @brief Set main picture metadata.\n\n @param picture The Picture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or metadata is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.\n @since 13"]
1237    #[cfg(feature = "api-13")]
1238    pub fn OH_PictureNative_SetMetadata(
1239        picture: *mut OH_PictureNative,
1240        metadataType: Image_MetadataType,
1241        metadata: *mut OH_PictureMetadata,
1242    ) -> Image_ErrorCode;
1243}
1244extern "C" {
1245    #[doc = " @brief Releases this Picture object.\n\n @param picture The Picture pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr.\n @since 13"]
1246    #[cfg(feature = "api-13")]
1247    pub fn OH_PictureNative_Release(picture: *mut OH_PictureNative) -> Image_ErrorCode;
1248}
1249extern "C" {
1250    #[doc = " @brief Create a <b>AuxiliaryPicture</b> object.\n\n @param data The image data buffer.\n @param dataLength The length of data.\n @param size The size of auxiliary picture.\n @param type The type of auxiliary picture.\n @param auxiliaryPicture AuxiliaryPicture pointer for created.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} data is nullptr, or dataLength is invalid, or size is nullptr, or the type\n         is invalid, or auxiliaryPicture is nullptr.\n @since 13"]
1251    #[cfg(feature = "api-13")]
1252    pub fn OH_AuxiliaryPictureNative_Create(
1253        data: *mut u8,
1254        dataLength: usize,
1255        size: *mut Image_Size,
1256        type_: Image_AuxiliaryPictureType,
1257        auxiliaryPicture: *mut *mut OH_AuxiliaryPictureNative,
1258    ) -> Image_ErrorCode;
1259}
1260extern "C" {
1261    #[doc = " @brief Write pixels to auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param source The pixels will be written.\n @param bufferSize The size of pixels.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or source is nullptr, or the bufferSize is invalid.\n         {@link IMAGE_ALLOC_FAILED} memory alloc failed.\n         {@link IMAGE_COPY_FAILED} memory copy failed.\n @since 13"]
1262    #[cfg(feature = "api-13")]
1263    pub fn OH_AuxiliaryPictureNative_WritePixels(
1264        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1265        source: *mut u8,
1266        bufferSize: usize,
1267    ) -> Image_ErrorCode;
1268}
1269extern "C" {
1270    #[doc = " @brief Read pixels from auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param destination The pixels will be read.\n @param bufferSize The size of pixels for reading.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or destination is nullptr,\n         or the bufferSize is invalid.\n         {@link IMAGE_ALLOC_FAILED} memory alloc failed.\n         {@link IMAGE_COPY_FAILED} memory copy failed.\n @since 13"]
1271    #[cfg(feature = "api-13")]
1272    pub fn OH_AuxiliaryPictureNative_ReadPixels(
1273        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1274        destination: *mut u8,
1275        bufferSize: *mut usize,
1276    ) -> Image_ErrorCode;
1277}
1278extern "C" {
1279    #[doc = " @brief Obtains the type of auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param type The type of auxiliary picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or type is nullptr.\n @since 13"]
1280    #[cfg(feature = "api-13")]
1281    pub fn OH_AuxiliaryPictureNative_GetType(
1282        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1283        type_: *mut Image_AuxiliaryPictureType,
1284    ) -> Image_ErrorCode;
1285}
1286extern "C" {
1287    #[doc = " @brief Obtains the info of auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param info The info of auxiliary picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or info is nullptr.\n @since 13"]
1288    #[cfg(feature = "api-13")]
1289    pub fn OH_AuxiliaryPictureNative_GetInfo(
1290        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1291        info: *mut *mut OH_AuxiliaryPictureInfo,
1292    ) -> Image_ErrorCode;
1293}
1294extern "C" {
1295    #[doc = " @brief Set auxiliary picture info.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param info The info will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or info is nullptr.\n @since 13"]
1296    #[cfg(feature = "api-13")]
1297    pub fn OH_AuxiliaryPictureNative_SetInfo(
1298        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1299        info: *mut OH_AuxiliaryPictureInfo,
1300    ) -> Image_ErrorCode;
1301}
1302extern "C" {
1303    #[doc = " @brief Obtains the metadata of auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata of auxiliary picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or metadata is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\n @since 13"]
1304    #[cfg(feature = "api-13")]
1305    pub fn OH_AuxiliaryPictureNative_GetMetadata(
1306        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1307        metadataType: Image_MetadataType,
1308        metadata: *mut *mut OH_PictureMetadata,
1309    ) -> Image_ErrorCode;
1310}
1311extern "C" {
1312    #[doc = " @brief Set auxiliary picture metadata.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or metadata is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\n @since 13"]
1313    #[cfg(feature = "api-13")]
1314    pub fn OH_AuxiliaryPictureNative_SetMetadata(
1315        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
1316        metadataType: Image_MetadataType,
1317        metadata: *mut OH_PictureMetadata,
1318    ) -> Image_ErrorCode;
1319}
1320extern "C" {
1321    #[doc = " @brief Releases this AuxiliaryPicture object.\n\n @param picture The Picture pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr.\n @since 13"]
1322    #[cfg(feature = "api-13")]
1323    pub fn OH_AuxiliaryPictureNative_Release(
1324        picture: *mut OH_AuxiliaryPictureNative,
1325    ) -> Image_ErrorCode;
1326}
1327extern "C" {
1328    #[doc = " @brief Create a <b>AuxiliaryPictureInfo</b> object.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 13"]
1329    #[cfg(feature = "api-13")]
1330    pub fn OH_AuxiliaryPictureInfo_Create(
1331        info: *mut *mut OH_AuxiliaryPictureInfo,
1332    ) -> Image_ErrorCode;
1333}
1334extern "C" {
1335    #[doc = " @brief Obtains the type of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param type The type of auxiliary picture info.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or type is nullptr.\n @since 13"]
1336    #[cfg(feature = "api-13")]
1337    pub fn OH_AuxiliaryPictureInfo_GetType(
1338        info: *mut OH_AuxiliaryPictureInfo,
1339        type_: *mut Image_AuxiliaryPictureType,
1340    ) -> Image_ErrorCode;
1341}
1342extern "C" {
1343    #[doc = " @brief Set auxiliary picture info type.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param type The type will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or type is invalid.\n @since 13"]
1344    #[cfg(feature = "api-13")]
1345    pub fn OH_AuxiliaryPictureInfo_SetType(
1346        info: *mut OH_AuxiliaryPictureInfo,
1347        type_: Image_AuxiliaryPictureType,
1348    ) -> Image_ErrorCode;
1349}
1350extern "C" {
1351    #[doc = " @brief Obtains the size of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param size The size of auxiliary picture info.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or size is nullptr.\n @since 13"]
1352    #[cfg(feature = "api-13")]
1353    pub fn OH_AuxiliaryPictureInfo_GetSize(
1354        info: *mut OH_AuxiliaryPictureInfo,
1355        size: *mut Image_Size,
1356    ) -> Image_ErrorCode;
1357}
1358extern "C" {
1359    #[doc = " @brief Set auxiliary picture info size.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param size The size will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or size is nullptr.\n @since 13"]
1360    #[cfg(feature = "api-13")]
1361    pub fn OH_AuxiliaryPictureInfo_SetSize(
1362        info: *mut OH_AuxiliaryPictureInfo,
1363        size: *mut Image_Size,
1364    ) -> Image_ErrorCode;
1365}
1366extern "C" {
1367    #[doc = " @brief Obtains the rowStride of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param rowStride The rowStride of auxiliary picture info.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or rowStride is nullptr.\n @since 13"]
1368    #[cfg(feature = "api-13")]
1369    pub fn OH_AuxiliaryPictureInfo_GetRowStride(
1370        info: *mut OH_AuxiliaryPictureInfo,
1371        rowStride: *mut u32,
1372    ) -> Image_ErrorCode;
1373}
1374extern "C" {
1375    #[doc = " @brief Set auxiliary picture info rowStride.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param rowStride The rowStride will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or rowStride is nullptr.\n @since 13"]
1376    #[cfg(feature = "api-13")]
1377    pub fn OH_AuxiliaryPictureInfo_SetRowStride(
1378        info: *mut OH_AuxiliaryPictureInfo,
1379        rowStride: u32,
1380    ) -> Image_ErrorCode;
1381}
1382extern "C" {
1383    #[doc = " @brief Obtains the pixelFormat of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param pixelFormat The pixelFormat will be get.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or pixelFormat is nullptr.\n @since 13"]
1384    #[cfg(feature = "api-13")]
1385    pub fn OH_AuxiliaryPictureInfo_GetPixelFormat(
1386        info: *mut OH_AuxiliaryPictureInfo,
1387        pixelFormat: *mut PIXEL_FORMAT,
1388    ) -> Image_ErrorCode;
1389}
1390extern "C" {
1391    #[doc = " @brief Set auxiliary picture info pixelFormat.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param pixelFormat The pixelFormat will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 13"]
1392    #[cfg(feature = "api-13")]
1393    pub fn OH_AuxiliaryPictureInfo_SetPixelFormat(
1394        info: *mut OH_AuxiliaryPictureInfo,
1395        pixelFormat: PIXEL_FORMAT,
1396    ) -> Image_ErrorCode;
1397}
1398extern "C" {
1399    #[doc = " @brief Releases this AuxiliaryPictureInfo object.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 13"]
1400    #[cfg(feature = "api-13")]
1401    pub fn OH_AuxiliaryPictureInfo_Release(info: *mut OH_AuxiliaryPictureInfo) -> Image_ErrorCode;
1402}
1403#[doc = " @brief Defines an image source object for the image interface.\n\n @since 12"]
1404#[repr(C)]
1405#[derive(Debug, Copy, Clone)]
1406pub struct OH_ImageSourceNative {
1407    _unused: [u8; 0],
1408}
1409#[doc = " @brief Defines image source infomation\n {@link OH_ImageSourceInfo_Create}.\n\n @since 12"]
1410#[repr(C)]
1411#[derive(Debug, Copy, Clone)]
1412pub struct OH_ImageSource_Info {
1413    _unused: [u8; 0],
1414}
1415#[doc = " @brief Defines decoding options for picture\n {@link OH_DecodingOptionsForPicture_Create}.\n\n @since 13"]
1416#[cfg(feature = "api-13")]
1417#[repr(C)]
1418#[derive(Debug, Copy, Clone)]
1419pub struct OH_DecodingOptionsForPicture {
1420    _unused: [u8; 0],
1421}
1422#[cfg(feature = "api-15")]
1423pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_AUTO: IMAGE_ALLOCATOR_TYPE = 0;
1424#[cfg(feature = "api-15")]
1425pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_DMA: IMAGE_ALLOCATOR_TYPE = 1;
1426#[cfg(feature = "api-15")]
1427pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_SHARE_MEMORY: IMAGE_ALLOCATOR_TYPE = 2;
1428#[doc = " @brief Type of allocator used to allocate memory of a PixelMap..\n\n @since 15"]
1429#[cfg(feature = "api-15")]
1430pub type IMAGE_ALLOCATOR_TYPE = u32;
1431extern "C" {
1432    #[doc = " @brief Create a pointer for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
1433    pub fn OH_ImageSourceInfo_Create(info: *mut *mut OH_ImageSource_Info) -> Image_ErrorCode;
1434}
1435extern "C" {
1436    #[doc = " @brief Get width number for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @param width the number of image width.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or width is nullptr.\n @since 12"]
1437    pub fn OH_ImageSourceInfo_GetWidth(
1438        info: *mut OH_ImageSource_Info,
1439        width: *mut u32,
1440    ) -> Image_ErrorCode;
1441}
1442extern "C" {
1443    #[doc = " @brief Get height number for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @param height the number of image height.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or height is nullptr.\n @since 12"]
1444    pub fn OH_ImageSourceInfo_GetHeight(
1445        info: *mut OH_ImageSource_Info,
1446        height: *mut u32,
1447    ) -> Image_ErrorCode;
1448}
1449extern "C" {
1450    #[doc = " @brief Get isHdr for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated. Pointer connot be null.\n @param isHdr Whether the image has a high dynamic range.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or isHdr is nullptr.\n @since 12"]
1451    pub fn OH_ImageSourceInfo_GetDynamicRange(
1452        info: *mut OH_ImageSource_Info,
1453        isHdr: *mut bool,
1454    ) -> Image_ErrorCode;
1455}
1456extern "C" {
1457    #[doc = " @brief Obtains the MIME type of an image source.\n\n @param info Pointer to the OH_ImageSource_Info struct.\n @param mimetype Pointer to the MIME type of the image source.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} info is nullptr, or mimeType is nullptr.\n @since 20"]
1458    #[cfg(feature = "api-20")]
1459    pub fn OH_ImageSourceInfo_GetMimeType(
1460        info: *mut OH_ImageSource_Info,
1461        mimetype: *mut Image_MimeType,
1462    ) -> Image_ErrorCode;
1463}
1464extern "C" {
1465    #[doc = " @brief delete OH_ImageSource_Info pointer.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 12"]
1466    pub fn OH_ImageSourceInfo_Release(info: *mut OH_ImageSource_Info) -> Image_ErrorCode;
1467}
1468#[doc = " @brief Defines the options for decoding the image source.\n It is used in {@link OH_ImageSourceNative_CreatePixelmap}.\n\n @since 12"]
1469#[repr(C)]
1470#[derive(Debug, Copy, Clone)]
1471pub struct OH_DecodingOptions {
1472    _unused: [u8; 0],
1473}
1474extern "C" {
1475    #[doc = " @brief Create a pointer for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
1476    pub fn OH_DecodingOptions_Create(options: *mut *mut OH_DecodingOptions) -> Image_ErrorCode;
1477}
1478extern "C" {
1479    #[doc = " @brief Get pixelFormat number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or pixelFormat is nullptr.\n @since 12"]
1480    pub fn OH_DecodingOptions_GetPixelFormat(
1481        options: *mut OH_DecodingOptions,
1482        pixelFormat: *mut i32,
1483    ) -> Image_ErrorCode;
1484}
1485extern "C" {
1486    #[doc = " @brief Set pixelFormat number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
1487    pub fn OH_DecodingOptions_SetPixelFormat(
1488        options: *mut OH_DecodingOptions,
1489        pixelFormat: i32,
1490    ) -> Image_ErrorCode;
1491}
1492extern "C" {
1493    #[doc = " @brief Get index number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param index the number of image index.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or index is nullptr.\n @since 12"]
1494    pub fn OH_DecodingOptions_GetIndex(
1495        options: *mut OH_DecodingOptions,
1496        index: *mut u32,
1497    ) -> Image_ErrorCode;
1498}
1499extern "C" {
1500    #[doc = " @brief Set index number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param index the number of image index.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
1501    pub fn OH_DecodingOptions_SetIndex(
1502        options: *mut OH_DecodingOptions,
1503        index: u32,
1504    ) -> Image_ErrorCode;
1505}
1506extern "C" {
1507    #[doc = " @brief Get rotate number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param rotate the number of image rotate.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or rotate is nullptr.\n @since 12"]
1508    pub fn OH_DecodingOptions_GetRotate(
1509        options: *mut OH_DecodingOptions,
1510        rotate: *mut f32,
1511    ) -> Image_ErrorCode;
1512}
1513extern "C" {
1514    #[doc = " @brief Set rotate number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param rotate the number of image rotate.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
1515    pub fn OH_DecodingOptions_SetRotate(
1516        options: *mut OH_DecodingOptions,
1517        rotate: f32,
1518    ) -> Image_ErrorCode;
1519}
1520extern "C" {
1521    #[doc = " @brief Get desiredSize number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredSize the number of image desiredSize.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredSize is nullptr.\n @since 12"]
1522    pub fn OH_DecodingOptions_GetDesiredSize(
1523        options: *mut OH_DecodingOptions,
1524        desiredSize: *mut Image_Size,
1525    ) -> Image_ErrorCode;
1526}
1527extern "C" {
1528    #[doc = " @brief Set desiredSize number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredSize the number of image desiredSize.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredSize is nullptr.\n @since 12"]
1529    pub fn OH_DecodingOptions_SetDesiredSize(
1530        options: *mut OH_DecodingOptions,
1531        desiredSize: *mut Image_Size,
1532    ) -> Image_ErrorCode;
1533}
1534extern "C" {
1535    #[doc = " @brief Set desiredRegion number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredRegion the number of image desiredRegion.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredRegion is nullptr.\n @since 12"]
1536    pub fn OH_DecodingOptions_GetDesiredRegion(
1537        options: *mut OH_DecodingOptions,
1538        desiredRegion: *mut Image_Region,
1539    ) -> Image_ErrorCode;
1540}
1541extern "C" {
1542    #[doc = " @brief Set desiredRegion number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredRegion the number of image desiredRegion.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options or desiredRegion is nullptr.\n @since 12"]
1543    pub fn OH_DecodingOptions_SetDesiredRegion(
1544        options: *mut OH_DecodingOptions,
1545        desiredRegion: *mut Image_Region,
1546    ) -> Image_ErrorCode;
1547}
1548extern "C" {
1549    #[doc = " @brief Set desiredDynamicRange number for OH_DecodingOptions struct.\n\n @param options The OH_DecodingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}. Pointer connot be null.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredDynamicRange is nullptr.\n @since 12"]
1550    pub fn OH_DecodingOptions_GetDesiredDynamicRange(
1551        options: *mut OH_DecodingOptions,
1552        desiredDynamicRange: *mut i32,
1553    ) -> Image_ErrorCode;
1554}
1555extern "C" {
1556    #[doc = " @brief Sets a cropping and scaling strategy for decoding options.\n\n @param options Pointer to the decoding options.\n @param cropAndScaleStrategy Strategy for executing the cropping and scaling operations when both desiredSize and\n desiredRegion are specified.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} The execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is a null pointer or cropAndScaleStrategy is not in the range of\n         Image_CropAndScaleStrategy.\n @since 18"]
1557    #[cfg(feature = "api-18")]
1558    pub fn OH_DecodingOptions_SetCropAndScaleStrategy(
1559        options: *mut OH_DecodingOptions,
1560        cropAndScaleStrategy: i32,
1561    ) -> Image_ErrorCode;
1562}
1563extern "C" {
1564    #[doc = " @brief Obtains the cropping and scaling strategy of decoding options.\n\n @param options Pointer to the decoding options.\n @param cropAndScaleStrategy Pointer to the strategy for executing the cropping and scaling operations when both\n desiredSize and desiredRegion are specified.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS}: The execution is successful.\n         {@link IMAGE_BAD_PARAMETER}: options or cropAndScaleStrategy is a null pointer.\n @since 18"]
1565    #[cfg(feature = "api-18")]
1566    pub fn OH_DecodingOptions_GetCropAndScaleStrategy(
1567        options: *mut OH_DecodingOptions,
1568        cropAndScaleStrategy: *mut i32,
1569    ) -> Image_ErrorCode;
1570}
1571extern "C" {
1572    #[doc = " @brief Set desiredDynamicRange number for OH_DecodingOptions struct.\n\n @param options The OH_DecodingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
1573    pub fn OH_DecodingOptions_SetDesiredDynamicRange(
1574        options: *mut OH_DecodingOptions,
1575        desiredDynamicRange: i32,
1576    ) -> Image_ErrorCode;
1577}
1578extern "C" {
1579    #[doc = " @brief Obtains the color space set in the decoding options.\n\n @param options Pointer to the decoding options.\n @param colorSpace Pointer to the color space.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or colorSpace is null pointer.\n @since 20"]
1580    #[cfg(feature = "api-20")]
1581    pub fn OH_DecodingOptions_GetDesiredColorSpace(
1582        options: *mut OH_DecodingOptions,
1583        colorSpace: *mut i32,
1584    ) -> Image_ErrorCode;
1585}
1586extern "C" {
1587    #[doc = " @brief Sets the desired color space for the decoding options.\n\n @param options Pointer to the decoding options.\n @param colorSpace Desired color space.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if options is a null pointer or colorSpace is not supported.\n @since 20"]
1588    #[cfg(feature = "api-20")]
1589    pub fn OH_DecodingOptions_SetDesiredColorSpace(
1590        options: *mut OH_DecodingOptions,
1591        colorSpace: i32,
1592    ) -> Image_ErrorCode;
1593}
1594extern "C" {
1595    #[doc = " @brief Sets the crop region for the decoding options.\n\n @param options Pointer to the decoding options.\n @param cropRegion The target region will be cropped from the image.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer.\n @since 19"]
1596    #[cfg(feature = "api-19")]
1597    pub fn OH_DecodingOptions_SetCropRegion(
1598        options: *mut OH_DecodingOptions,
1599        cropRegion: *mut Image_Region,
1600    ) -> Image_ErrorCode;
1601}
1602extern "C" {
1603    #[doc = " @brief Gets the crop region for the decoding options.\n\n @param options Pointer to the decoding options.\n @param cropRegion The target region will be cropped from the image.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer.\n @since 19"]
1604    #[cfg(feature = "api-19")]
1605    pub fn OH_DecodingOptions_GetCropRegion(
1606        options: *mut OH_DecodingOptions,
1607        cropRegion: *mut Image_Region,
1608    ) -> Image_ErrorCode;
1609}
1610extern "C" {
1611    #[doc = " @brief delete OH_DecodingOptions pointer.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} if options is a null pointer.\n @since 12"]
1612    pub fn OH_DecodingOptions_Release(options: *mut OH_DecodingOptions) -> Image_ErrorCode;
1613}
1614extern "C" {
1615    #[doc = " @brief Creates an ImageSource pointer.\n\n @param uri Indicates a pointer to the image source URI. Only a file URI or Base64 URI is accepted.\n @param uriSize Indicates the length of the image source URI.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} if uri is a null pointer.\n @since 12"]
1616    pub fn OH_ImageSourceNative_CreateFromUri(
1617        uri: *mut ::std::os::raw::c_char,
1618        uriSize: usize,
1619        res: *mut *mut OH_ImageSourceNative,
1620    ) -> Image_ErrorCode;
1621}
1622extern "C" {
1623    #[doc = " @brief Creates an void pointer\n\n @param fd Indicates the image source file descriptor.\n @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} if fd is invalid.\n @since 12"]
1624    pub fn OH_ImageSourceNative_CreateFromFd(
1625        fd: i32,
1626        res: *mut *mut OH_ImageSourceNative,
1627    ) -> Image_ErrorCode;
1628}
1629extern "C" {
1630    #[doc = " @brief Creates an void pointer\n\n @param data Indicates a pointer to the image source data. Only a formatted packet data or Base64 data is accepted.\n @param dataSize Indicates the size of the image source data.\n @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} if data is a null pointer or if dataSize is 0.\n @since 12"]
1631    pub fn OH_ImageSourceNative_CreateFromData(
1632        data: *mut u8,
1633        dataSize: usize,
1634        res: *mut *mut OH_ImageSourceNative,
1635    ) -> Image_ErrorCode;
1636}
1637extern "C" {
1638    #[doc = " @brief Create an image source from data buffer. The data buffer is directly accessed by the image source\n object, and therefore the data buffer must remain accessible within the lifecycle of the image source object.\n\n @param data Pointer to the data buffer.\n @param datalength Length of the data buffer.\n @param imageSource Double pointer to the image source.\n @return Result code.\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@link IMAGE_SOURCE_INVALID_PARAMETER} if data or imageSource is a null pointer or if datalength is 0.\n @since 20"]
1639    #[cfg(feature = "api-20")]
1640    pub fn OH_ImageSourceNative_CreateFromDataWithUserBuffer(
1641        data: *mut u8,
1642        datalength: usize,
1643        imageSource: *mut *mut OH_ImageSourceNative,
1644    ) -> Image_ErrorCode;
1645}
1646extern "C" {
1647    #[doc = " @brief Creates an void pointer\n\n @param rawFile Indicates the raw file's file descriptor.\n @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} if rawFile is a null pointer.\n @since 12"]
1648    pub fn OH_ImageSourceNative_CreateFromRawFile(
1649        rawFile: *mut RawFileDescriptor,
1650        res: *mut *mut OH_ImageSourceNative,
1651    ) -> Image_ErrorCode;
1652}
1653extern "C" {
1654    #[doc = " @brief Decodes an void pointer\n based on the specified {@link OH_DecodingOptions} struct.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param  options Indicates a pointer to the options for decoding the image source.\n For details, see {@link OH_DecodingOptions}.\n @param pixelmap Indicates a void pointer to the <b>Pixelmap</b> object obtained at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS} unsupported options,\n         e.g, cannot convert image into desired pixel format.\n @since 12"]
1655    pub fn OH_ImageSourceNative_CreatePixelmap(
1656        source: *mut OH_ImageSourceNative,
1657        options: *mut OH_DecodingOptions,
1658        pixelmap: *mut *mut OH_PixelmapNative,
1659    ) -> Image_ErrorCode;
1660}
1661extern "C" {
1662    #[doc = " @brief Creates a PixelMap based on decoding parameters {@link OH_DecodingOptions}, the memory type used by the\n PixelMap can be specified by allocatorType {@link IMAGE_ALLOCATOR_TYPE}. By default, the system selects the memory\n type based on the image type, image size, platform capability, etc. When processing the PixelMap returned by this\n interface, please always consider the impact of stride.\n\n @param source Image Source.\n @param options Decoding parameters, such as the size, pixel format, and color space of the pixelMap.\n For details, see {@link OH_DecodingOptions}.\n @param allocator Indicate which memory type will be used by the returned PixelMap.\n @param pixelmap Decoded <b>Pixelmap</b> object.\n @return Error code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or picture is nullptr.\n         {@link IMAGE_BAD_SOURCE} data source exception.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} unsupported mime type.\n         {@link IMAGE_SOURCE_TOO_LARGE} image to large.\n         {@link IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE} unsupported allocator type,\n         e.g., use share memory to decode a HDR image as only DMA supported hdr metadata.\n         {@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS} unsupported options,\n         e.g, cannot convert image into desired pixel format.\n         {@link IMAGE_DECODE_FAILED} decode failed.\n         {@link IMAGE_SOURCE_ALLOC_FAILED} memory allocation failed.\n @since 15"]
1663    #[cfg(feature = "api-15")]
1664    pub fn OH_ImageSourceNative_CreatePixelmapUsingAllocator(
1665        source: *mut OH_ImageSourceNative,
1666        options: *mut OH_DecodingOptions,
1667        allocator: IMAGE_ALLOCATOR_TYPE,
1668        pixelmap: *mut *mut OH_PixelmapNative,
1669    ) -> Image_ErrorCode;
1670}
1671extern "C" {
1672    #[doc = " @brief Decodes an void pointer\n the <b>Pixelmap</b> objects at the C++ native layer\n based on the specified {@link OH_DecodingOptions} struct.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param  options Indicates a pointer to the options for decoding the image source.\n For details, see {@link OH_DecodingOptions}.\n @param resVecPixMap Indicates a pointer array to the <b>Pixelmap</b> objects obtained at the C++ native layer.\n It cannot be a null pointer.\n @param size Indicates a size of resVecPixMap. User can get size from {@link OH_ImageSourceNative_GetFrameCount}.\n @return @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or options is nullptr, or resVecPixMap is nullptr.\n @since 12"]
1673    pub fn OH_ImageSourceNative_CreatePixelmapList(
1674        source: *mut OH_ImageSourceNative,
1675        options: *mut OH_DecodingOptions,
1676        resVecPixMap: *mut *mut OH_PixelmapNative,
1677        size: usize,
1678    ) -> Image_ErrorCode;
1679}
1680extern "C" {
1681    #[doc = " @brief Create Picture pointer from ImageSource\n based on the specified {@link OH_DecodingOptionsForPicture} struct.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param options Indicates a pointer to the options for decoding the image source.\n For details, see {@link OH_DecodingOptionsForPicture}.\n @param picture Indicates a void pointer to the <b>Picture</b> object obtained at the C++ native layer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or picture is nullptr.\n         {@link IMAGE_DECODE_FAILED} decode failed.\n @since 13"]
1682    #[cfg(feature = "api-13")]
1683    pub fn OH_ImageSourceNative_CreatePicture(
1684        source: *mut OH_ImageSourceNative,
1685        options: *mut OH_DecodingOptionsForPicture,
1686        picture: *mut *mut OH_PictureNative,
1687    ) -> Image_ErrorCode;
1688}
1689extern "C" {
1690    #[doc = " @brief Decodes an image at the specified index into a Picture object.\n\n @param source Pointer to the image source.\n @param index Image index.\n @param picture Double pointer to the Picture object obtained after decoding.\n @return Result code.\n {@link IMAGE_SUCCESS}: The execution is successful.\n {@link IMAGE_BAD_SOURCE}: The data source is abnormal.\n {@link IMAGE_SOURCE_UNSUPPORTED_MIMETYPE}: The image format is unsupported.\n {@link IMAGE_SOURCE_TOO_LARGE}: The image is too large.\n {@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS}: The operation is not supported, for example, invalid index.\n {@link IMAGE_DECODE_FAILED}: Decoding fails.\n @since 20"]
1691    #[cfg(feature = "api-20")]
1692    pub fn OH_ImageSourceNative_CreatePictureAtIndex(
1693        source: *mut OH_ImageSourceNative,
1694        index: u32,
1695        picture: *mut *mut OH_PictureNative,
1696    ) -> Image_ErrorCode;
1697}
1698extern "C" {
1699    #[doc = " @brief Obtains the delay time list from some <b>ImageSource</b> objects (such as GIF image sources).\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param delayTimeList Indicates a pointer to the delay time list obtained. It cannot be a null pointer.\n @param size Indicates a size of delayTimeList. User can get size from {@link OH_ImageSourceNative_GetFrameCount}.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or delayTimeList is nullptr.\n @since 12"]
1700    pub fn OH_ImageSourceNative_GetDelayTimeList(
1701        source: *mut OH_ImageSourceNative,
1702        delayTimeList: *mut i32,
1703        size: usize,
1704    ) -> Image_ErrorCode;
1705}
1706extern "C" {
1707    #[doc = " @brief Obtains image source information from an <b>ImageSource</b> object by index.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param index Indicates the index of the frame.\n @param info Indicates a pointer to the image source information obtained.\n For details, see {@link OH_ImageSource_Info}.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or info is nullptr, or failed to get image info.\n @since 12"]
1708    pub fn OH_ImageSourceNative_GetImageInfo(
1709        source: *mut OH_ImageSourceNative,
1710        index: i32,
1711        info: *mut OH_ImageSource_Info,
1712    ) -> Image_ErrorCode;
1713}
1714extern "C" {
1715    #[doc = " @brief Obtains the value of an image property from an <b>ImageSource</b> object.\n\n @param source Pointer to ImageSource.\n @param key Pointer to the property key.\n @param value Pointer to the property value. Output Parameter.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or key is nullptr, or value is nullptr.\n         {@link IMAGE_ALLOC_FAILED} allocate memory failed.\n         {@link IMAGE_COPY_FAILED} copy memory failed.\n @since 12"]
1716    pub fn OH_ImageSourceNative_GetImageProperty(
1717        source: *mut OH_ImageSourceNative,
1718        key: *mut Image_String,
1719        value: *mut Image_String,
1720    ) -> Image_ErrorCode;
1721}
1722extern "C" {
1723    #[doc = " @brief Obtains the value of an image property from an <b>ImageSource</b> object. The output value.data is null-terminated.\n\n @param source Pointer to ImageSource.\n @param key Pointer to the property key.\n @param value Pointer to the property value. Output Parameter.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n @since 19"]
1724    #[cfg(feature = "api-19")]
1725    pub fn OH_ImageSourceNative_GetImagePropertyWithNull(
1726        source: *mut OH_ImageSourceNative,
1727        key: *mut Image_String,
1728        value: *mut Image_String,
1729    ) -> Image_ErrorCode;
1730}
1731extern "C" {
1732    #[doc = " @brief Modifies the value of an image property of an <b>ImageSource</b> object.\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param key Indicates a pointer to the property. For details, see {@link Image_String}., key is an exif constant.\n Release after use ImageSource, see {@link OH_ImageSourceNative_Release}.\n @param value Indicates a pointer to the new value of the property.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or key is nullptr, or value is nullptr,\n         or failed to modify image property because of invalid parameters.\n @since 12"]
1733    pub fn OH_ImageSourceNative_ModifyImageProperty(
1734        source: *mut OH_ImageSourceNative,
1735        key: *mut Image_String,
1736        value: *mut Image_String,
1737    ) -> Image_ErrorCode;
1738}
1739extern "C" {
1740    #[doc = " @brief Obtains the number of frames from an <b>ImageSource</b> object.\n\n @param source Indicates a pointer to the {@link OH_ImageSource} object at the C++ native layer.\n @param res Indicates a pointer to the number of frames obtained.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or frameCount is nullptr.\n @since 12"]
1741    pub fn OH_ImageSourceNative_GetFrameCount(
1742        source: *mut OH_ImageSourceNative,
1743        frameCount: *mut u32,
1744    ) -> Image_ErrorCode;
1745}
1746extern "C" {
1747    #[doc = " @brief Releases an <b>ImageSourc</b> object.\n\n @param source Indicates a ImageSource pointer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr.\n @since 12"]
1748    pub fn OH_ImageSourceNative_Release(source: *mut OH_ImageSourceNative) -> Image_ErrorCode;
1749}
1750extern "C" {
1751    #[doc = " @brief Create a pointer for OH_DecodingOptionsForPicture struct.\n\n @param options The OH_DecodingOptionsForPicture pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 13"]
1752    #[cfg(feature = "api-13")]
1753    pub fn OH_DecodingOptionsForPicture_Create(
1754        options: *mut *mut OH_DecodingOptionsForPicture,
1755    ) -> Image_ErrorCode;
1756}
1757extern "C" {
1758    #[doc = " @brief Obtains the desired auxiliary pictures of decoding options.\n\n @param options The OH_DecodingOptionsForPicture pointer will be operated.\n @param desiredAuxiliaryPictures The desired auxiliary pictures in DecodingOptionsForPicture.\n @param length The length of desired auxiliary pictures.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, desiredAuxiliaryPictures is nullptr,\n         or length is invalid.\n @since 13"]
1759    #[cfg(feature = "api-13")]
1760    pub fn OH_DecodingOptionsForPicture_GetDesiredAuxiliaryPictures(
1761        options: *mut OH_DecodingOptionsForPicture,
1762        desiredAuxiliaryPictures: *mut *mut Image_AuxiliaryPictureType,
1763        length: *mut usize,
1764    ) -> Image_ErrorCode;
1765}
1766extern "C" {
1767    #[doc = " @brief Set decoding options desired auxiliary pictures.\n\n @param options The OH_DecodingOptionsForPicture pointer will be operated.\n @param desiredAuxiliaryPictures The desired auxiliary pictures will be set.\n @param length The length of desired auxiliary pictures.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, desiredAuxiliaryPictures is nullptr,\n         or length is invalid.\n @since 13"]
1768    #[cfg(feature = "api-13")]
1769    pub fn OH_DecodingOptionsForPicture_SetDesiredAuxiliaryPictures(
1770        options: *mut OH_DecodingOptionsForPicture,
1771        desiredAuxiliaryPictures: *mut Image_AuxiliaryPictureType,
1772        length: usize,
1773    ) -> Image_ErrorCode;
1774}
1775extern "C" {
1776    #[doc = " @brief Releases an <b>DecodingOptionsForPicture</b> object.\n\n @param options Indicates a DecodingOptionsForPicture pointer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 13"]
1777    #[cfg(feature = "api-13")]
1778    pub fn OH_DecodingOptionsForPicture_Release(
1779        options: *mut OH_DecodingOptionsForPicture,
1780    ) -> Image_ErrorCode;
1781}
1782extern "C" {
1783    #[doc = " @brief Obtains the supported image formats that can be decoded.\n\n @param supportedFormats Double pointer to an array of the supported image formats.\n @param length Pointer to the length of the array.\n @return One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if <b>supportedFormats</b> or <b>length</b> is empty.\n @since 20"]
1784    #[cfg(feature = "api-20")]
1785    pub fn OH_ImageSourceNative_GetSupportedFormats(
1786        supportedFormats: *mut *mut Image_MimeType,
1787        length: *mut usize,
1788    ) -> Image_ErrorCode;
1789}
1790extern "C" {
1791    #[doc = " @brief Obtains the value of an image property as short int type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a short int value.\n @since 23"]
1792    #[cfg(feature = "api-23")]
1793    pub fn OH_ImageSourceNative_GetImagePropertyShort(
1794        source: *mut OH_ImageSourceNative,
1795        key: *mut Image_String,
1796        value: *mut u16,
1797    ) -> Image_ErrorCode;
1798}
1799extern "C" {
1800    #[doc = " @brief Obtains the value of an image property as long int type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a long int value.\n @since 23"]
1801    #[cfg(feature = "api-23")]
1802    pub fn OH_ImageSourceNative_GetImagePropertyLong(
1803        source: *mut OH_ImageSourceNative,
1804        key: *mut Image_String,
1805        value: *mut u32,
1806    ) -> Image_ErrorCode;
1807}
1808extern "C" {
1809    #[doc = " @brief Obtains the value of an image property as double type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double value.\n @since 23"]
1810    #[cfg(feature = "api-23")]
1811    pub fn OH_ImageSourceNative_GetImagePropertyDouble(
1812        source: *mut OH_ImageSourceNative,
1813        key: *mut Image_String,
1814        value: *mut f64,
1815    ) -> Image_ErrorCode;
1816}
1817extern "C" {
1818    #[doc = " @brief Gets the array length of an array type property or the string length of a string type property.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param size Array length for an array type property, string length for a string type property. Output Parameter.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist,\n         or is not a array\\string value.\n @since 23"]
1819    #[cfg(feature = "api-23")]
1820    pub fn OH_ImageSourceNative_GetImagePropertyArraySize(
1821        source: *mut OH_ImageSourceNative,
1822        key: *mut Image_String,
1823        size: *mut usize,
1824    ) -> Image_ErrorCode;
1825}
1826extern "C" {
1827    #[doc = " @brief Obtains the value of an image property as string type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size String length.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a string value.\n @since 23"]
1828    #[cfg(feature = "api-23")]
1829    pub fn OH_ImageSourceNative_GetImagePropertyString(
1830        source: *mut OH_ImageSourceNative,
1831        key: *mut Image_String,
1832        value: *mut ::std::os::raw::c_char,
1833        size: usize,
1834    ) -> Image_ErrorCode;
1835}
1836extern "C" {
1837    #[doc = " @brief Obtains the value of an image property as int array.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size Array length.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a int array.\n @since 23"]
1838    #[cfg(feature = "api-23")]
1839    pub fn OH_ImageSourceNative_GetImagePropertyIntArray(
1840        source: *mut OH_ImageSourceNative,
1841        key: *mut Image_String,
1842        value: *mut i32,
1843        size: usize,
1844    ) -> Image_ErrorCode;
1845}
1846extern "C" {
1847    #[doc = " @brief Obtains the value of an image property as double array.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size Array length.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double array.\n @since 23"]
1848    #[cfg(feature = "api-23")]
1849    pub fn OH_ImageSourceNative_GetImagePropertyDoubleArray(
1850        source: *mut OH_ImageSourceNative,
1851        key: *mut Image_String,
1852        value: *mut f64,
1853        size: usize,
1854    ) -> Image_ErrorCode;
1855}
1856extern "C" {
1857    #[doc = " @brief Obtains the value of an image property as blob.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size Array length.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a blob.\n @since 23"]
1858    #[cfg(feature = "api-23")]
1859    pub fn OH_ImageSourceNative_GetImagePropertyBlob(
1860        source: *mut OH_ImageSourceNative,
1861        key: *mut Image_String,
1862        value: *mut ::std::os::raw::c_void,
1863        size: usize,
1864    ) -> Image_ErrorCode;
1865}
1866extern "C" {
1867    #[doc = " @brief Modify the value of an image property as short int.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a short int.\n @since 23"]
1868    #[cfg(feature = "api-23")]
1869    pub fn OH_ImageSourceNative_ModifyImagePropertyShort(
1870        source: *mut OH_ImageSourceNative,
1871        key: *mut Image_String,
1872        value: u16,
1873    ) -> Image_ErrorCode;
1874}
1875extern "C" {
1876    #[doc = " @brief Modify the value of an image property as long int.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a long int.\n @since 23"]
1877    #[cfg(feature = "api-23")]
1878    pub fn OH_ImageSourceNative_ModifyImagePropertyLong(
1879        source: *mut OH_ImageSourceNative,
1880        key: *mut Image_String,
1881        value: u32,
1882    ) -> Image_ErrorCode;
1883}
1884extern "C" {
1885    #[doc = " @brief Modify the value of an image property as double.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double.\n @since 23"]
1886    #[cfg(feature = "api-23")]
1887    pub fn OH_ImageSourceNative_ModifyImagePropertyDouble(
1888        source: *mut OH_ImageSourceNative,
1889        key: *mut Image_String,
1890        value: f64,
1891    ) -> Image_ErrorCode;
1892}
1893extern "C" {
1894    #[doc = " @brief Modify the value of an image property as int array.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @param size Array length.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not an int array.\n @since 23"]
1895    #[cfg(feature = "api-23")]
1896    pub fn OH_ImageSourceNative_ModifyImagePropertyIntArray(
1897        source: *mut OH_ImageSourceNative,
1898        key: *mut Image_String,
1899        value: *mut i32,
1900        size: usize,
1901    ) -> Image_ErrorCode;
1902}
1903extern "C" {
1904    #[doc = " @brief Modify the value of an image property as double array.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @param size Array length.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double array.\n @since 23"]
1905    #[cfg(feature = "api-23")]
1906    pub fn OH_ImageSourceNative_ModifyImagePropertyDoubleArray(
1907        source: *mut OH_ImageSourceNative,
1908        key: *mut Image_String,
1909        value: *mut f64,
1910        size: usize,
1911    ) -> Image_ErrorCode;
1912}
1913extern "C" {
1914    #[doc = " @brief Modify the value of an image property as blob.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @param size Array length.\n @return Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a blob.\n @since 23"]
1915    #[cfg(feature = "api-23")]
1916    pub fn OH_ImageSourceNative_ModifyImagePropertyBlob(
1917        source: *mut OH_ImageSourceNative,
1918        key: *mut Image_String,
1919        value: *mut ::std::os::raw::c_void,
1920        size: usize,
1921    ) -> Image_ErrorCode;
1922}
1923#[doc = " @brief Define a ImagePacker struct type, used for ImagePacker pointer controls.\n\n @since 12"]
1924#[repr(C)]
1925#[derive(Debug, Copy, Clone)]
1926pub struct OH_ImagePackerNative {
1927    _unused: [u8; 0],
1928}
1929#[doc = " @brief Defines the image packing options.\n\n @since 12"]
1930#[repr(C)]
1931#[derive(Debug, Copy, Clone)]
1932pub struct OH_PackingOptions {
1933    _unused: [u8; 0],
1934}
1935#[doc = " @brief Defines the image sequence packing options.\n\n @since 18"]
1936#[cfg(feature = "api-18")]
1937#[repr(C)]
1938#[derive(Debug, Copy, Clone)]
1939pub struct OH_PackingOptionsForSequence {
1940    _unused: [u8; 0],
1941}
1942extern "C" {
1943    #[doc = " @brief Create a pointer for PackingOptions struct.\n\n @param options The PackingOptions pointer will be operated.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
1944    pub fn OH_PackingOptions_Create(options: *mut *mut OH_PackingOptions) -> Image_ErrorCode;
1945}
1946extern "C" {
1947    #[doc = " @brief Get mime type for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param format the number of image format.The user can pass in a null pointer and zero size, we will allocate memory,\n but user must free memory after use.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or format is nullptr.\n         {@link IMAGE_ALLOC_FAILED} allocate memory failed.\n         {@link IMAGE_COPY_FAILED} copy memory failed\n @since 12"]
1948    pub fn OH_PackingOptions_GetMimeType(
1949        options: *mut OH_PackingOptions,
1950        format: *mut Image_MimeType,
1951    ) -> Image_ErrorCode;
1952}
1953extern "C" {
1954    #[doc = " @brief Gets MIME type from OH_PackingOptions. The output format.data is null-terminated.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param format MimeType set in the OH_PackingOptions.\n @return Returns functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_PACKER_INVALID_PARAMETER} if options or format is nullptr.\n @since 19"]
1955    #[cfg(feature = "api-19")]
1956    pub fn OH_PackingOptions_GetMimeTypeWithNull(
1957        options: *mut OH_PackingOptions,
1958        format: *mut Image_MimeType,
1959    ) -> Image_ErrorCode;
1960}
1961extern "C" {
1962    #[doc = " @brief Set format number for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param format the number of image format.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or format is nullptr.\n         {@link IMAGE_ALLOC_FAILED} allocate memory failed.\n         {@link IMAGE_COPY_FAILED} copy memory failed.\n @since 12"]
1963    pub fn OH_PackingOptions_SetMimeType(
1964        options: *mut OH_PackingOptions,
1965        format: *mut Image_MimeType,
1966    ) -> Image_ErrorCode;
1967}
1968extern "C" {
1969    #[doc = " @brief Get quality for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param quality The number of image quality.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or quality is nullptr.\n @since 12"]
1970    pub fn OH_PackingOptions_GetQuality(
1971        options: *mut OH_PackingOptions,
1972        quality: *mut u32,
1973    ) -> Image_ErrorCode;
1974}
1975extern "C" {
1976    #[doc = " @brief Set quality number for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param quality The number of image quality.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
1977    pub fn OH_PackingOptions_SetQuality(
1978        options: *mut OH_PackingOptions,
1979        quality: u32,
1980    ) -> Image_ErrorCode;
1981}
1982extern "C" {
1983    #[doc = " @brief Get needsPackProperties for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param needsPackProperties Whether the image properties can be saved, like Exif.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or needsPackProperties is nullptr.\n @since 12"]
1984    pub fn OH_PackingOptions_GetNeedsPackProperties(
1985        options: *mut OH_PackingOptions,
1986        needsPackProperties: *mut bool,
1987    ) -> Image_ErrorCode;
1988}
1989extern "C" {
1990    #[doc = " @brief Set needsPackProperties for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param needsPackProperties Whether the image properties can be saved, like Exif.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
1991    pub fn OH_PackingOptions_SetNeedsPackProperties(
1992        options: *mut OH_PackingOptions,
1993        needsPackProperties: bool,
1994    ) -> Image_ErrorCode;
1995}
1996extern "C" {
1997    #[doc = " @brief Get desiredDynamicRange for PackingOptions struct.\n\n @param options The PackingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. Pointer connot be null.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredDynamicRange is nullptr.\n @since 12"]
1998    pub fn OH_PackingOptions_GetDesiredDynamicRange(
1999        options: *mut OH_PackingOptions,
2000        desiredDynamicRange: *mut i32,
2001    ) -> Image_ErrorCode;
2002}
2003extern "C" {
2004    #[doc = " @brief Set desiredDynamicRange number for PackingOptions struct.\n\n @param options The PackingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
2005    pub fn OH_PackingOptions_SetDesiredDynamicRange(
2006        options: *mut OH_PackingOptions,
2007        desiredDynamicRange: i32,
2008    ) -> Image_ErrorCode;
2009}
2010extern "C" {
2011    #[doc = " @brief delete OH_PackingOptions pointer.\n\n @param options The OH_PackingOptions pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
2012    pub fn OH_PackingOptions_Release(options: *mut OH_PackingOptions) -> Image_ErrorCode;
2013}
2014extern "C" {
2015    #[doc = " @brief Create a pointer for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
2016    #[cfg(feature = "api-18")]
2017    pub fn OH_PackingOptionsForSequence_Create(
2018        options: *mut *mut OH_PackingOptionsForSequence,
2019    ) -> Image_ErrorCode;
2020}
2021extern "C" {
2022    #[doc = " @brief Set FrameCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param frameCount The number of image frameCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
2023    #[cfg(feature = "api-18")]
2024    pub fn OH_PackingOptionsForSequence_SetFrameCount(
2025        options: *mut OH_PackingOptionsForSequence,
2026        frameCount: u32,
2027    ) -> Image_ErrorCode;
2028}
2029extern "C" {
2030    #[doc = " @brief Get FrameCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param frameCount The number of image frameCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options or frameCount is nullptr.\n @since 18"]
2031    #[cfg(feature = "api-18")]
2032    pub fn OH_PackingOptionsForSequence_GetFrameCount(
2033        options: *mut OH_PackingOptionsForSequence,
2034        frameCount: *mut u32,
2035    ) -> Image_ErrorCode;
2036}
2037extern "C" {
2038    #[doc = " @brief Set DelayTimeList number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param delayTimeList The pointer of image delayTime list.\n @param delayTimeListLength The number of image delayTimeListLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr.\n @since 18"]
2039    #[cfg(feature = "api-18")]
2040    pub fn OH_PackingOptionsForSequence_SetDelayTimeList(
2041        options: *mut OH_PackingOptionsForSequence,
2042        delayTimeList: *mut i32,
2043        delayTimeListLength: usize,
2044    ) -> Image_ErrorCode;
2045}
2046extern "C" {
2047    #[doc = " @brief Get DelayTimeList number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param delayTimeList The pointer of image delayTime list.\n @param delayTimeListLength The number of image delayTimeListLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr.\n @since 18"]
2048    #[cfg(feature = "api-18")]
2049    pub fn OH_PackingOptionsForSequence_GetDelayTimeList(
2050        options: *mut OH_PackingOptionsForSequence,
2051        delayTimeList: *mut i32,
2052        delayTimeListLength: usize,
2053    ) -> Image_ErrorCode;
2054}
2055extern "C" {
2056    #[doc = " @brief Set DisposalTypes number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param disposalTypes The pointer of image disposalTypes.\n @param disposalTypesLength The number of image disposalTypesLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr.\n @since 18"]
2057    #[cfg(feature = "api-18")]
2058    pub fn OH_PackingOptionsForSequence_SetDisposalTypes(
2059        options: *mut OH_PackingOptionsForSequence,
2060        disposalTypes: *mut u32,
2061        disposalTypesLength: usize,
2062    ) -> Image_ErrorCode;
2063}
2064extern "C" {
2065    #[doc = " @brief Get DisposalTypes number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param disposalTypes The pointer of image disposalTypes.\n @param disposalTypesLength The number of image disposalTypesLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr.\n @since 18"]
2066    #[cfg(feature = "api-18")]
2067    pub fn OH_PackingOptionsForSequence_GetDisposalTypes(
2068        options: *mut OH_PackingOptionsForSequence,
2069        disposalTypes: *mut u32,
2070        disposalTypesLength: usize,
2071    ) -> Image_ErrorCode;
2072}
2073extern "C" {
2074    #[doc = " @brief Set LoopCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param loopCount The number of image loopCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
2075    #[cfg(feature = "api-18")]
2076    pub fn OH_PackingOptionsForSequence_SetLoopCount(
2077        options: *mut OH_PackingOptionsForSequence,
2078        loopCount: u32,
2079    ) -> Image_ErrorCode;
2080}
2081extern "C" {
2082    #[doc = " @brief Get LoopCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param loopCount The number of image loopCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options or loopCount is nullptr.\n @since 18"]
2083    #[cfg(feature = "api-18")]
2084    pub fn OH_PackingOptionsForSequence_GetLoopCount(
2085        options: *mut OH_PackingOptionsForSequence,
2086        loopCount: *mut u32,
2087    ) -> Image_ErrorCode;
2088}
2089extern "C" {
2090    #[doc = " @brief delete OH_PackingOptionsForSequence pointer.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
2091    #[cfg(feature = "api-18")]
2092    pub fn OH_PackingOptionsForSequence_Release(
2093        options: *mut OH_PackingOptionsForSequence,
2094    ) -> Image_ErrorCode;
2095}
2096extern "C" {
2097    #[doc = " @brief Create a pointer for OH_ImagePackerNative struct.\n\n @param imagePacker The imagePacker to be created.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
2098    pub fn OH_ImagePackerNative_Create(
2099        imagePacker: *mut *mut OH_ImagePackerNative,
2100    ) -> Image_ErrorCode;
2101}
2102extern "C" {
2103    #[doc = " @brief Encoding an <b>ImageSource</b> into the data with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param imageSource The imageSource to be packed.\n @param outData The output data buffer to store the packed image.\n @param size A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or imageSource is nullptr, or outData is nullptr.\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
2104    pub fn OH_ImagePackerNative_PackToDataFromImageSource(
2105        imagePacker: *mut OH_ImagePackerNative,
2106        options: *mut OH_PackingOptions,
2107        imageSource: *mut OH_ImageSourceNative,
2108        outData: *mut u8,
2109        size: *mut usize,
2110    ) -> Image_ErrorCode;
2111}
2112extern "C" {
2113    #[doc = " @brief Encoding a <b>Pixelmap</b> into the data with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param pixelmap The pixelmap to be packed.\n @param outData The output data buffer to store the packed image.\n @param size A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or pixelmap is nullptr, or outData is nullptr.\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
2114    pub fn OH_ImagePackerNative_PackToDataFromPixelmap(
2115        imagePacker: *mut OH_ImagePackerNative,
2116        options: *mut OH_PackingOptions,
2117        pixelmap: *mut OH_PixelmapNative,
2118        outData: *mut u8,
2119        size: *mut usize,
2120    ) -> Image_ErrorCode;
2121}
2122extern "C" {
2123    #[doc = " @brief Encoding a <b>Picture</b> into the data with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param picture The picture to be packed.\n @param outData The output data buffer to store the packed image.\n @param size A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} imagePacker is nullptr, or picture is nullptr, or outData is nullptr,\n         or size is invalid.\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 13"]
2124    #[cfg(feature = "api-13")]
2125    pub fn OH_ImagePackerNative_PackToDataFromPicture(
2126        imagePacker: *mut OH_ImagePackerNative,
2127        options: *mut OH_PackingOptions,
2128        picture: *mut OH_PictureNative,
2129        outData: *mut u8,
2130        size: *mut usize,
2131    ) -> Image_ErrorCode;
2132}
2133extern "C" {
2134    #[doc = " @brief Encoding a <b>PixelMap</b> sequence into the data\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptionsForSequence}.\n @param pixelmapSequence The pixelmap sequence to be packed.\n @param sequenceLength The pixelmap sequence size to be packed.\n @param outData The output data buffer to store the packed image.\n @param outDataSize A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or size/length is invalid\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 18"]
2135    #[cfg(feature = "api-18")]
2136    pub fn OH_ImagePackerNative_PackToDataFromPixelmapSequence(
2137        imagePacker: *mut OH_ImagePackerNative,
2138        options: *mut OH_PackingOptionsForSequence,
2139        pixelmapSequence: *mut *mut OH_PixelmapNative,
2140        sequenceLength: usize,
2141        outData: *mut u8,
2142        outDataSize: *mut usize,
2143    ) -> Image_ErrorCode;
2144}
2145extern "C" {
2146    #[doc = " @brief Encoding an <b>ImageSource</b> into the a file with fd with required format.\n\n @param imagePacker The image packer to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param imageSource The imageSource to be packed.\n @param fd Indicates a writable file descriptor.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or imageSource is nullptr, or fd is invalid.\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
2147    pub fn OH_ImagePackerNative_PackToFileFromImageSource(
2148        imagePacker: *mut OH_ImagePackerNative,
2149        options: *mut OH_PackingOptions,
2150        imageSource: *mut OH_ImageSourceNative,
2151        fd: i32,
2152    ) -> Image_ErrorCode;
2153}
2154extern "C" {
2155    #[doc = " @brief Encoding a <b>Pixelmap</b> into the a file with fd with required format\n\n @param imagePacker The image packer to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param pixelmap The pixelmap to be packed.\n @param fd Indicates a writable file descriptor.\n @return @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or pixelmap is nullptr, or fd is invalid.\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
2156    pub fn OH_ImagePackerNative_PackToFileFromPixelmap(
2157        imagePacker: *mut OH_ImagePackerNative,
2158        options: *mut OH_PackingOptions,
2159        pixelmap: *mut OH_PixelmapNative,
2160        fd: i32,
2161    ) -> Image_ErrorCode;
2162}
2163extern "C" {
2164    #[doc = " @brief Encoding a <b>Picture</b> into the a file with fd with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param picture The picture to be packed.\n @param fd Indicates a writable file descriptor.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} imagePacker is nullptr, or picture is nullptr, or fd is invalid.\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 13"]
2165    #[cfg(feature = "api-13")]
2166    pub fn OH_ImagePackerNative_PackToFileFromPicture(
2167        imagePacker: *mut OH_ImagePackerNative,
2168        options: *mut OH_PackingOptions,
2169        picture: *mut OH_PictureNative,
2170        fd: i32,
2171    ) -> Image_ErrorCode;
2172}
2173extern "C" {
2174    #[doc = " @brief Encoding a <b>PixelMap</b> sequence into the a file with fd\n\n @param imagePacker The image packer to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptionsForSequence}.\n @param pixelmapSequence The pixelmap sequence to be packed.\n @param sequenceLength The pixelmap sequence size to be packed.\n @param fd Indicates a writable file descriptor.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or length is invalid\n         {@link IMAGE_ENCODE_FAILED} encode failed.\n @since 18"]
2175    #[cfg(feature = "api-18")]
2176    pub fn OH_ImagePackerNative_PackToFileFromPixelmapSequence(
2177        imagePacker: *mut OH_ImagePackerNative,
2178        options: *mut OH_PackingOptionsForSequence,
2179        pixelmapSequence: *mut *mut OH_PixelmapNative,
2180        sequenceLength: usize,
2181        fd: i32,
2182    ) -> Image_ErrorCode;
2183}
2184extern "C" {
2185    #[doc = " @brief Releases an imagePacker object.\n\n @param imagePacker A pointer to the image packer object to be released.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} imagePacker is nullptr.\n @since 12"]
2186    pub fn OH_ImagePackerNative_Release(imagePacker: *mut OH_ImagePackerNative) -> Image_ErrorCode;
2187}
2188extern "C" {
2189    #[doc = " @brief Obtains the supported image formats that can be encoded.\n\n @param supportedFormats Double pointer to an array of the supported image formats.\n @param length Pointer to the length of the array.\n @return One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_PACKER_INVALID_PARAMETER} if <b>supportedFormats</b> or <b>length</b> is empty.\n @since 20"]
2190    #[cfg(feature = "api-20")]
2191    pub fn OH_ImagePackerNative_GetSupportedFormats(
2192        supportedFormats: *mut *mut Image_MimeType,
2193        length: *mut usize,
2194    ) -> Image_ErrorCode;
2195}
2196#[doc = " @brief Defines an <b>OH_ImageReceiverNative</b> object.\n\n @since 12"]
2197#[repr(C)]
2198#[derive(Debug, Copy, Clone)]
2199pub struct OH_ImageReceiverNative {
2200    _unused: [u8; 0],
2201}
2202#[doc = " @brief Defines an image receiver options object.\n\n @since 12"]
2203#[repr(C)]
2204#[derive(Debug, Copy, Clone)]
2205pub struct OH_ImageReceiverOptions {
2206    _unused: [u8; 0],
2207}
2208#[doc = " @brief Defines the callbacks for images.\n\n @since 12"]
2209pub type OH_ImageReceiver_OnCallback =
2210    ::std::option::Option<unsafe extern "C" fn(receiver: *mut OH_ImageReceiverNative)>;
2211#[doc = " @brief Defines the callback for the ImageArrive event.\n\n @since 20"]
2212#[cfg(feature = "api-20")]
2213pub type OH_ImageReceiver_ImageArriveCallback = ::std::option::Option<
2214    unsafe extern "C" fn(
2215        receiver: *mut OH_ImageReceiverNative,
2216        userData: *mut ::std::os::raw::c_void,
2217    ),
2218>;
2219extern "C" {
2220    #[doc = " @brief Creates an <b>OH_ImageReceiverOptions</b> object at the application layer.\n\n @param options Indicates the pointer to the <b>OH_ImageReceiverOptions</b> object obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @since 12"]
2221    pub fn OH_ImageReceiverOptions_Create(
2222        options: *mut *mut OH_ImageReceiverOptions,
2223    ) -> Image_ErrorCode;
2224}
2225extern "C" {
2226    #[doc = " @brief Get size of an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param size Indicates the value of the {@Link Image_Size} object will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
2227    pub fn OH_ImageReceiverOptions_GetSize(
2228        options: *mut OH_ImageReceiverOptions,
2229        size: *mut Image_Size,
2230    ) -> Image_ErrorCode;
2231}
2232extern "C" {
2233    #[doc = " @brief Set size of an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param size Indicates the value of the {@link Image_Size} object will be seted.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
2234    pub fn OH_ImageReceiverOptions_SetSize(
2235        options: *mut OH_ImageReceiverOptions,
2236        size: Image_Size,
2237    ) -> Image_ErrorCode;
2238}
2239extern "C" {
2240    #[doc = " @brief Get capacity from an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param capacity Indicates the pointer to capacity will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
2241    pub fn OH_ImageReceiverOptions_GetCapacity(
2242        options: *mut OH_ImageReceiverOptions,
2243        capacity: *mut i32,
2244    ) -> Image_ErrorCode;
2245}
2246extern "C" {
2247    #[doc = " @brief Set capacity of an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param capacity Indicates the value of capacity will be seted.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
2248    pub fn OH_ImageReceiverOptions_SetCapacity(
2249        options: *mut OH_ImageReceiverOptions,
2250        capacity: i32,
2251    ) -> Image_ErrorCode;
2252}
2253extern "C" {
2254    #[doc = " @brief Releases an {@link OH_ImageReceiverOptions} object.\n It is used to release the object {@link OH_ImageReceiverOptions}.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverOptions\n @since 12"]
2255    pub fn OH_ImageReceiverOptions_Release(
2256        options: *mut OH_ImageReceiverOptions,
2257    ) -> Image_ErrorCode;
2258}
2259extern "C" {
2260    #[doc = " @brief Creates an <b>OH_ImageReceiverNative</b> object at the application layer.\n\n @param options Indicates the options for setting the <b>OH_ImageReceiverNative</b> object.\n @param receiver Indicates the pointer to the <b>OH_ImageReceiverNative</b> object obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @since 12"]
2261    pub fn OH_ImageReceiverNative_Create(
2262        options: *mut OH_ImageReceiverOptions,
2263        receiver: *mut *mut OH_ImageReceiverNative,
2264    ) -> Image_ErrorCode;
2265}
2266extern "C" {
2267    #[doc = " @brief Obtains the receiver ID through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param surfaceId Indicates the pointer to the surfaceID will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n @see OH_ImageReceiverNative\n @since 12"]
2268    pub fn OH_ImageReceiverNative_GetReceivingSurfaceId(
2269        receiver: *mut OH_ImageReceiverNative,
2270        surfaceId: *mut u64,
2271    ) -> Image_ErrorCode;
2272}
2273extern "C" {
2274    #[doc = " @brief Obtains the latest image through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param image Indicates the pointer to an <b>OH_ImageNative</b> object at the application layer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n returns {@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @see OH_ImageReceiverNative, OH_ImageNative\n @since 12"]
2275    pub fn OH_ImageReceiverNative_ReadLatestImage(
2276        receiver: *mut OH_ImageReceiverNative,
2277        image: *mut *mut OH_ImageNative,
2278    ) -> Image_ErrorCode;
2279}
2280extern "C" {
2281    #[doc = " @brief Obtains the next image through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param image Indicates the pointer to an <b>OH_ImageNative</b> object at the application layer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n returns {@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @see OH_ImageReceiverNative, OH_ImageNative\n @since 12"]
2282    pub fn OH_ImageReceiverNative_ReadNextImage(
2283        receiver: *mut OH_ImageReceiverNative,
2284        image: *mut *mut OH_ImageNative,
2285    ) -> Image_ErrorCode;
2286}
2287extern "C" {
2288    #[doc = " @brief Registers an {@link OH_ImageReceiver_OnCallback} callback event.\n\n This callback event is triggered whenever a new image is received.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param callback Indicates the {@link OH_ImageReceiver_OnCallback} callback event to register.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative, OH_ImageReceiver_OnCallback\n @since 12"]
2289    pub fn OH_ImageReceiverNative_On(
2290        receiver: *mut OH_ImageReceiverNative,
2291        callback: OH_ImageReceiver_OnCallback,
2292    ) -> Image_ErrorCode;
2293}
2294extern "C" {
2295    #[doc = " @brief Unregisters the {@link OH_ImageReceiver_OnCallback} callback event.\n\n Turn off the callback witch triggered by {@link OH_ImageReceiverNative_On}.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative, OH_ImageReceiverNative_On\n @since 12"]
2296    pub fn OH_ImageReceiverNative_Off(receiver: *mut OH_ImageReceiverNative) -> Image_ErrorCode;
2297}
2298extern "C" {
2299    #[doc = " Registers an {@link OH_ImageReceiver_ImageArriveCallback} callback.\n\n @param receiver Pointer to an OH_ImageReceiverNative object that processes the callback.\n @param callback OH_ImageReceiver_ImageArriveCallback to register.\n @param userData Pointer to the user data passed to the callback.\n @return Result code. {@link Image_ErrorCode} IMAGE_SUCCESS is returned if the operation is successful.\n {@link Image_ErrorCode} IMAGE_RECEIVER_INVALID_PARAMETER is returned if receiver or callback is null.\n @since 20"]
2300    #[cfg(feature = "api-20")]
2301    pub fn OH_ImageReceiverNative_OnImageArrive(
2302        receiver: *mut OH_ImageReceiverNative,
2303        callback: OH_ImageReceiver_ImageArriveCallback,
2304        userData: *mut ::std::os::raw::c_void,
2305    ) -> Image_ErrorCode;
2306}
2307extern "C" {
2308    #[doc = " Unregisters an {@link OH_ImageReceiver_ImageArriveCallback} callback.\n\n @param receiver Pointer to an <b>OH_ImageReceiverNative</b> object that processes the callback.\n @param callback <b>OH_ImageReceiver_ImageArriveCallback</b> callback to unregister.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - Operation succeeded.\n {@link Image_ErrorCode} IMAGE_RECEIVER_INVALID_PARAMETER - <b>receiver</b> is empty or <b>callback</b> is not\n registered.\n @since 20"]
2309    #[cfg(feature = "api-20")]
2310    pub fn OH_ImageReceiverNative_OffImageArrive(
2311        receiver: *mut OH_ImageReceiverNative,
2312        callback: OH_ImageReceiver_ImageArriveCallback,
2313    ) -> Image_ErrorCode;
2314}
2315extern "C" {
2316    #[doc = " @brief Obtains the size of the image receiver through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param size Indicates the pointer to the {@link Image_Size} object will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative, Image_Size\n @since 12"]
2317    pub fn OH_ImageReceiverNative_GetSize(
2318        receiver: *mut OH_ImageReceiverNative,
2319        size: *mut Image_Size,
2320    ) -> Image_ErrorCode;
2321}
2322extern "C" {
2323    #[doc = " @brief Obtains the capacity of the image receiver through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param capacity Indicates the pointer to the capacity will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative\n @since 12"]
2324    pub fn OH_ImageReceiverNative_GetCapacity(
2325        receiver: *mut OH_ImageReceiverNative,
2326        capacity: *mut i32,
2327    ) -> Image_ErrorCode;
2328}
2329extern "C" {
2330    #[doc = " @brief Releases an {@link OH_ImageReceiverNative} object.\n\n This API is not used to release an <b>ImageReceiver2</b> object at the application layer.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative\n @since 12"]
2331    pub fn OH_ImageReceiverNative_Release(receiver: *mut OH_ImageReceiverNative)
2332        -> Image_ErrorCode;
2333}