ohos-image-sys 0.0.2

OpenHarmony's image binding for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
/* automatically generated by rust-bindgen 0.65.1 */

#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(clippy::missing_safety_doc)]

use napi_sys_ohos::*;
use ohos_resource_manager_sys::*;

#[link(name = "ohimage")]
#[link(name = "image_packer")]
#[link(name = "picture")]
#[link(name = "image_receiver")]
#[link(name = "image_source")]
#[link(name = "pixelmap")]
unsafe extern "C" {}

#[doc = " @brief Defines the image size.\n\n @since 10\n @version 2.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSize {
    #[doc = " Image width, in pixels."]
    pub width: i32,
    #[doc = " Image height, in pixels."]
    pub height: i32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImageNative_ {
    _unused: [u8; 0],
}
#[doc = " @brief Defines an image object at the native layer for the image interface.\n\n @since 10\n @version 2.0"]
pub type ImageNative = ImageNative_;
#[doc = " @brief Defines the information about an image rectangle.\n\n @since 10\n @version 2.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageRect {
    #[doc = " X coordinate of the rectangle."]
    pub x: i32,
    #[doc = " Y coordinate of the rectangle."]
    pub y: i32,
    #[doc = " Width of the rectangle, in pixels."]
    pub width: i32,
    #[doc = " Height of the rectangle, in pixels."]
    pub height: i32,
}
#[doc = " @brief Defines the image composition information.\n\n @since 10\n @version 2.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageComponent {
    #[doc = " Buffer that stores the pixel data."]
    pub byteBuffer: *mut u8,
    #[doc = " Size of the pixel data in the memory."]
    pub size: usize,
    #[doc = " Type of the pixel data."]
    pub componentType: i32,
    #[doc = " Row stride of the pixel data."]
    pub rowStride: i32,
    #[doc = " Pixel stride of the pixel data"]
    pub pixelStride: i32,
}
extern "C" {
    #[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"]
    pub fn OH_Image_InitImageNative(env: napi_env, source: napi_value) -> *mut ImageNative;
}
extern "C" {
    #[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"]
    pub fn OH_Image_ClipRect(native: *const ImageNative, rect: *mut OhosImageRect) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Size(native: *const ImageNative, size: *mut OhosImageSize) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Format(native: *const ImageNative, format: *mut i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_GetComponent(
        native: *const ImageNative,
        componentType: i32,
        componentNative: *mut OhosImageComponent,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Release(native: *mut ImageNative) -> i32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImagePacker_Native_ {
    _unused: [u8; 0],
}
#[doc = " @brief Defines an image packer object at the native layer for the image packer interface.\n\n @since 11\n @version 4.1"]
pub type ImagePacker_Native = ImagePacker_Native_;
#[doc = " @brief Defines the image packing options.\n\n @since 11\n @version 4.1"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImagePacker_Opts_ {
    #[doc = " Encoding format."]
    pub format: *const ::std::os::raw::c_char,
    #[doc = " Encoding quality."]
    pub quality: ::std::os::raw::c_int,
}
#[doc = " @brief Defines alias of image packing options.\n\n @since 11\n @version 4.1"]
pub type ImagePacker_Opts = ImagePacker_Opts_;
extern "C" {
    #[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"]
    pub fn OH_ImagePacker_Create(env: napi_env, res: *mut napi_value) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImagePacker_InitNative(env: napi_env, packer: napi_value) -> *mut ImagePacker_Native;
}
extern "C" {
    #[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"]
    pub fn OH_ImagePacker_PackToData(
        native: *mut ImagePacker_Native,
        source: napi_value,
        opts: *mut ImagePacker_Opts,
        outData: *mut u8,
        size: *mut usize,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImagePacker_PackToFile(
        native: *mut ImagePacker_Native,
        source: napi_value,
        opts: *mut ImagePacker_Opts,
        fd: ::std::os::raw::c_int,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImagePacker_Release(native: *mut ImagePacker_Native) -> i32;
}
#[doc = " @brief Defines the native pixel map information.\n @since 10\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NativePixelMap_ {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the data type name of the native pixel map.\n @since 10\n @version 1.0"]
pub type NativePixelMap = NativePixelMap_;
#[doc = " @brief Defines the pixel map information.\n\n @since 10\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosPixelMapInfos {
    #[doc = " Image width, in pixels."]
    pub width: u32,
    #[doc = " Image height, in pixels."]
    pub height: u32,
    #[doc = " Number of bytes per row."]
    pub rowSize: u32,
    #[doc = " Pixel format."]
    pub pixelFormat: i32,
}
#[doc = " Nearest-neighbor interpolation."]
pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_NONE:
    OH_PixelMap_AntiAliasingLevel = 0;
#[doc = " Bilinear interpolation, without mipmap linear filtering."]
pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_LOW:
    OH_PixelMap_AntiAliasingLevel = 1;
#[doc = " Bilinear interpolation, with mipmap linear filtering."]
pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_MEDIUM:
    OH_PixelMap_AntiAliasingLevel = 2;
#[doc = " Cubic interpolation."]
pub const OH_PixelMap_AntiAliasingLevel_OH_PixelMap_AntiAliasing_HIGH:
    OH_PixelMap_AntiAliasingLevel = 3;
#[doc = " @brief Enumerates the anti-aliasing level.\n\n @since 12\n @version 1.0"]
pub type OH_PixelMap_AntiAliasingLevel = u32;
#[doc = " @brief Defines the options used for creating a pixel map.\n\n @since 10\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosPixelMapCreateOps {
    #[doc = " Image width, in pixels."]
    pub width: u32,
    #[doc = " Image height, in pixels."]
    pub height: u32,
    #[doc = " Image format."]
    pub pixelFormat: i32,
    #[doc = " Editing type of the image."]
    pub editable: u32,
    #[doc = " Alpha type of the image."]
    pub alphaType: u32,
    #[doc = " Scale mode of the image."]
    pub scaleMode: u32,
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_CreatePixelMap(
        env: napi_env,
        info: OhosPixelMapCreateOps,
        buf: *mut ::std::os::raw::c_void,
        len: usize,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_CreatePixelMapWithStride(
        env: napi_env,
        info: OhosPixelMapCreateOps,
        buf: *mut ::std::os::raw::c_void,
        len: usize,
        rowStride: i32,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_CreateAlphaPixelMap(
        env: napi_env,
        source: napi_value,
        alpha: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_InitNativePixelMap(env: napi_env, source: napi_value)
        -> *mut NativePixelMap;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_GetBytesNumberPerRow(native: *const NativePixelMap, num: *mut i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_GetIsEditable(native: *const NativePixelMap, editable: *mut i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_IsSupportAlpha(native: *const NativePixelMap, alpha: *mut i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_SetAlphaAble(native: *const NativePixelMap, alpha: i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_GetDensity(native: *const NativePixelMap, density: *mut i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_SetDensity(native: *const NativePixelMap, density: i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_SetOpacity(native: *const NativePixelMap, opacity: f32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_Scale(native: *const NativePixelMap, x: f32, y: f32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_ScaleWithAntiAliasing(
        native: *const NativePixelMap,
        x: f32,
        y: f32,
        level: OH_PixelMap_AntiAliasingLevel,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_Translate(native: *const NativePixelMap, x: f32, y: f32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_Rotate(native: *const NativePixelMap, angle: f32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_Flip(native: *const NativePixelMap, x: i32, y: i32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_Crop(
        native: *const NativePixelMap,
        x: i32,
        y: i32,
        width: i32,
        height: i32,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_GetImageInfo(
        native: *const NativePixelMap,
        info: *mut OhosPixelMapInfos,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_AccessPixels(
        native: *const NativePixelMap,
        addr: *mut *mut ::std::os::raw::c_void,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_PixelMap_UnAccessPixels(native: *const NativePixelMap) -> i32;
}
#[doc = " @brief Defines an <b>ImageReceiver</b> object at the native layer.\n\n @since 10\n @version 2.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImageReceiverNative_ {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the data type name of a native image receiver.\n\n @since 10\n @version 2.0"]
pub type ImageReceiverNative = ImageReceiverNative_;
#[doc = " @brief Defines the callbacks for images at the native layer.\n\n @since 10\n @version 2.0"]
pub type OH_Image_Receiver_On_Callback = ::std::option::Option<unsafe extern "C" fn()>;
#[doc = " @brief Defines the information about an image receiver.\n\n @since 10\n @version 2.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageReceiverInfo {
    pub width: i32,
    pub height: i32,
    pub format: i32,
    pub capicity: i32,
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_CreateImageReceiver(
        env: napi_env,
        info: OhosImageReceiverInfo,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_InitImageReceiverNative(
        env: napi_env,
        source: napi_value,
    ) -> *mut ImageReceiverNative;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_GetReceivingSurfaceId(
        native: *const ImageReceiverNative,
        id: *mut ::std::os::raw::c_char,
        len: usize,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_ReadLatestImage(
        native: *const ImageReceiverNative,
        image: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_ReadNextImage(
        native: *const ImageReceiverNative,
        image: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_On(
        native: *const ImageReceiverNative,
        callback: OH_Image_Receiver_On_Callback,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_GetSize(
        native: *const ImageReceiverNative,
        size: *mut OhosImageSize,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_GetCapacity(
        native: *const ImageReceiverNative,
        capacity: *mut i32,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_GetFormat(native: *const ImageReceiverNative, format: *mut i32)
        -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_Image_Receiver_Release(native: *mut ImageReceiverNative) -> i32;
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImageSourceNative_ {
    _unused: [u8; 0],
}
#[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"]
pub type ImageSourceNative = ImageSourceNative_;
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageRegion {
    #[doc = " X coordinate of the start point, in pixels."]
    pub x: i32,
    #[doc = " Y coordinate of the start point, in pixels."]
    pub y: i32,
    #[doc = " Width of the region, in pixels."]
    pub width: i32,
    #[doc = " Height of the region, in pixels."]
    pub height: i32,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSourceOps {
    #[doc = " Pixel density of the image source."]
    pub density: i32,
    #[doc = " Image source pixel format, used to describe YUV buffer usually."]
    pub pixelFormat: i32,
    #[doc = " Image source pixel size of width and height."]
    pub size: OhosImageSize,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageDecodingOps {
    #[doc = " Defines output pixel map editable."]
    pub editable: i8,
    #[doc = " Defines output pixel format."]
    pub pixelFormat: i32,
    #[doc = " Defines decoding target pixel density."]
    pub fitDensity: i32,
    #[doc = " Defines decoding index of image source."]
    pub index: u32,
    #[doc = " Defines decoding sample size option."]
    pub sampleSize: u32,
    #[doc = " Defines decoding rotate option."]
    pub rotate: u32,
    #[doc = " Defines decoding target pixel size of width and height."]
    pub size: OhosImageSize,
    #[doc = " Defines image source pixel region for decoding."]
    pub region: OhosImageRegion,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSourceInfo {
    #[doc = " Pixel format of the image source. It is set in {@link OH_ImageSource_Create}."]
    pub pixelFormat: i32,
    #[doc = " Color space of the image source."]
    pub colorSpace: i32,
    #[doc = " Alpha type of the image source."]
    pub alphaType: i32,
    #[doc = " Image density of the image source. It is set in {@link OH_ImageSource_Create}."]
    pub density: i32,
    #[doc = " Pixel width and height of the image source."]
    pub size: OhosImageSize,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSource {
    #[doc = " Pointer to the image source URI. Only a file URI or Base64 URI is accepted."]
    pub uri: *mut ::std::os::raw::c_char,
    #[doc = " Length of the image source URI."]
    pub uriSize: usize,
    #[doc = " Descriptor of the image source."]
    pub fd: i32,
    #[doc = " Pointer to the image source buffer. Only a formatted packet buffer or Base64 buffer is accepted."]
    pub buffer: *mut u8,
    #[doc = " Size of the image source buffer."]
    pub bufferSize: usize,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSourceDelayTimeList {
    #[doc = " Pointer to the head of the image source delay time list."]
    pub delayTimeList: *mut i32,
    #[doc = " Size of the image source delay time list."]
    pub size: usize,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSourceSupportedFormat {
    #[doc = " Image source supported format string head."]
    pub format: *mut ::std::os::raw::c_char,
    #[doc = " Image source supported format string size."]
    pub size: usize,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSourceSupportedFormatList {
    #[doc = " Image source supported format string list head."]
    pub supportedFormatList: *mut *mut OhosImageSourceSupportedFormat,
    #[doc = " Image source supported format string list size."]
    pub size: usize,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSourceProperty {
    #[doc = " Image source property key and value string head."]
    pub value: *mut ::std::os::raw::c_char,
    #[doc = " Image source property key and value string size."]
    pub size: usize,
}
#[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"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OhosImageSourceUpdateData {
    #[doc = " Image source update data buffer."]
    pub buffer: *mut u8,
    #[doc = " Image source update data buffer size."]
    pub bufferSize: usize,
    #[doc = " Image source offset of update data buffer."]
    pub offset: u32,
    #[doc = " Image source update data length in update data buffer."]
    pub updateLength: u32,
    #[doc = " Image source update data is completed in this session."]
    pub isCompleted: i8,
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_Create(
        env: napi_env,
        src: *mut OhosImageSource,
        ops: *mut OhosImageSourceOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreateFromUri(
        env: napi_env,
        uri: *mut ::std::os::raw::c_char,
        size: usize,
        ops: *mut OhosImageSourceOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreateFromFd(
        env: napi_env,
        fd: i32,
        ops: *mut OhosImageSourceOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreateFromData(
        env: napi_env,
        data: *mut u8,
        dataSize: usize,
        ops: *mut OhosImageSourceOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreateFromRawFile(
        env: napi_env,
        rawFile: RawFileDescriptor,
        ops: *mut OhosImageSourceOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreateIncremental(
        env: napi_env,
        source: *mut OhosImageSource,
        ops: *mut OhosImageSourceOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreateIncrementalFromData(
        env: napi_env,
        data: *mut u8,
        dataSize: usize,
        ops: *mut OhosImageSourceOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_GetSupportedFormats(res: *mut OhosImageSourceSupportedFormatList) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_InitNative(env: napi_env, source: napi_value) -> *mut ImageSourceNative;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreatePixelMap(
        native: *const ImageSourceNative,
        ops: *mut OhosImageDecodingOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_CreatePixelMapList(
        native: *const ImageSourceNative,
        ops: *mut OhosImageDecodingOps,
        res: *mut napi_value,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_GetDelayTime(
        native: *const ImageSourceNative,
        res: *mut OhosImageSourceDelayTimeList,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_GetFrameCount(native: *const ImageSourceNative, res: *mut u32) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_GetImageInfo(
        native: *const ImageSourceNative,
        index: i32,
        info: *mut OhosImageSourceInfo,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_GetImageProperty(
        native: *const ImageSourceNative,
        key: *mut OhosImageSourceProperty,
        value: *mut OhosImageSourceProperty,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_ModifyImageProperty(
        native: *const ImageSourceNative,
        key: *mut OhosImageSourceProperty,
        value: *mut OhosImageSourceProperty,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_UpdateData(
        native: *const ImageSourceNative,
        data: *mut OhosImageSourceUpdateData,
    ) -> i32;
}
extern "C" {
    #[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"]
    pub fn OH_ImageSource_Release(native: *mut ImageSourceNative) -> i32;
}