Skip to main content

ohos_image_native_sys/
lib.rs

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