Skip to main content

ohos_image_native_sys/
lib.rs

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