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