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
8use napi_sys_ohos::*;
9use ohos_resource_manager_sys::*;
10
11#[link(name = "ohimage")]
12#[link(name = "image_packer")]
13#[link(name = "picture")]
14#[link(name = "image_receiver")]
15#[link(name = "image_source")]
16#[link(name = "pixelmap")]
17unsafe extern "C" {}
18
19#[doc = " @brief Defines the image size.\n\n @since 10\n @version 2.0"]
20#[repr(C)]
21#[derive(Debug, Copy, Clone)]
22pub struct OhosImageSize {
23    #[doc = " Image width, in pixels."]
24    pub width: i32,
25    #[doc = " Image height, in pixels."]
26    pub height: i32,
27}
28#[repr(C)]
29#[derive(Debug, Copy, Clone)]
30pub struct ImageNative_ {
31    _unused: [u8; 0],
32}
33#[doc = " @brief Defines an image object at the native layer for the image interface.\n\n @since 10\n @version 2.0"]
34pub type ImageNative = ImageNative_;
35#[doc = " @brief Defines the information about an image rectangle.\n\n @since 10\n @version 2.0"]
36#[repr(C)]
37#[derive(Debug, Copy, Clone)]
38pub struct OhosImageRect {
39    #[doc = " X coordinate of the rectangle."]
40    pub x: i32,
41    #[doc = " Y coordinate of the rectangle."]
42    pub y: i32,
43    #[doc = " Width of the rectangle, in pixels."]
44    pub width: i32,
45    #[doc = " Height of the rectangle, in pixels."]
46    pub height: i32,
47}
48#[doc = " @brief Defines the image composition information.\n\n @since 10\n @version 2.0"]
49#[repr(C)]
50#[derive(Debug, Copy, Clone)]
51pub struct OhosImageComponent {
52    #[doc = " Buffer that stores the pixel data."]
53    pub byteBuffer: *mut u8,
54    #[doc = " Size of the pixel data in the memory."]
55    pub size: usize,
56    #[doc = " Type of the pixel data."]
57    pub componentType: i32,
58    #[doc = " Row stride of the pixel data."]
59    pub rowStride: i32,
60    #[doc = " Pixel stride of the pixel data"]
61    pub pixelStride: i32,
62}
63extern "C" {
64    #[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"]
65    pub fn OH_Image_InitImageNative(env: napi_env, source: napi_value) -> *mut ImageNative;
66}
67extern "C" {
68    #[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"]
69    pub fn OH_Image_ClipRect(native: *const ImageNative, rect: *mut OhosImageRect) -> i32;
70}
71extern "C" {
72    #[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"]
73    pub fn OH_Image_Size(native: *const ImageNative, size: *mut OhosImageSize) -> i32;
74}
75extern "C" {
76    #[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"]
77    pub fn OH_Image_Format(native: *const ImageNative, format: *mut i32) -> i32;
78}
79extern "C" {
80    #[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"]
81    pub fn OH_Image_GetComponent(
82        native: *const ImageNative,
83        componentType: i32,
84        componentNative: *mut OhosImageComponent,
85    ) -> i32;
86}
87extern "C" {
88    #[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"]
89    pub fn OH_Image_Release(native: *mut ImageNative) -> i32;
90}
91#[repr(C)]
92#[derive(Debug, Copy, Clone)]
93pub struct ImagePacker_Native_ {
94    _unused: [u8; 0],
95}
96#[doc = " @brief Defines an image packer object at the native layer for the image packer interface.\n\n @since 11\n @version 4.1"]
97pub type ImagePacker_Native = ImagePacker_Native_;
98#[doc = " @brief Defines the image packing options.\n\n @since 11\n @version 4.1"]
99#[repr(C)]
100#[derive(Debug, Copy, Clone)]
101pub struct ImagePacker_Opts_ {
102    #[doc = " Encoding format."]
103    pub format: *const ::std::os::raw::c_char,
104    #[doc = " Encoding quality."]
105    pub quality: ::std::os::raw::c_int,
106}
107#[doc = " @brief Defines alias of image packing options.\n\n @since 11\n @version 4.1"]
108pub type ImagePacker_Opts = ImagePacker_Opts_;
109extern "C" {
110    #[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"]
111    pub fn OH_ImagePacker_Create(env: napi_env, res: *mut napi_value) -> i32;
112}
113extern "C" {
114    #[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"]
115    pub fn OH_ImagePacker_InitNative(env: napi_env, packer: napi_value) -> *mut ImagePacker_Native;
116}
117extern "C" {
118    #[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"]
119    pub fn OH_ImagePacker_PackToData(
120        native: *mut ImagePacker_Native,
121        source: napi_value,
122        opts: *mut ImagePacker_Opts,
123        outData: *mut u8,
124        size: *mut usize,
125    ) -> i32;
126}
127extern "C" {
128    #[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"]
129    pub fn OH_ImagePacker_PackToFile(
130        native: *mut ImagePacker_Native,
131        source: napi_value,
132        opts: *mut ImagePacker_Opts,
133        fd: ::std::os::raw::c_int,
134    ) -> i32;
135}
136extern "C" {
137    #[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"]
138    pub fn OH_ImagePacker_Release(native: *mut ImagePacker_Native) -> i32;
139}
140#[doc = " @brief Defines the native pixel map information.\n @since 10\n @version 1.0"]
141#[repr(C)]
142#[derive(Debug, Copy, Clone)]
143pub struct NativePixelMap_ {
144    _unused: [u8; 0],
145}
146#[doc = " @brief Defines the data type name of the native pixel map.\n @since 10\n @version 1.0"]
147pub type NativePixelMap = NativePixelMap_;
148#[doc = " @brief Defines the pixel map information.\n\n @since 10\n @version 1.0"]
149#[repr(C)]
150#[derive(Debug, Copy, Clone)]
151pub struct OhosPixelMapInfos {
152    #[doc = " Image width, in pixels."]
153    pub width: u32,
154    #[doc = " Image height, in pixels."]
155    pub height: u32,
156    #[doc = " Number of bytes per row."]
157    pub rowSize: u32,
158    #[doc = " Pixel format."]
159    pub pixelFormat: i32,
160}
161#[doc = " Nearest-neighbor interpolation."]
162pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_NONE:
163    OH_PixelMap_AntiAliasingLevel = 0;
164#[doc = " Bilinear interpolation, without mipmap linear filtering."]
165pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_LOW:
166    OH_PixelMap_AntiAliasingLevel = 1;
167#[doc = " Bilinear interpolation, with mipmap linear filtering."]
168pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_MEDIUM:
169    OH_PixelMap_AntiAliasingLevel = 2;
170#[doc = " Cubic interpolation."]
171pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_HIGH:
172    OH_PixelMap_AntiAliasingLevel = 3;
173#[doc = " @brief Enumerates the anti-aliasing level.\n\n @since 12\n @version 1.0"]
174pub type OH_PixelMap_AntiAliasingLevel = u32;
175#[doc = " @brief Defines the options used for creating a pixel map.\n\n @since 10\n @version 1.0"]
176#[repr(C)]
177#[derive(Debug, Copy, Clone)]
178pub struct OhosPixelMapCreateOps {
179    #[doc = " Image width, in pixels."]
180    pub width: u32,
181    #[doc = " Image height, in pixels."]
182    pub height: u32,
183    #[doc = " Image format."]
184    pub pixelFormat: i32,
185    #[doc = " Editing type of the image."]
186    pub editable: u32,
187    #[doc = " Alpha type of the image."]
188    pub alphaType: u32,
189    #[doc = " Scale mode of the image."]
190    pub scaleMode: u32,
191}
192extern "C" {
193    #[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"]
194    pub fn OH_PixelMap_CreatePixelMap(
195        env: napi_env,
196        info: OhosPixelMapCreateOps,
197        buf: *mut ::std::os::raw::c_void,
198        len: usize,
199        res: *mut napi_value,
200    ) -> i32;
201}
202extern "C" {
203    #[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"]
204    pub fn OH_PixelMap_CreatePixelMapWithStride(
205        env: napi_env,
206        info: OhosPixelMapCreateOps,
207        buf: *mut ::std::os::raw::c_void,
208        len: usize,
209        rowStride: i32,
210        res: *mut napi_value,
211    ) -> i32;
212}
213extern "C" {
214    #[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"]
215    pub fn OH_PixelMap_CreateAlphaPixelMap(
216        env: napi_env,
217        source: napi_value,
218        alpha: *mut napi_value,
219    ) -> i32;
220}
221extern "C" {
222    #[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"]
223    pub fn OH_PixelMap_InitNativePixelMap(env: napi_env, source: napi_value)
224        -> *mut NativePixelMap;
225}
226extern "C" {
227    #[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"]
228    pub fn OH_PixelMap_GetBytesNumberPerRow(native: *const NativePixelMap, num: *mut i32) -> i32;
229}
230extern "C" {
231    #[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"]
232    pub fn OH_PixelMap_GetIsEditable(native: *const NativePixelMap, editable: *mut i32) -> i32;
233}
234extern "C" {
235    #[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"]
236    pub fn OH_PixelMap_IsSupportAlpha(native: *const NativePixelMap, alpha: *mut i32) -> i32;
237}
238extern "C" {
239    #[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"]
240    pub fn OH_PixelMap_SetAlphaAble(native: *const NativePixelMap, alpha: i32) -> i32;
241}
242extern "C" {
243    #[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"]
244    pub fn OH_PixelMap_GetDensity(native: *const NativePixelMap, density: *mut i32) -> i32;
245}
246extern "C" {
247    #[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"]
248    pub fn OH_PixelMap_SetDensity(native: *const NativePixelMap, density: i32) -> i32;
249}
250extern "C" {
251    #[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"]
252    pub fn OH_PixelMap_SetOpacity(native: *const NativePixelMap, opacity: f32) -> i32;
253}
254extern "C" {
255    #[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"]
256    pub fn OH_PixelMap_Scale(native: *const NativePixelMap, x: f32, y: f32) -> i32;
257}
258extern "C" {
259    #[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"]
260    pub fn OH_PixelMap_ScaleWithAntiAliasing(
261        native: *const NativePixelMap,
262        x: f32,
263        y: f32,
264        level: OH_PixelMap_AntiAliasingLevel,
265    ) -> i32;
266}
267extern "C" {
268    #[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"]
269    pub fn OH_PixelMap_Translate(native: *const NativePixelMap, x: f32, y: f32) -> i32;
270}
271extern "C" {
272    #[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"]
273    pub fn OH_PixelMap_Rotate(native: *const NativePixelMap, angle: f32) -> i32;
274}
275extern "C" {
276    #[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"]
277    pub fn OH_PixelMap_Flip(native: *const NativePixelMap, x: i32, y: i32) -> i32;
278}
279extern "C" {
280    #[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"]
281    pub fn OH_PixelMap_Crop(
282        native: *const NativePixelMap,
283        x: i32,
284        y: i32,
285        width: i32,
286        height: i32,
287    ) -> i32;
288}
289extern "C" {
290    #[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"]
291    pub fn OH_PixelMap_GetImageInfo(
292        native: *const NativePixelMap,
293        info: *mut OhosPixelMapInfos,
294    ) -> i32;
295}
296extern "C" {
297    #[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"]
298    pub fn OH_PixelMap_AccessPixels(
299        native: *const NativePixelMap,
300        addr: *mut *mut ::std::os::raw::c_void,
301    ) -> i32;
302}
303extern "C" {
304    #[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"]
305    pub fn OH_PixelMap_UnAccessPixels(native: *const NativePixelMap) -> i32;
306}
307#[doc = " @brief Defines an <b>ImageReceiver</b> object at the native layer.\n\n @since 10\n @version 2.0"]
308#[repr(C)]
309#[derive(Debug, Copy, Clone)]
310pub struct ImageReceiverNative_ {
311    _unused: [u8; 0],
312}
313#[doc = " @brief Defines the data type name of a native image receiver.\n\n @since 10\n @version 2.0"]
314pub type ImageReceiverNative = ImageReceiverNative_;
315#[doc = " @brief Defines the callbacks for images at the native layer.\n\n @since 10\n @version 2.0"]
316pub type OH_Image_Receiver_On_Callback = ::std::option::Option<unsafe extern "C" fn()>;
317#[doc = " @brief Defines the information about an image receiver.\n\n @since 10\n @version 2.0"]
318#[repr(C)]
319#[derive(Debug, Copy, Clone)]
320pub struct OhosImageReceiverInfo {
321    pub width: i32,
322    pub height: i32,
323    pub format: i32,
324    pub capicity: i32,
325}
326extern "C" {
327    #[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"]
328    pub fn OH_Image_Receiver_CreateImageReceiver(
329        env: napi_env,
330        info: OhosImageReceiverInfo,
331        res: *mut napi_value,
332    ) -> i32;
333}
334extern "C" {
335    #[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"]
336    pub fn OH_Image_Receiver_InitImageReceiverNative(
337        env: napi_env,
338        source: napi_value,
339    ) -> *mut ImageReceiverNative;
340}
341extern "C" {
342    #[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"]
343    pub fn OH_Image_Receiver_GetReceivingSurfaceId(
344        native: *const ImageReceiverNative,
345        id: *mut ::std::os::raw::c_char,
346        len: usize,
347    ) -> i32;
348}
349extern "C" {
350    #[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"]
351    pub fn OH_Image_Receiver_ReadLatestImage(
352        native: *const ImageReceiverNative,
353        image: *mut napi_value,
354    ) -> i32;
355}
356extern "C" {
357    #[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"]
358    pub fn OH_Image_Receiver_ReadNextImage(
359        native: *const ImageReceiverNative,
360        image: *mut napi_value,
361    ) -> i32;
362}
363extern "C" {
364    #[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"]
365    pub fn OH_Image_Receiver_On(
366        native: *const ImageReceiverNative,
367        callback: OH_Image_Receiver_On_Callback,
368    ) -> i32;
369}
370extern "C" {
371    #[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"]
372    pub fn OH_Image_Receiver_GetSize(
373        native: *const ImageReceiverNative,
374        size: *mut OhosImageSize,
375    ) -> i32;
376}
377extern "C" {
378    #[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"]
379    pub fn OH_Image_Receiver_GetCapacity(
380        native: *const ImageReceiverNative,
381        capacity: *mut i32,
382    ) -> i32;
383}
384extern "C" {
385    #[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"]
386    pub fn OH_Image_Receiver_GetFormat(native: *const ImageReceiverNative, format: *mut i32)
387        -> i32;
388}
389extern "C" {
390    #[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"]
391    pub fn OH_Image_Receiver_Release(native: *mut ImageReceiverNative) -> i32;
392}
393#[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"]
394#[repr(C)]
395#[derive(Debug, Copy, Clone)]
396pub struct ImageSourceNative_ {
397    _unused: [u8; 0],
398}
399#[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"]
400pub type ImageSourceNative = ImageSourceNative_;
401#[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"]
402#[repr(C)]
403#[derive(Debug, Copy, Clone)]
404pub struct OhosImageRegion {
405    #[doc = " X coordinate of the start point, in pixels."]
406    pub x: i32,
407    #[doc = " Y coordinate of the start point, in pixels."]
408    pub y: i32,
409    #[doc = " Width of the region, in pixels."]
410    pub width: i32,
411    #[doc = " Height of the region, in pixels."]
412    pub height: i32,
413}
414#[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"]
415#[repr(C)]
416#[derive(Debug, Copy, Clone)]
417pub struct OhosImageSourceOps {
418    #[doc = " Pixel density of the image source."]
419    pub density: i32,
420    #[doc = " Image source pixel format, used to describe YUV buffer usually."]
421    pub pixelFormat: i32,
422    #[doc = " Image source pixel size of width and height."]
423    pub size: OhosImageSize,
424}
425#[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"]
426#[repr(C)]
427#[derive(Debug, Copy, Clone)]
428pub struct OhosImageDecodingOps {
429    #[doc = " Defines output pixel map editable."]
430    pub editable: i8,
431    #[doc = " Defines output pixel format."]
432    pub pixelFormat: i32,
433    #[doc = " Defines decoding target pixel density."]
434    pub fitDensity: i32,
435    #[doc = " Defines decoding index of image source."]
436    pub index: u32,
437    #[doc = " Defines decoding sample size option."]
438    pub sampleSize: u32,
439    #[doc = " Defines decoding rotate option."]
440    pub rotate: u32,
441    #[doc = " Defines decoding target pixel size of width and height."]
442    pub size: OhosImageSize,
443    #[doc = " Defines image source pixel region for decoding."]
444    pub region: OhosImageRegion,
445}
446#[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"]
447#[repr(C)]
448#[derive(Debug, Copy, Clone)]
449pub struct OhosImageSourceInfo {
450    #[doc = " Pixel format of the image source. It is set in {@link OH_ImageSource_Create}."]
451    pub pixelFormat: i32,
452    #[doc = " Color space of the image source."]
453    pub colorSpace: i32,
454    #[doc = " Alpha type of the image source."]
455    pub alphaType: i32,
456    #[doc = " Image density of the image source. It is set in {@link OH_ImageSource_Create}."]
457    pub density: i32,
458    #[doc = " Pixel width and height of the image source."]
459    pub size: OhosImageSize,
460}
461#[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"]
462#[repr(C)]
463#[derive(Debug, Copy, Clone)]
464pub struct OhosImageSource {
465    #[doc = " Pointer to the image source URI. Only a file URI or Base64 URI is accepted."]
466    pub uri: *mut ::std::os::raw::c_char,
467    #[doc = " Length of the image source URI."]
468    pub uriSize: usize,
469    #[doc = " Descriptor of the image source."]
470    pub fd: i32,
471    #[doc = " Pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted."]
472    pub buffer: *mut u8,
473    #[doc = " Size of the image source buffer."]
474    pub bufferSize: usize,
475}
476#[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"]
477#[repr(C)]
478#[derive(Debug, Copy, Clone)]
479pub struct OhosImageSourceDelayTimeList {
480    #[doc = " Pointer to the head of the image source delay time list."]
481    pub delayTimeList: *mut i32,
482    #[doc = " Size of the image source delay time list."]
483    pub size: usize,
484}
485#[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"]
486#[repr(C)]
487#[derive(Debug, Copy, Clone)]
488pub struct OhosImageSourceSupportedFormat {
489    #[doc = " Image source supported format string head."]
490    pub format: *mut ::std::os::raw::c_char,
491    #[doc = " Image source supported format string size."]
492    pub size: usize,
493}
494#[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"]
495#[repr(C)]
496#[derive(Debug, Copy, Clone)]
497pub struct OhosImageSourceSupportedFormatList {
498    #[doc = " Image source supported format string list head."]
499    pub supportedFormatList: *mut *mut OhosImageSourceSupportedFormat,
500    #[doc = " Image source supported format string list size."]
501    pub size: usize,
502}
503#[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"]
504#[repr(C)]
505#[derive(Debug, Copy, Clone)]
506pub struct OhosImageSourceProperty {
507    #[doc = " Image source property key and value string head."]
508    pub value: *mut ::std::os::raw::c_char,
509    #[doc = " Image source property key and value string size."]
510    pub size: usize,
511}
512#[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"]
513#[repr(C)]
514#[derive(Debug, Copy, Clone)]
515pub struct OhosImageSourceUpdateData {
516    #[doc = " Image source update data buffer."]
517    pub buffer: *mut u8,
518    #[doc = " Image source update data buffer size."]
519    pub bufferSize: usize,
520    #[doc = " Image source offset of update data buffer."]
521    pub offset: u32,
522    #[doc = " Image source update data length in update data buffer."]
523    pub updateLength: u32,
524    #[doc = " Image source update data is completed in this session."]
525    pub isCompleted: i8,
526}
527extern "C" {
528    #[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"]
529    pub fn OH_ImageSource_Create(
530        env: napi_env,
531        src: *mut OhosImageSource,
532        ops: *mut OhosImageSourceOps,
533        res: *mut napi_value,
534    ) -> i32;
535}
536extern "C" {
537    #[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"]
538    pub fn OH_ImageSource_CreateFromUri(
539        env: napi_env,
540        uri: *mut ::std::os::raw::c_char,
541        size: usize,
542        ops: *mut OhosImageSourceOps,
543        res: *mut napi_value,
544    ) -> i32;
545}
546extern "C" {
547    #[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"]
548    pub fn OH_ImageSource_CreateFromFd(
549        env: napi_env,
550        fd: i32,
551        ops: *mut OhosImageSourceOps,
552        res: *mut napi_value,
553    ) -> i32;
554}
555extern "C" {
556    #[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"]
557    pub fn OH_ImageSource_CreateFromData(
558        env: napi_env,
559        data: *mut u8,
560        dataSize: usize,
561        ops: *mut OhosImageSourceOps,
562        res: *mut napi_value,
563    ) -> i32;
564}
565extern "C" {
566    #[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"]
567    pub fn OH_ImageSource_CreateFromRawFile(
568        env: napi_env,
569        rawFile: RawFileDescriptor,
570        ops: *mut OhosImageSourceOps,
571        res: *mut napi_value,
572    ) -> i32;
573}
574extern "C" {
575    #[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"]
576    pub fn OH_ImageSource_CreateIncremental(
577        env: napi_env,
578        source: *mut OhosImageSource,
579        ops: *mut OhosImageSourceOps,
580        res: *mut napi_value,
581    ) -> i32;
582}
583extern "C" {
584    #[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"]
585    pub fn OH_ImageSource_CreateIncrementalFromData(
586        env: napi_env,
587        data: *mut u8,
588        dataSize: usize,
589        ops: *mut OhosImageSourceOps,
590        res: *mut napi_value,
591    ) -> i32;
592}
593extern "C" {
594    #[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"]
595    pub fn OH_ImageSource_GetSupportedFormats(res: *mut OhosImageSourceSupportedFormatList) -> i32;
596}
597extern "C" {
598    #[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"]
599    pub fn OH_ImageSource_InitNative(env: napi_env, source: napi_value) -> *mut ImageSourceNative;
600}
601extern "C" {
602    #[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"]
603    pub fn OH_ImageSource_CreatePixelMap(
604        native: *const ImageSourceNative,
605        ops: *mut OhosImageDecodingOps,
606        res: *mut napi_value,
607    ) -> i32;
608}
609extern "C" {
610    #[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"]
611    pub fn OH_ImageSource_CreatePixelMapList(
612        native: *const ImageSourceNative,
613        ops: *mut OhosImageDecodingOps,
614        res: *mut napi_value,
615    ) -> i32;
616}
617extern "C" {
618    #[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"]
619    pub fn OH_ImageSource_GetDelayTime(
620        native: *const ImageSourceNative,
621        res: *mut OhosImageSourceDelayTimeList,
622    ) -> i32;
623}
624extern "C" {
625    #[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"]
626    pub fn OH_ImageSource_GetFrameCount(native: *const ImageSourceNative, res: *mut u32) -> i32;
627}
628extern "C" {
629    #[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"]
630    pub fn OH_ImageSource_GetImageInfo(
631        native: *const ImageSourceNative,
632        index: i32,
633        info: *mut OhosImageSourceInfo,
634    ) -> i32;
635}
636extern "C" {
637    #[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"]
638    pub fn OH_ImageSource_GetImageProperty(
639        native: *const ImageSourceNative,
640        key: *mut OhosImageSourceProperty,
641        value: *mut OhosImageSourceProperty,
642    ) -> i32;
643}
644extern "C" {
645    #[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"]
646    pub fn OH_ImageSource_ModifyImageProperty(
647        native: *const ImageSourceNative,
648        key: *mut OhosImageSourceProperty,
649        value: *mut OhosImageSourceProperty,
650    ) -> i32;
651}
652extern "C" {
653    #[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"]
654    pub fn OH_ImageSource_UpdateData(
655        native: *const ImageSourceNative,
656        data: *mut OhosImageSourceUpdateData,
657    ) -> i32;
658}
659extern "C" {
660    #[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"]
661    pub fn OH_ImageSource_Release(native: *mut ImageSourceNative) -> i32;
662}