Skip to main content

ohos_image_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_resource_manager_sys::*;
13
14#[link(name = "ohimage")]
15#[link(name = "image_packer")]
16#[link(name = "picture")]
17#[link(name = "image_receiver")]
18#[link(name = "image_source")]
19#[link(name = "pixelmap")]
20#[link(name = "image_ndk.z")]
21#[link(name = "image_packer_ndk.z")]
22#[link(name = "image_receiver_ndk.z")]
23#[link(name = "image_source_ndk.z")]
24#[link(name = "pixelmap_ndk.z")]
25unsafe extern "C" {}
26
27#[doc = " @brief Defines the image size.\n\n @since 10\n @version 2.0"]
28#[repr(C)]
29#[derive(Debug, Copy, Clone)]
30pub struct OhosImageSize {
31    #[doc = " Image width, in pixels."]
32    pub width: i32,
33    #[doc = " Image height, in pixels."]
34    pub height: i32,
35}
36#[repr(C)]
37#[derive(Debug, Copy, Clone)]
38pub struct ImageNative_ {
39    _unused: [u8; 0],
40}
41#[doc = " @brief Defines an image object at the native layer for the image interface.\n\n @since 10\n @version 2.0"]
42pub type ImageNative = ImageNative_;
43#[doc = " @brief Defines the information about an image rectangle.\n\n @since 10\n @version 2.0"]
44#[repr(C)]
45#[derive(Debug, Copy, Clone)]
46pub struct OhosImageRect {
47    #[doc = " X coordinate of the rectangle."]
48    pub x: i32,
49    #[doc = " Y coordinate of the rectangle."]
50    pub y: i32,
51    #[doc = " Width of the rectangle, in pixels."]
52    pub width: i32,
53    #[doc = " Height of the rectangle, in pixels."]
54    pub height: i32,
55}
56#[doc = " @brief Defines the image composition information.\n\n @since 10\n @version 2.0"]
57#[repr(C)]
58#[derive(Debug, Copy, Clone)]
59pub struct OhosImageComponent {
60    #[doc = " Buffer that stores the pixel data."]
61    pub byteBuffer: *mut u8,
62    #[doc = " Size of the pixel data in the memory."]
63    pub size: usize,
64    #[doc = " Type of the pixel data."]
65    pub componentType: i32,
66    #[doc = " Row stride of the pixel data."]
67    pub rowStride: i32,
68    #[doc = " Pixel stride of the pixel data"]
69    pub pixelStride: i32,
70}
71extern "C" {
72    #[doc = " @brief Parses an {@link ImageNative} object at the native layer from a JavaScript native API <b>image </b> object.\n\n @param env Indicates the pointer to the Java Native Interface (JNI) environment.\n @param source Indicates a JavaScript native API <b>image </b> object.\n @return Returns an {@link ImageNative} pointer object if the operation is successful\n returns a null pointer otherwise.\n @see ImageNative, OH_Image_Release\n @since 10\n @version 2.0"]
73    pub fn OH_Image_InitImageNative(env: napi_env, source: napi_value) -> *mut ImageNative;
74}
75extern "C" {
76    #[doc = " @brief Obtains {@link OhosImageRect} of an {@link ImageNative} at the native layer.\n\n @param native Indicates the pointer to an {@link ImageNative} object at the native layer.\n @param rect Indicates the pointer to the {@link OhosImageRect} object obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n @see ImageNative, OhosImageRect\n @since 10\n @version 2.0"]
77    pub fn OH_Image_ClipRect(native: *const ImageNative, rect: *mut OhosImageRect) -> i32;
78}
79extern "C" {
80    #[doc = " @brief Obtains {@link OhosImageSize} of an {@link ImageNative} object at the native layer.\n\n @param native Indicates the pointer to an {@link ImageNative} object at the native layer.\n @param size Indicates the pointer to the {@link OhosImageSize} object obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n @see ImageNative, OhosImageSize\n @since 10\n @version 2.0"]
81    pub fn OH_Image_Size(native: *const ImageNative, size: *mut OhosImageSize) -> i32;
82}
83extern "C" {
84    #[doc = " @brief Obtains the image format of an {@link ImageNative} object at the native layer.\n\n @param native Indicates the pointer to an {@link ImageNative} object at the native layer.\n @param format Indicates the pointer to the image format obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n @see ImageNative\n @since 10\n @version 2.0"]
85    pub fn OH_Image_Format(native: *const ImageNative, format: *mut i32) -> i32;
86}
87extern "C" {
88    #[doc = " @brief Obtains {@link OhosImageComponent} of an {@link ImageNative} object at the native layer.\n\n @param native Indicates the pointer to an {@link ImageNative} object at the native layer.\n @param componentType Indicates the type of the required component.\n @param componentNative Indicates the pointer to the {@link OhosImageComponent} object obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n @see ImageNative, OhosImageComponent\n @since 10\n @version 2.0"]
89    pub fn OH_Image_GetComponent(
90        native: *const ImageNative,
91        componentType: i32,
92        componentNative: *mut OhosImageComponent,
93    ) -> i32;
94}
95extern "C" {
96    #[doc = " @brief Releases an {@link ImageNative} object at the native layer.\n Note: This API is not used to release a JavaScript native API <b>Image</b> object.\n It is used to release the object {@link ImageNative} at the native layer\n parsed by calling {@link OH_Image_InitImageNative}.\n\n @param native Indicates the pointer to an {@link ImageNative} object at the native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n @see ImageNative, OH_Image_InitImageNative\n @since 10\n @version 2.0"]
97    pub fn OH_Image_Release(native: *mut ImageNative) -> i32;
98}
99#[repr(C)]
100#[derive(Debug, Copy, Clone)]
101pub struct ImagePacker_Native_ {
102    _unused: [u8; 0],
103}
104#[doc = " @brief Defines an image packer object at the native layer for the image packer interface.\n\n @since 11\n @version 4.1"]
105pub type ImagePacker_Native = ImagePacker_Native_;
106#[doc = " @brief Defines the image packing options.\n\n @since 11\n @version 4.1"]
107#[repr(C)]
108#[derive(Debug, Copy, Clone)]
109pub struct ImagePacker_Opts_ {
110    #[doc = " Encoding format."]
111    pub format: *const ::std::os::raw::c_char,
112    #[doc = " Encoding quality."]
113    pub quality: ::std::os::raw::c_int,
114}
115#[doc = " @brief Defines alias of image packing options.\n\n @since 11\n @version 4.1"]
116pub type ImagePacker_Opts = ImagePacker_Opts_;
117extern "C" {
118    #[doc = " @brief Creates an <b>ImagePacker</b> object at the JavaScript native layer.\n\n @param env Indicates a pointer to the JavaScript Native Interface (JNI) environment.\n @param res Indicates a pointer to the <b>ImagePacker</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n\n @syscap SystemCapability.Multimedia.Image\n @since 11\n @version 4.1"]
119    pub fn OH_ImagePacker_Create(env: napi_env, res: *mut napi_value) -> i32;
120}
121extern "C" {
122    #[doc = " @brief Parses an {@link ImagePacker_Native} object at the native layer\n from a JavaScript native API <b>ImagePacker</b> object.\n\n @param env Indicates the pointer to the JavaScript Native Interface (JNI) environment.\n @param packer Indicates a JavaScript native API <b>ImagePacker</b> object.\n @return Returns an {@link ImagePacker_Native} pointer object if the operation is successful\n returns a null pointer otherwise.\n @see {@link OH_ImagePacker_Release}\n @since 11\n @version 4.1"]
123    pub fn OH_ImagePacker_InitNative(env: napi_env, packer: napi_value) -> *mut ImagePacker_Native;
124}
125extern "C" {
126    #[doc = " @brief Encoding an <b>ImageSource</b> or a <b>PixelMap</b> into the data with required format\n\n @param native Indicates the pointer to an {@link ImagePacker} object at the native layer.\n @param source Indicates an encoding source, a JS pixel map object or a JS image source object .\n @param opts Indicates the encoding {@link ImagePacker_Opts} .\n @param outData Indicates the pointer to the encoded data.\n @param size Indicates the pointer to the {@link OhosImageComponent} object obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} ERR_IMAGE_DATA_ABNORMAL - if output target abnormal\n returns {@link IRNdkErrCode} ERR_IMAGE_MISMATCHED_FORMAT - if format mismatched\n returns {@link IRNdkErrCode} ERR_IMAGE_MALLOC_ABNORMAL - if malloc internal buffer error\n returns {@link IRNdkErrCode} ERR_IMAGE_DECODE_ABNORMAL - if init codec internal error\n returns {@link IRNdkErrCode} ERR_IMAGE_ENCODE_FAILED - if encoder occur error during encoding\n @see {@link OH_ImagePacker_PackToFile}\n @since 11\n @version 4.1"]
127    pub fn OH_ImagePacker_PackToData(
128        native: *mut ImagePacker_Native,
129        source: napi_value,
130        opts: *mut ImagePacker_Opts,
131        outData: *mut u8,
132        size: *mut usize,
133    ) -> i32;
134}
135extern "C" {
136    #[doc = " @brief Encoding an <b>ImageSource</b> or a <b>PixelMap</b> into the a file with fd with required format\n\n @param native Indicates the pointer to an {@link ImagePacker} object at the native layer.\n @param source Indicates an encoding source, a JS pixel map object or a JS image source object .\n @param opts Indicates the encoding {@link ImagePacker_Opts} .\n @param fd Indicates the a writable file descriptor.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} ERR_IMAGE_DATA_ABNORMAL - if output target abnormal\n returns {@link IRNdkErrCode} ERR_IMAGE_MISMATCHED_FORMAT - if format mismatched\n returns {@link IRNdkErrCode} ERR_IMAGE_MALLOC_ABNORMAL - if malloc internal buffer error\n returns {@link IRNdkErrCode} ERR_IMAGE_DECODE_ABNORMAL - if init codec internal error\n returns {@link IRNdkErrCode} ERR_IMAGE_ENCODE_FAILED - if encoder occur error during encoding\n @see {@link OH_ImagePacker_PackToData}\n @since 11\n @version 4.1"]
137    pub fn OH_ImagePacker_PackToFile(
138        native: *mut ImagePacker_Native,
139        source: napi_value,
140        opts: *mut ImagePacker_Opts,
141        fd: ::std::os::raw::c_int,
142    ) -> i32;
143}
144extern "C" {
145    #[doc = " @brief Releases an {@link ImagePacker_Native} object at the native layer.\n Note: This API is not used to release a JavaScript native API <b>ImagePacker</b> object.\n It is used to release the object {@link ImagePacker_Native} at the native layer\n parsed by calling {@link OH_ImagePacker_InitNative}.\n\n @param native Indicates the pointer to an {@link ImagePacker_Native} object at the native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n @see {@link OH_ImagePacker_InitNative}\n @since 11\n @version 4.1"]
146    pub fn OH_ImagePacker_Release(native: *mut ImagePacker_Native) -> i32;
147}
148#[doc = " @brief Defines the native pixel map information.\n @since 10\n @version 1.0"]
149#[repr(C)]
150#[derive(Debug, Copy, Clone)]
151pub struct NativePixelMap_ {
152    _unused: [u8; 0],
153}
154#[doc = " @brief Defines the data type name of the native pixel map.\n @since 10\n @version 1.0"]
155pub type NativePixelMap = NativePixelMap_;
156#[doc = " @brief Defines the pixel map information.\n\n @since 10\n @version 1.0"]
157#[repr(C)]
158#[derive(Debug, Copy, Clone)]
159pub struct OhosPixelMapInfos {
160    #[doc = " Image width, in pixels."]
161    pub width: u32,
162    #[doc = " Image height, in pixels."]
163    pub height: u32,
164    #[doc = " Number of bytes per row."]
165    pub rowSize: u32,
166    #[doc = " Pixel format."]
167    pub pixelFormat: i32,
168}
169#[doc = " Nearest-neighbor interpolation."]
170pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_NONE:
171    OH_PixelMap_AntiAliasingLevel = 0;
172#[doc = " Bilinear interpolation, without mipmap linear filtering."]
173pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_LOW:
174    OH_PixelMap_AntiAliasingLevel = 1;
175#[doc = " Bilinear interpolation, with mipmap linear filtering."]
176pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_MEDIUM:
177    OH_PixelMap_AntiAliasingLevel = 2;
178#[doc = " Cubic interpolation."]
179pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_HIGH:
180    OH_PixelMap_AntiAliasingLevel = 3;
181#[doc = " @brief Enumerates the anti-aliasing level.\n\n @since 12\n @version 1.0"]
182pub type OH_PixelMap_AntiAliasingLevel = u32;
183#[doc = " @brief Defines the options used for creating a pixel map.\n\n @since 10\n @version 1.0"]
184#[repr(C)]
185#[derive(Debug, Copy, Clone)]
186pub struct OhosPixelMapCreateOps {
187    #[doc = " Image width, in pixels."]
188    pub width: u32,
189    #[doc = " Image height, in pixels."]
190    pub height: u32,
191    #[doc = " Image format."]
192    pub pixelFormat: i32,
193    #[doc = " Editing type of the image."]
194    pub editable: u32,
195    #[doc = " Alpha type of the image."]
196    pub alphaType: u32,
197    #[doc = " Scale mode of the image."]
198    pub scaleMode: u32,
199}
200extern "C" {
201    #[doc = " @brief Creates a <b>PixelMap</b> object.\n\n @param env Indicates the NAPI environment pointer.\n @param info Indicates the options for setting the <b>PixelMap</b> object.\n @param buf Indicates the pointer to the buffer of the image.\n @param len Indicates the image size.\n @param res Indicates the pointer to the <b>PixelMap</b> object at the application layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_ENCODER_FAILED - if create encoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INIT_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ENCODE_FAILED - if image add pixel map fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_UNSUPPORT - if image hardware decode unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_FAILED - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_IPC - if ipc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see CreatePixelMap\n @since 10\n @version 1.0"]
202    pub fn OH_PixelMap_CreatePixelMap(
203        env: napi_env,
204        info: OhosPixelMapCreateOps,
205        buf: *mut ::std::os::raw::c_void,
206        len: usize,
207        res: *mut napi_value,
208    ) -> i32;
209}
210extern "C" {
211    #[doc = " @brief Creates a <b>PixelMap</b> object with stride, whose memory is default as DMA.\n\n @param env Indicates the NAPI environment pointer.\n @param info Indicates the options for setting the <b>PixelMap</b> object.\n @param buf Indicates the pointer to the buffer of the image.\n @param len Indicates the image size.\n @param rowStride Indicates the stride of the image buffer.\n @param res Indicates the pointer to the <b>PixelMap</b> object at the application layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if info, len and rowStride do not match.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n @see OH_PixelMap_CreatePixelMapWithStride\n @since 12\n @version 1.0"]
212    pub fn OH_PixelMap_CreatePixelMapWithStride(
213        env: napi_env,
214        info: OhosPixelMapCreateOps,
215        buf: *mut ::std::os::raw::c_void,
216        len: usize,
217        rowStride: i32,
218        res: *mut napi_value,
219    ) -> i32;
220}
221extern "C" {
222    #[doc = " @brief Creates a <b>PixelMap</b> object that contains only alpha channel information.\n\n @param env Indicates the NAPI environment pointer.\n @param source Indicates the options for setting the <b>PixelMap</b> object.\n @param alpha Indicates the pointer to the alpha channel.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_ENCODER_FAILED - if create encoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INIT_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ENCODE_FAILED - if image add pixel map fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_UNSUPPORT - if image hardware decode unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_FAILED - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_IPC - if ipc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see CreateAlphaPixelMap\n @since 10\n @version 1.0"]
223    pub fn OH_PixelMap_CreateAlphaPixelMap(
224        env: napi_env,
225        source: napi_value,
226        alpha: *mut napi_value,
227    ) -> i32;
228}
229extern "C" {
230    #[doc = " @brief Initializes a <b>PixelMap</b> object.\n\n @param env Indicates the NAPI environment pointer.\n @param source Indicates the options for setting the <b>PixelMap</b> object.\n @return Returns a pointer to the <b>NativePixelMap</b> object\n if the operation is successful; returns nullptr otherwise.\n @see InitNativePixelMap\n @since 10\n @version 1.0"]
231    pub fn OH_PixelMap_InitNativePixelMap(env: napi_env, source: napi_value)
232        -> *mut NativePixelMap;
233}
234extern "C" {
235    #[doc = " @brief Obtains the number of bytes per row of a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param num Indicates the pointer to the number of bytes per row of the <b>PixelMap</b> object.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n @see GetBytesNumberPerRow\n @since 10\n @version 1.0"]
236    pub fn OH_PixelMap_GetBytesNumberPerRow(native: *const NativePixelMap, num: *mut i32) -> i32;
237}
238extern "C" {
239    #[doc = " @brief Checks whether a <b>PixelMap</b> object is editable.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param editable Indicates the pointer to the editing type of the <b>PixelMap</b> object.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n @see GetIsEditable\n @since 10\n @version 1.0"]
240    pub fn OH_PixelMap_GetIsEditable(native: *const NativePixelMap, editable: *mut i32) -> i32;
241}
242extern "C" {
243    #[doc = " @brief Checks whether a <b>PixelMap</b> object supports alpha channels.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param alpha Indicates the pointer to the support for alpha channels.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n @see IsSupportAlpha\n @since 10\n @version 1.0"]
244    pub fn OH_PixelMap_IsSupportAlpha(native: *const NativePixelMap, alpha: *mut i32) -> i32;
245}
246extern "C" {
247    #[doc = " @brief Sets an alpha channel for a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param alpha Indicates the alpha channel to set.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n @see SetAlphaAble\n @since 10\n @version 1.0"]
248    pub fn OH_PixelMap_SetAlphaAble(native: *const NativePixelMap, alpha: i32) -> i32;
249}
250extern "C" {
251    #[doc = " @brief Obtains the pixel density of a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param density Indicates the pointer to the pixel density.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n @see GetDensity\n @since 10\n @version 1.0"]
252    pub fn OH_PixelMap_GetDensity(native: *const NativePixelMap, density: *mut i32) -> i32;
253}
254extern "C" {
255    #[doc = " @brief Sets the pixel density for a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param density Indicates the pixel density to set.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n @see GetDensity\n @since 10\n @version 1.0"]
256    pub fn OH_PixelMap_SetDensity(native: *const NativePixelMap, density: i32) -> i32;
257}
258extern "C" {
259    #[doc = " @brief Sets the opacity for a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param opacity Indicates the opacity to set.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n @see SetOpacity\n @since 10\n @version 1.0"]
260    pub fn OH_PixelMap_SetOpacity(native: *const NativePixelMap, opacity: f32) -> i32;
261}
262extern "C" {
263    #[doc = " @brief Scales a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param x Indicates the scaling ratio of the width.\n @param y Indicates the scaling ratio of the height.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see Scale\n @since 10\n @version 1.0"]
264    pub fn OH_PixelMap_Scale(native: *const NativePixelMap, x: f32, y: f32) -> i32;
265}
266extern "C" {
267    #[doc = " @brief Scales a <b>PixelMap</b> object with anti-aliasing.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param x Indicates the scaling ratio of the width.\n @param y Indicates the scaling ratio of the height.\n @param level Indicates the anti-aliasing algorithm to be used.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter, x and y are incorrect.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n @see Scale\n @since 12\n @version 1.0"]
268    pub fn OH_PixelMap_ScaleWithAntiAliasing(
269        native: *const NativePixelMap,
270        x: f32,
271        y: f32,
272        level: OH_PixelMap_AntiAliasingLevel,
273    ) -> i32;
274}
275extern "C" {
276    #[doc = " @brief Translates a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param x Indicates the horizontal distance to translate.\n @param y Indicates the vertical distance to translate.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see Translate\n @since 10\n @version 1.0"]
277    pub fn OH_PixelMap_Translate(native: *const NativePixelMap, x: f32, y: f32) -> i32;
278}
279extern "C" {
280    #[doc = " @brief Rotates a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param angle Indicates the angle to rotate.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see Rotate\n @since 10\n @version 1.0"]
281    pub fn OH_PixelMap_Rotate(native: *const NativePixelMap, angle: f32) -> i32;
282}
283extern "C" {
284    #[doc = " @brief Flips a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param x Specifies whether to flip around the x axis.\n @param y Specifies whether to flip around the y axis.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see Flip\n @since 10\n @version 1.0"]
285    pub fn OH_PixelMap_Flip(native: *const NativePixelMap, x: i32, y: i32) -> i32;
286}
287extern "C" {
288    #[doc = " @brief Crops a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param x Indicates the x-coordinate of the upper left corner of the target image.\n @param y Indicates the y-coordinate of the upper left corner of the target image.\n @param width Indicates the width of the cropped region.\n @param height Indicates the height of the cropped region.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see Crop\n @since 10\n @version 1.0"]
289    pub fn OH_PixelMap_Crop(
290        native: *const NativePixelMap,
291        x: i32,
292        y: i32,
293        width: i32,
294        height: i32,
295    ) -> i32;
296}
297extern "C" {
298    #[doc = " @brief Obtains the image information of a <b>PixelMap</b> object.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param info Indicates the pointer to the image information.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see OhosPixelMapInfos\n @since 10\n @version 2.0"]
299    pub fn OH_PixelMap_GetImageInfo(
300        native: *const NativePixelMap,
301        info: *mut OhosPixelMapInfos,
302    ) -> i32;
303}
304extern "C" {
305    #[doc = " @brief Obtains the memory address of a <b>NativePixelMap</b> object and locks the memory.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @param addr Indicates the double pointer to the memory address.\n @see UnAccessPixels\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @since 10\n @version 2.0"]
306    pub fn OH_PixelMap_AccessPixels(
307        native: *const NativePixelMap,
308        addr: *mut *mut ::std::os::raw::c_void,
309    ) -> i32;
310}
311extern "C" {
312    #[doc = " @brief Unlocks the memory of the <b>NativePixelMap</b> object data.\n This function is used with {@link OH_PixelMap_AccessPixels} in pairs.\n\n @param native Indicates the pointer to a <b>NativePixelMap</b> object.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see AccessPixels\n @since 10\n @version 2.0"]
313    pub fn OH_PixelMap_UnAccessPixels(native: *const NativePixelMap) -> i32;
314}
315#[doc = " @brief Defines an <b>ImageReceiver</b> object at the native layer.\n\n @since 10\n @version 2.0"]
316#[repr(C)]
317#[derive(Debug, Copy, Clone)]
318pub struct ImageReceiverNative_ {
319    _unused: [u8; 0],
320}
321#[doc = " @brief Defines the data type name of a native image receiver.\n\n @since 10\n @version 2.0"]
322pub type ImageReceiverNative = ImageReceiverNative_;
323#[doc = " @brief Defines the callbacks for images at the native layer.\n\n @since 10\n @version 2.0"]
324pub type OH_Image_Receiver_On_Callback = ::std::option::Option<unsafe extern "C" fn()>;
325#[doc = " @brief Defines the information about an image receiver.\n\n @since 10\n @version 2.0"]
326#[repr(C)]
327#[derive(Debug, Copy, Clone)]
328pub struct OhosImageReceiverInfo {
329    pub width: i32,
330    pub height: i32,
331    pub format: i32,
332    pub capicity: i32,
333}
334extern "C" {
335    #[doc = " @brief Creates an <b>ImageReceiver</b> object at the application layer.\n\n @param env Indicates the NAPI environment pointer.\n @param info Indicates the options for setting the <b>ImageReceiver</b> object.\n @param res Indicates the pointer to the <b>ImageReceiver</b> object obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_SURFACE_FAILED - if create surface failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED - if surface gralloc buffer failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_SURFACE_FAILED - if get sufrace failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT - if media rtsp surface not support.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MEDIA_DATA_UNSUPPORT - if media type unsupported.\n @see OhosImageReceiverInfo\n @since 10\n @version 2.0"]
336    pub fn OH_Image_Receiver_CreateImageReceiver(
337        env: napi_env,
338        info: OhosImageReceiverInfo,
339        res: *mut napi_value,
340    ) -> i32;
341}
342extern "C" {
343    #[doc = " @brief Initializes an {@link ImageReceiverNative} object at the native layer\n through an <b>ImageReceiver</b> object at the application layer.\n\n @param env Indicates the NAPI environment pointer.\n @param source Indicates an <b>ImageReceiver</b> object.\n @return Returns the pointer to the {@link ImageReceiverNative} object obtained if the operation is successful;\n returns a null pointer otherwise.\n @see ImageReceiverNative, OH_Image_Receiver_Release\n @since 10\n @version 2.0"]
344    pub fn OH_Image_Receiver_InitImageReceiverNative(
345        env: napi_env,
346        source: napi_value,
347    ) -> *mut ImageReceiverNative;
348}
349extern "C" {
350    #[doc = " @brief Obtains the receiver ID through an {@link ImageReceiverNative} object.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @param id Indicates the pointer to the buffer that stores the ID string obtained.\n @param len Indicates the size of the buffer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_SURFACE_FAILED - if get sufrace failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MEDIA_DATA_UNSUPPORT - if media type unsupported.\n @see ImageReceiverNative\n @since 10\n @version 2.0"]
351    pub fn OH_Image_Receiver_GetReceivingSurfaceId(
352        native: *const ImageReceiverNative,
353        id: *mut ::std::os::raw::c_char,
354        len: usize,
355    ) -> i32;
356}
357extern "C" {
358    #[doc = " @brief Obtains the latest image through an {@link ImageReceiverNative} object.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @param image Indicates the pointer to an <b>Image</b> object at the application layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_SURFACE_FAILED - if create surface failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED - if surface gralloc buffer failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_SURFACE_FAILED - if get sufrace failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT - if media rtsp surface not support.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED - if request Buffer failed.\n @see ImageReceiverNative\n @since 10\n @version 2.0"]
359    pub fn OH_Image_Receiver_ReadLatestImage(
360        native: *const ImageReceiverNative,
361        image: *mut napi_value,
362    ) -> i32;
363}
364extern "C" {
365    #[doc = " @brief Obtains the next image through an {@link ImageReceiverNative} object.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @param image Indicates the pointer to an <b>Image</b> object at the application layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_SURFACE_FAILED - if create surface failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED - if surface gralloc buffer failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_SURFACE_FAILED - if get sufrace failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT - if media rtsp surface not support.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED - if request Buffer failed.\n @see ImageReceiverNative\n @since 10\n @version 2.0"]
366    pub fn OH_Image_Receiver_ReadNextImage(
367        native: *const ImageReceiverNative,
368        image: *mut napi_value,
369    ) -> i32;
370}
371extern "C" {
372    #[doc = " @brief Registers an {@link OH_Image_Receiver_On_Callback} callback event.\n\n This callback event is triggered whenever a new image is received.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @param callback Indicates the {@link OH_Image_Receiver_On_Callback} callback event to register.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_SURFACE_FAILED - if get sufrace failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_REGISTER_LISTENER_FAILED - if Failed to register listener.\n returns {@link IRNdkErrCode} IMAGE_RESULT_REGISTER_BUFFER_FAILED - if Failed to register buffer.\n @see ImageReceiverNative\n @since 10\n @version 2.0"]
373    pub fn OH_Image_Receiver_On(
374        native: *const ImageReceiverNative,
375        callback: OH_Image_Receiver_On_Callback,
376    ) -> i32;
377}
378extern "C" {
379    #[doc = " @brief Obtains the size of the image receiver through an {@link ImageReceiverNative} object.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @param size Indicates the pointer to the {@link OhosImageSize} object obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n @see ImageReceiverNative, OH_Image_Receiver_On_Callback\n @since 10\n @version 2.0"]
380    pub fn OH_Image_Receiver_GetSize(
381        native: *const ImageReceiverNative,
382        size: *mut OhosImageSize,
383    ) -> i32;
384}
385extern "C" {
386    #[doc = " @brief Obtains the capacity of the image receiver through an {@link ImageReceiverNative} object.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @param capacity Indicates the pointer to the capacity obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n @see ImageReceiverNative, OhosImageSize\n @since 10\n @version 2.0"]
387    pub fn OH_Image_Receiver_GetCapacity(
388        native: *const ImageReceiverNative,
389        capacity: *mut i32,
390    ) -> i32;
391}
392extern "C" {
393    #[doc = " @brief Obtains the format of the image receiver through an {@link ImageReceiverNative} object.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @param format Indicates the pointer to the format obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image type unsupported.\n @see ImageReceiverNative\n\n @since 10\n @version 2.0"]
394    pub fn OH_Image_Receiver_GetFormat(native: *const ImageReceiverNative, format: *mut i32)
395        -> i32;
396}
397extern "C" {
398    #[doc = " @brief Releases an {@link ImageReceiverNative} object at the native layer.\n\n This API is not used to release an <b>ImageReceiver</b> object at the application layer.\n\n @param native Indicates the pointer to an {@link ImageReceiverNative} object at the native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n @see ImageReceiverNative\n @since 10\n @version 2.0"]
399    pub fn OH_Image_Receiver_Release(native: *mut ImageReceiverNative) -> i32;
400}
401#[doc = " @brief Defines a native image source object for the image source APIs.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
402#[repr(C)]
403#[derive(Debug, Copy, Clone)]
404pub struct ImageSourceNative_ {
405    _unused: [u8; 0],
406}
407#[doc = " @brief Defines a native image source object for the image source APIs.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
408pub type ImageSourceNative = ImageSourceNative_;
409#[doc = " @brief Defines the region of the image source to decode.\n It is used in {@link OhosImageDecodingOps}, {@link OH_ImageSource_CreatePixelMap}, and\n {@link OH_ImageSource_CreatePixelMapList}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
410#[repr(C)]
411#[derive(Debug, Copy, Clone)]
412pub struct OhosImageRegion {
413    #[doc = " X coordinate of the start point, in pixels."]
414    pub x: i32,
415    #[doc = " Y coordinate of the start point, in pixels."]
416    pub y: i32,
417    #[doc = " Width of the region, in pixels."]
418    pub width: i32,
419    #[doc = " Height of the region, in pixels."]
420    pub height: i32,
421}
422#[doc = " @brief Defines image source options infomation\n {@link OH_ImageSource_Create} and {@link OH_ImageSource_CreateIncremental}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
423#[repr(C)]
424#[derive(Debug, Copy, Clone)]
425pub struct OhosImageSourceOps {
426    #[doc = " Pixel density of the image source."]
427    pub density: i32,
428    #[doc = " Image source pixel format, used to describe YUV buffer usually."]
429    pub pixelFormat: i32,
430    #[doc = " Image source pixel size of width and height."]
431    pub size: OhosImageSize,
432}
433#[doc = " @brief Defines the options for decoding the image source.\n It is used in {@link OH_ImageSource_CreatePixelMap} and {@link OH_ImageSource_CreatePixelMapList}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
434#[repr(C)]
435#[derive(Debug, Copy, Clone)]
436pub struct OhosImageDecodingOps {
437    #[doc = " Defines output pixel map editable."]
438    pub editable: i8,
439    #[doc = " Defines output pixel format."]
440    pub pixelFormat: i32,
441    #[doc = " Defines decoding target pixel density."]
442    pub fitDensity: i32,
443    #[doc = " Defines decoding index of image source."]
444    pub index: u32,
445    #[doc = " Defines decoding sample size option."]
446    pub sampleSize: u32,
447    #[doc = " Defines decoding rotate option."]
448    pub rotate: u32,
449    #[doc = " Defines decoding target pixel size of width and height."]
450    pub size: OhosImageSize,
451    #[doc = " Defines image source pixel region for decoding."]
452    pub region: OhosImageRegion,
453}
454#[doc = " @brief Defines the image source information, which is obtained by calling {@link OH_ImageSource_GetImageInfo}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
455#[repr(C)]
456#[derive(Debug, Copy, Clone)]
457pub struct OhosImageSourceInfo {
458    #[doc = " Pixel format of the image source. It is set in {@link OH_ImageSource_Create}."]
459    pub pixelFormat: i32,
460    #[doc = " Color space of the image source."]
461    pub colorSpace: i32,
462    #[doc = " Alpha type of the image source."]
463    pub alphaType: i32,
464    #[doc = " Image density of the image source. It is set in {@link OH_ImageSource_Create}."]
465    pub density: i32,
466    #[doc = " Pixel width and height of the image source."]
467    pub size: OhosImageSize,
468}
469#[doc = " @brief Defines the input resource of the image source. It is obtained by calling {@link OH_ImageSource_Create}.\n Only one type of resource is accepted at a time.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0\n @deprecated since 11"]
470#[repr(C)]
471#[derive(Debug, Copy, Clone)]
472pub struct OhosImageSource {
473    #[doc = " Pointer to the image source URI. Only a file URI or Base64 URI is accepted."]
474    pub uri: *mut ::std::os::raw::c_char,
475    #[doc = " Length of the image source URI."]
476    pub uriSize: usize,
477    #[doc = " Descriptor of the image source."]
478    pub fd: i32,
479    #[doc = " Pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted."]
480    pub buffer: *mut u8,
481    #[doc = " Size of the image source buffer."]
482    pub bufferSize: usize,
483}
484#[doc = " @brief Defines the delay time list of the image source. It is obtained by calling\n {@link OH_ImageSource_GetDelayTime}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
485#[repr(C)]
486#[derive(Debug, Copy, Clone)]
487pub struct OhosImageSourceDelayTimeList {
488    #[doc = " Pointer to the head of the image source delay time list."]
489    pub delayTimeList: *mut i32,
490    #[doc = " Size of the image source delay time list."]
491    pub size: usize,
492}
493#[doc = " @brief Defines image source supported format string.\n {@link OhosImageSourceSupportedFormatList} and {@link OH_ImageSource_GetSupportedFormats}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
494#[repr(C)]
495#[derive(Debug, Copy, Clone)]
496pub struct OhosImageSourceSupportedFormat {
497    #[doc = " Image source supported format string head."]
498    pub format: *mut ::std::os::raw::c_char,
499    #[doc = " Image source supported format string size."]
500    pub size: usize,
501}
502#[doc = " @brief Defines the format string list supported by the image source.\n It is obtained by calling {@link OH_ImageSource_GetSupportedFormats}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
503#[repr(C)]
504#[derive(Debug, Copy, Clone)]
505pub struct OhosImageSourceSupportedFormatList {
506    #[doc = " Image source supported format string list head."]
507    pub supportedFormatList: *mut *mut OhosImageSourceSupportedFormat,
508    #[doc = " Image source supported format string list size."]
509    pub size: usize,
510}
511#[doc = " @brief Defines the property string (in key-value format) of the image source.\n It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
512#[repr(C)]
513#[derive(Debug, Copy, Clone)]
514pub struct OhosImageSourceProperty {
515    #[doc = " Image source property key and value string head."]
516    pub value: *mut ::std::os::raw::c_char,
517    #[doc = " Image source property key and value string size."]
518    pub size: usize,
519}
520#[doc = " @brief Defines the update data of the image source. It is obtained by calling {@link OH_ImageSource_UpdateData}.\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
521#[repr(C)]
522#[derive(Debug, Copy, Clone)]
523pub struct OhosImageSourceUpdateData {
524    #[doc = " Image source update data buffer."]
525    pub buffer: *mut u8,
526    #[doc = " Image source update data buffer size."]
527    pub bufferSize: usize,
528    #[doc = " Image source offset of update data buffer."]
529    pub offset: u32,
530    #[doc = " Image source update data length in update data buffer."]
531    pub updateLength: u32,
532    #[doc = " Image source update data is completed in this session."]
533    pub isCompleted: i8,
534}
535extern "C" {
536    #[doc = " @brief Creates an <b>ImageSource</b> object at the JavaScript native layer based on the specified\n {@link OhosImageSource} and {@link OhosImageSourceOps} structs.\n\n @param env Indicates a pointer to the Java Native Interface (JNI) environment.\n @param src Indicates a pointer to the input resource of the image source. For details, see {@link OhosImageSource}.\n @param ops Indicates a pointer to the options for creating the image source.\n For details, see {@link OhosImageSourceOps}.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SOURCE_DATA_INCOMPLETE - if image source data incomplete.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SOURCE_DATA - if image source data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_TOO_LARGE - if image data too large.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n returns {@link IRNdkErrCode} IMAGE_RESULT_FILE_DAMAGED - if file damaged.\n returns {@link IRNdkErrCode} IMAGE_RESULT_FILE_FD_ERROR - if file fd is bad.\n returns {@link IRNdkErrCode} IMAGE_RESULT_STREAM_SIZE_ERROR - if stream bad.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SEEK_FAILED - if seek file failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PEEK_FAILED - if peek file failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_FREAD_FAILED - if read file failed.\n @see {@link OhosImageSource}, {@link OhosImageSourceOps}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0\n @deprecated since 11\n @useinstead image#OH_ImageSource_CreateFromUri\n @useinstead image#OH_ImageSource_CreateFromFd\n @useinstead image#OH_ImageSource_CreateFromData"]
537    pub fn OH_ImageSource_Create(
538        env: napi_env,
539        src: *mut OhosImageSource,
540        ops: *mut OhosImageSourceOps,
541        res: *mut napi_value,
542    ) -> i32;
543}
544extern "C" {
545    #[doc = " @brief Creates an <b>ImageSource</b> object at the JavaScript native layer based on the specified\n image source URI and {@link OhosImageSourceOps} structs.\n\n @param env Indicates a pointer to the Java Native Interface (JNI) environment.\n @param uri Indicates a pointer to the image source URI. Only a file URI or Base64 URI is accepted.\n @param size Indicates the length of the image source URI.\n @param ops Indicates a pointer to the options for creating the image source.\n For details, see {@link OhosImageSourceOps}.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n @see {@link OhosImageSourceOps}\n\n @syscap SystemCapability.Multimedia.Image\n @since 11\n @version 4.1"]
546    pub fn OH_ImageSource_CreateFromUri(
547        env: napi_env,
548        uri: *mut ::std::os::raw::c_char,
549        size: usize,
550        ops: *mut OhosImageSourceOps,
551        res: *mut napi_value,
552    ) -> i32;
553}
554extern "C" {
555    #[doc = " @brief Creates an <b>ImageSource</b> object at the JavaScript native layer based on the specified\n image source file descriptor and {@link OhosImageSourceOps} structs.\n\n @param env Indicates a pointer to the Java Native Interface (JNI) environment.\n @param fd Indicates the image source file descriptor.\n @param ops Indicates a pointer to the options for creating the image source.\n For details, see {@link OhosImageSourceOps}.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n @see {@link OhosImageSourceOps}\n\n @syscap SystemCapability.Multimedia.Image\n @since 11\n @version 4.1"]
556    pub fn OH_ImageSource_CreateFromFd(
557        env: napi_env,
558        fd: i32,
559        ops: *mut OhosImageSourceOps,
560        res: *mut napi_value,
561    ) -> i32;
562}
563extern "C" {
564    #[doc = " @brief Creates an <b>ImageSource</b> object at the JavaScript native layer based on the specified\n image source data and {@link OhosImageSourceOps} structs.\n\n @param env Indicates a pointer to the Java Native Interface (JNI) environment.\n @param data Indicates a pointer to the image source data. Only a formatted packet data or Base64 data is accepted.\n @param dataSize Indicates the size of the image source data.\n @param ops Indicates a pointer to the options for creating the image source.\n For details, see {@link OhosImageSourceOps}.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n @see {@link OhosImageSourceOps}\n\n @syscap SystemCapability.Multimedia.Image\n @since 11\n @version 4.1"]
565    pub fn OH_ImageSource_CreateFromData(
566        env: napi_env,
567        data: *mut u8,
568        dataSize: usize,
569        ops: *mut OhosImageSourceOps,
570        res: *mut napi_value,
571    ) -> i32;
572}
573extern "C" {
574    #[doc = " @brief Creates an <b>ImageSource</b> object at the JavaScript native layer based on the specified\n raw file's file descriptor and {@link OhosImageSourceOps} structs.\n\n @param env Indicates a pointer to the Java Native Interface (JNI) environment.\n @param rawFile Indicates the raw file's file descriptor.\n @param ops Indicates a pointer to the options for creating the image source.\n For details, see {@link OhosImageSourceOps}.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n @see {@link OhosImageSourceOps}\n\n @syscap SystemCapability.Multimedia.Image\n @since 11\n @version 4.1"]
575    pub fn OH_ImageSource_CreateFromRawFile(
576        env: napi_env,
577        rawFile: RawFileDescriptor,
578        ops: *mut OhosImageSourceOps,
579        res: *mut napi_value,
580    ) -> i32;
581}
582extern "C" {
583    #[doc = " @brief Creates an incremental <b>ImageSource</b> object at the JavaScript native layer based on the specified\n {@link OhosImageSource} and {@link OhosImageSourceOps} structs.\n The image source data will be updated through {@link OH_ImageSource_UpdateData}.\n\n @param env Indicates a pointer to the JNI environment.\n @param src Indicates a pointer to the input resource of the image source. Only the buffer type is accepted.\n For details, see {@link OhosImageSource}.\n @param ops Indicates a pointer to the options for creating the image source.\n For details, see {@link OhosImageSourceOps}.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SOURCE_DATA_INCOMPLETE - if image source data incomplete.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SOURCE_DATA - if image source data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_TOO_LARGE - if image data too large.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n returns {@link IRNdkErrCode} IMAGE_RESULT_FILE_DAMAGED - if file damaged.\n returns {@link IRNdkErrCode} IMAGE_RESULT_FILE_FD_ERROR - if file fd is bad.\n returns {@link IRNdkErrCode} IMAGE_RESULT_STREAM_SIZE_ERROR - if stream bad.\n returns {@link IRNdkErrCode} IMAGE_RESULT_SEEK_FAILED - if seek file failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PEEK_FAILED - if peek file failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_FREAD_FAILED - if read file failed.\n @see {@link OhosImageSource}, {@link OhosImageSourceOps}, {@link OH_ImageSource_UpdateData}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0\n @deprecated since 11\n @useinstead image#OH_ImageSource_CreateIncrementalFromData"]
584    pub fn OH_ImageSource_CreateIncremental(
585        env: napi_env,
586        source: *mut OhosImageSource,
587        ops: *mut OhosImageSourceOps,
588        res: *mut napi_value,
589    ) -> i32;
590}
591extern "C" {
592    #[doc = " @brief Creates an incremental <b>ImageSource</b> object at the JavaScript native layer based on the specified\n image source data and {@link OhosImageSourceOps} structs.\n The image source data will be updated through {@link OH_ImageSource_UpdateData}.\n\n @param env Indicates a pointer to the JNI environment.\n @param data Indicates a pointer to the image source data. Only a formatted packet data or Base64 data is accepted.\n @param dataSize Indicates the size of the image source data.\n @param ops Indicates a pointer to the options for creating the image source.\n For details, see {@link OhosImageSourceOps}.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n @see {@link OhosImageSourceOps}, {@link OH_ImageSource_UpdateData}\n\n @syscap SystemCapability.Multimedia.Image\n @since 11\n @version 4.1"]
593    pub fn OH_ImageSource_CreateIncrementalFromData(
594        env: napi_env,
595        data: *mut u8,
596        dataSize: usize,
597        ops: *mut OhosImageSourceOps,
598        res: *mut napi_value,
599    ) -> i32;
600}
601extern "C" {
602    #[doc = " @brief Obtains all supported decoding formats.\n\n @param res Indicates a pointer to the <b>OhosImageSourceSupportedFormatList</b> struct.\n When the input <b>supportedFormatList</b> is a null pointer and <b>size</b> is 0, the size of the supported formats\n is returned through <b>size</b> in <b>res</b>.\n To obtain all formats, a space larger than <b>size</b> is required.\n In addition, sufficient space must be reserved for each format supported.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if decode fail.\n @see {@link OhosImageSourceSupportedFormatList}, {@link OhosImageSourceSupportedFormat}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
603    pub fn OH_ImageSource_GetSupportedFormats(res: *mut OhosImageSourceSupportedFormatList) -> i32;
604}
605extern "C" {
606    #[doc = " @brief Converts an {@link ImageSource} object at the JavaScript native layer to an <b>ImageSourceNative</b> object\n at the C++ native layer.\n\n @param env Indicates a pointer to the JNI environment.\n @param source Indicates a pointer to the <b>ImageSource</b> object at the JavaScript native layer.\n @return Returns a pointer to the {@link ImageSourceNative} object if the operation is successful;\n returns a null pointer otherwise.\n @see {@link ImageSourceNative}, {@link OH_ImageSource_Release}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
607    pub fn OH_ImageSource_InitNative(env: napi_env, source: napi_value) -> *mut ImageSourceNative;
608}
609extern "C" {
610    #[doc = " @brief Decodes an <b>ImageSource</b> object to obtain a <b>PixelMap</b> object at the JavaScript native layer\n based on the specified {@link OhosImageDecodingOps} struct.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param ops Indicates a pointer to the options for decoding the image source.\n For details, see {@link OhosImageDecodingOps}.\n @param res Indicates a pointer to the <b>PixelMap</b> object obtained at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_ENCODER_FAILED - if create encoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INIT_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ENCODE_FAILED - if image add pixel map fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_UNSUPPORT - if image hardware decode unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_FAILED - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_IPC - if ipc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see {@link ImageSourceNative}, {@link OhosImageDecodingOps}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
611    pub fn OH_ImageSource_CreatePixelMap(
612        native: *const ImageSourceNative,
613        ops: *mut OhosImageDecodingOps,
614        res: *mut napi_value,
615    ) -> i32;
616}
617extern "C" {
618    #[doc = " @brief Decodes an <b>ImageSource</b> to obtain all the <b>PixelMap</b> objects at the JavaScript native layer\n based on the specified {@link OhosImageDecodingOps} struct.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param ops Indicates a pointer to the options for decoding the image source.\n For details, see {@link OhosImageDecodingOps}.\n @param res Indicates a pointer to the <b>PixelMap</b> objects obtained at the JavaScript native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_ENCODER_FAILED - if create encoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INIT_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ENCODE_FAILED - if image add pixel map fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_UNSUPPORT - if image hardware decode unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_FAILED - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_IPC - if ipc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n @see {@link ImageSourceNative}, {@link OhosImageDecodingOps}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
619    pub fn OH_ImageSource_CreatePixelMapList(
620        native: *const ImageSourceNative,
621        ops: *mut OhosImageDecodingOps,
622        res: *mut napi_value,
623    ) -> i32;
624}
625extern "C" {
626    #[doc = " @brief Obtains the delay time list from some <b>ImageSource</b> objects (such as GIF image sources).\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param res Indicates a pointer to the delay time list obtained.\n For details, see {@link OhosImageSourceDelayTimeList}. When the input <b>delayTimeList</b> is a null pointer and\n <b>size</b> is <b>0</b>, the size of the delay time list is returned through <b>size</b> in <b>res</b>.\n To obtain the complete delay time list, a space greater than <b>size</b> is required.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n @see {@link ImageSourceNative}, {@link OhosImageSourceDelayTimeList}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
627    pub fn OH_ImageSource_GetDelayTime(
628        native: *const ImageSourceNative,
629        res: *mut OhosImageSourceDelayTimeList,
630    ) -> i32;
631}
632extern "C" {
633    #[doc = " @brief Obtains the number of frames from an <b>ImageSource</b> object.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param res Indicates a pointer to the number of frames obtained.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n @see {@link ImageSourceNative}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
634    pub fn OH_ImageSource_GetFrameCount(native: *const ImageSourceNative, res: *mut u32) -> i32;
635}
636extern "C" {
637    #[doc = " @brief Obtains image source information from an <b>ImageSource</b> object by index.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param index Indicates the index of the frame.\n @param info Indicates a pointer to the image source information obtained.\n For details, see {@link OhosImageSourceInfo}.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n @see {@link ImageSourceNative}, {@link OhosImageSourceInfo}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
638    pub fn OH_ImageSource_GetImageInfo(
639        native: *const ImageSourceNative,
640        index: i32,
641        info: *mut OhosImageSourceInfo,
642    ) -> i32;
643}
644extern "C" {
645    #[doc = " @brief Obtains the value of an image property from an <b>ImageSource</b> object.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param key Indicates a pointer to the property. For details, see {@link OhosImageSourceProperty}.\n @param value Indicates a pointer to the property value obtained.\n If the input <b>value</b> is a null pointer and <b>size</b> is <b>0</b>, the size of the property value is returned\n through <b>size</b> in <b>value</b>.\n To obtain the complete property value, a space greater than <b>size</b> is required.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n @see {@link ImageSourceNative}, {@link OhosImageSourceProperty}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
646    pub fn OH_ImageSource_GetImageProperty(
647        native: *const ImageSourceNative,
648        key: *mut OhosImageSourceProperty,
649        value: *mut OhosImageSourceProperty,
650    ) -> i32;
651}
652extern "C" {
653    #[doc = " @brief Modifies the value of an image property of an <b>ImageSource</b> object.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param key Indicates a pointer to the property. For details, see {@link OhosImageSourceProperty}.\n @param value Indicates a pointer to the new value of the property.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist.\n @see {@link ImageSourceNative}, {@link OhosImageSourceProperty}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
654    pub fn OH_ImageSource_ModifyImageProperty(
655        native: *const ImageSourceNative,
656        key: *mut OhosImageSourceProperty,
657        value: *mut OhosImageSourceProperty,
658    ) -> i32;
659}
660extern "C" {
661    #[doc = " @brief Updates the data of an <b>ImageSource</b> object.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @param data Indicates a pointer to the update data. For details, see {@link OhosImageSourceUpdateData}.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_ENCODER_FAILED - if create encoder failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CHECK_FORMAT_ERROR - if check format failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST - if sharememory error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL - if sharememory data abnormal.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_MALLOC_ABNORMAL - if image malloc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INIT_ABNORMAL - if image input data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_CROP - if crop error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ENCODE_FAILED - image add pixel map fail.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_UNSUPPORT - if image hardware decode unsupported.\n returns {@link IRNdkErrCode} IMAGE_RESULT_HW_DECODE_FAILED - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ERR_IPC - if ipc error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALPHA_TYPE_ERROR - if hard decode failed.\n returns {@link IRNdkErrCode} IMAGE_RESULT_ALLOCATER_TYPE_ERROR - if hard decode failed.\n @see {@link ImageSourceNative}, {@link OhosImageSourceUpdateData}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
662    pub fn OH_ImageSource_UpdateData(
663        native: *const ImageSourceNative,
664        data: *mut OhosImageSourceUpdateData,
665    ) -> i32;
666}
667extern "C" {
668    #[doc = " @brief Releases an <b>ImageSourceNative</b> object.\n\n @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer.\n @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment.\n returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter.\n returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error.\n returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error.\n @see {@link ImageSourceNative}, {@link OH_ImageSource_Create}, {@link OH_ImageSource_CreateIncremental}\n\n @syscap SystemCapability.Multimedia.Image\n @since 10\n @version 4.0"]
669    pub fn OH_ImageSource_Release(native: *mut ImageSourceNative) -> i32;
670}