ohos-image-native-sys 0.0.5

OpenHarmony's native 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
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
/* 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)]
// bindgen's bitfield accessors transmute/cast between identical types.
#![allow(clippy::useless_transmute)]
#![allow(clippy::unnecessary_cast)]

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

#[link(name = "image_ndk.z")]
#[link(name = "image_packer_ndk.z")]
#[link(name = "pixelmap_ndk.z")]
#[link(name = "image_receiver_ndk.z")]
#[link(name = "image_source_ndk.z")]
#[link(name = "image_source")]
#[link(name = "image_receiver")]
#[link(name = "pixelmap")]
#[link(name = "ohimage")]
unsafe extern "C" {}

#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
    #[inline]
    pub const fn new() -> Self {
        __IncompleteArrayField(::std::marker::PhantomData, [])
    }
    #[inline]
    pub fn as_ptr(&self) -> *const T {
        self as *const _ as *const T
    }
    #[inline]
    pub fn as_mut_ptr(&mut self) -> *mut T {
        self as *mut _ as *mut T
    }
    #[inline]
    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
        ::std::slice::from_raw_parts(self.as_ptr(), len)
    }
    #[inline]
    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
    }
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        fmt.write_str("__IncompleteArrayField")
    }
}
#[doc = " @brief Defines the image size.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Image_Size {
    #[doc = " Image width, in pixels."]
    pub width: u32,
    #[doc = " Image height, in pixels."]
    pub height: u32,
}
#[doc = " @brief Defines the region of the image source to decode.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Image_Region {
    #[doc = " X coordinate of the start point, in pixels."]
    pub x: u32,
    #[doc = " Y coordinate of the start point, in pixels."]
    pub y: u32,
    #[doc = " Width of the region, in pixels."]
    pub width: u32,
    #[doc = " Height of the region, in pixels."]
    pub height: u32,
}
#[doc = " @brief Defines the area of the image pixels to read or write.\n\n @since 22"]
#[cfg(feature = "api-22")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Image_PositionArea {
    #[doc = " Image pixels data that will be read or written."]
    pub pixels: *mut u8,
    #[doc = " Length of the image pixels data."]
    pub pixelsSize: usize,
    #[doc = " Offset for data reading or writing."]
    pub offset: u32,
    #[doc = " Number of bytes per row of the region."]
    pub stride: u32,
    #[doc = " Region to read or write."]
    pub region: Image_Region,
}
#[doc = " @brief Defines the image scale ratio.\n\n @since 22"]
#[cfg(feature = "api-22")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Image_Scale {
    #[doc = " Scale ratio on the x-axis."]
    pub x: f32,
    #[doc = " Scale ratio on the y-axis."]
    pub y: f32,
}
#[doc = " @brief The struct describes an image string, which is a carrier for string data.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Image_String {
    #[doc = " data for string type"]
    pub data: *mut ::std::os::raw::c_char,
    #[doc = " data length for string type"]
    pub size: usize,
}
#[doc = " @brief Define a PictureMetadata struct type, used for picture metadata.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PictureMetadata {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the image encode format.\n\n @since 12"]
pub type Image_MimeType = Image_String;
#[doc = " operation success"]
pub const Image_ErrorCode_IMAGE_SUCCESS: Image_ErrorCode = 0;
#[doc = " invalid parameter"]
pub const Image_ErrorCode_IMAGE_BAD_PARAMETER: Image_ErrorCode = 401;
#[doc = " unsupported mime type"]
pub const Image_ErrorCode_IMAGE_UNSUPPORTED_MIME_TYPE: Image_ErrorCode = 7600101;
#[doc = " unknown mime type"]
pub const Image_ErrorCode_IMAGE_UNKNOWN_MIME_TYPE: Image_ErrorCode = 7600102;
#[doc = " too large data or image"]
pub const Image_ErrorCode_IMAGE_TOO_LARGE: Image_ErrorCode = 7600103;
#[doc = " @error Failed to get image data.\n @since 23"]
#[cfg(feature = "api-23")]
pub const Image_ErrorCode_IMAGE_GET_IMAGE_DATA_FAILED: Image_ErrorCode = 7600104;
#[doc = " @error PixelMap has been released.\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const Image_ErrorCode_IMAGE_PIXELMAP_RELEASED: Image_ErrorCode = 7600105;
#[doc = " @error DMA memory does not exist"]
pub const Image_ErrorCode_IMAGE_DMA_NOT_EXIST: Image_ErrorCode = 7600173;
#[doc = " @error DMA operation failed"]
pub const Image_ErrorCode_IMAGE_DMA_OPERATION_FAILED: Image_ErrorCode = 7600174;
#[doc = " unsupported operations"]
pub const Image_ErrorCode_IMAGE_UNSUPPORTED_OPERATION: Image_ErrorCode = 7600201;
#[doc = " unsupported metadata"]
pub const Image_ErrorCode_IMAGE_UNSUPPORTED_METADATA: Image_ErrorCode = 7600202;
#[doc = " unsupported conversion"]
pub const Image_ErrorCode_IMAGE_UNSUPPORTED_CONVERSION: Image_ErrorCode = 7600203;
#[doc = " invalid region"]
pub const Image_ErrorCode_IMAGE_INVALID_REGION: Image_ErrorCode = 7600204;
#[doc = " @error unsupported memory format\n  @since 13"]
#[cfg(feature = "api-13")]
pub const Image_ErrorCode_IMAGE_UNSUPPORTED_MEMORY_FORMAT: Image_ErrorCode = 7600205;
#[doc = " @error Invalid parameter.\n @since 19"]
#[cfg(feature = "api-19")]
pub const Image_ErrorCode_IMAGE_INVALID_PARAMETER: Image_ErrorCode = 7600206;
#[doc = " @error Unsupported data format\n @since 22"]
#[cfg(feature = "api-22")]
pub const Image_ErrorCode_IMAGE_UNSUPPORTED_DATA_FORMAT: Image_ErrorCode = 7600207;
#[doc = " failed to allocate memory"]
pub const Image_ErrorCode_IMAGE_ALLOC_FAILED: Image_ErrorCode = 7600301;
#[doc = " memory copy failed"]
pub const Image_ErrorCode_IMAGE_COPY_FAILED: Image_ErrorCode = 7600302;
#[doc = " @error memory lock or unlock failed\n @since 15"]
#[cfg(feature = "api-15")]
pub const Image_ErrorCode_IMAGE_LOCK_UNLOCK_FAILED: Image_ErrorCode = 7600303;
#[doc = " @error Initialization failed\n @since 22"]
#[cfg(feature = "api-22")]
pub const Image_ErrorCode_IMAGE_INIT_FAILED: Image_ErrorCode = 7600304;
#[doc = " @error Create PixelMap failed\n @since 22"]
#[cfg(feature = "api-22")]
pub const Image_ErrorCode_IMAGE_CREATE_PIXELMAP_FAILED: Image_ErrorCode = 7600305;
#[doc = " @error Data conversion failed.\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const Image_ErrorCode_IMAGE_DATA_CONVERSION_FAILED: Image_ErrorCode = 7600306;
#[doc = " @error unsupported allocator mode, e.g., use share memory to create a HDR image as only\n DMA supported hdr metadata.\n @since 20"]
#[cfg(feature = "api-20")]
pub const Image_ErrorCode_IMAGE_ALLOCATOR_MODE_UNSUPPORTED: Image_ErrorCode = 7600501;
#[doc = " unknown error"]
pub const Image_ErrorCode_IMAGE_UNKNOWN_ERROR: Image_ErrorCode = 7600901;
#[doc = " decode data source exception"]
pub const Image_ErrorCode_IMAGE_BAD_SOURCE: Image_ErrorCode = 7700101;
#[doc = " @error unsupported mime type\n @since 15"]
#[cfg(feature = "api-15")]
pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE: Image_ErrorCode = 7700102;
#[doc = " @error image to large\n @since 15"]
#[cfg(feature = "api-15")]
pub const Image_ErrorCode_IMAGE_SOURCE_TOO_LARGE: Image_ErrorCode = 7700103;
#[doc = " @error unsupported allocator type, e.g., use share memory to decode a HDR image as only\n DMA supported hdr metadata.\n @since 15"]
#[cfg(feature = "api-15")]
pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE: Image_ErrorCode = 7700201;
#[doc = " @error Unsupported metadata. For example, the property key is not supported,\n     or the property value is invalid.\n @since 23"]
#[cfg(feature = "api-23")]
pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_METADATA: Image_ErrorCode = 7700202;
#[doc = " @error unsupported options, e.g, cannot convert image into desired pixel format.\n @since 15"]
#[cfg(feature = "api-15")]
pub const Image_ErrorCode_IMAGE_SOURCE_UNSUPPORTED_OPTIONS: Image_ErrorCode = 7700203;
#[doc = " @error Invalid parameter.\n @since 19"]
#[cfg(feature = "api-19")]
pub const Image_ErrorCode_IMAGE_SOURCE_INVALID_PARAMETER: Image_ErrorCode = 7700204;
#[doc = " decode failed"]
pub const Image_ErrorCode_IMAGE_DECODE_FAILED: Image_ErrorCode = 7700301;
#[doc = " @error memory allocation failed\n @since 15"]
#[cfg(feature = "api-15")]
pub const Image_ErrorCode_IMAGE_SOURCE_ALLOC_FAILED: Image_ErrorCode = 7700302;
#[doc = " @error Invalid parameter for ImagePacker.\n @since 19"]
#[cfg(feature = "api-19")]
pub const Image_ErrorCode_IMAGE_PACKER_INVALID_PARAMETER: Image_ErrorCode = 7800202;
#[doc = " encode failed"]
pub const Image_ErrorCode_IMAGE_ENCODE_FAILED: Image_ErrorCode = 7800301;
#[doc = " @error Invalid parameter for ImageReceiver.\n @since 20"]
#[cfg(feature = "api-20")]
pub const Image_ErrorCode_IMAGE_RECEIVER_INVALID_PARAMETER: Image_ErrorCode = 7900201;
#[doc = " @brief Enumerates the return values that may be used by the interface.\n\n @since 12"]
pub type Image_ErrorCode = u32;
#[doc = " Exif metadata.\n\n @since 13"]
#[cfg(feature = "api-13")]
pub const Image_MetadataType_EXIF_METADATA: Image_MetadataType = 1;
#[doc = " Fragment map metadata.\n\n @since 13"]
#[cfg(feature = "api-13")]
pub const Image_MetadataType_FRAGMENT_METADATA: Image_MetadataType = 2;
#[doc = " GIF image metadata.\n\n @since 20"]
#[cfg(feature = "api-20")]
pub const Image_MetadataType_GIF_METADATA: Image_MetadataType = 5;
#[doc = " @brief Enumerates the metadata types.\n\n @since 13"]
#[cfg(feature = "api-13")]
pub type Image_MetadataType = u32;
#[doc = " The system determines which memory to use to create the PixelMap.\n\n @since 20"]
#[cfg(feature = "api-20")]
pub const IMAGE_ALLOCATOR_MODE_IMAGE_ALLOCATOR_MODE_AUTO: IMAGE_ALLOCATOR_MODE = 0;
#[doc = " Use DMA buffer to create the PixelMap.\n\n @since 20"]
#[cfg(feature = "api-20")]
pub const IMAGE_ALLOCATOR_MODE_IMAGE_ALLOCATOR_MODE_DMA: IMAGE_ALLOCATOR_MODE = 1;
#[doc = " Use share memory to create the PixelMap.\n\n @since 20"]
#[cfg(feature = "api-20")]
pub const IMAGE_ALLOCATOR_MODE_IMAGE_ALLOCATOR_MODE_SHARED_MEMORY: IMAGE_ALLOCATOR_MODE = 2;
#[doc = " @brief Type of allocator used to allocate memory of a PixelMap.\n\n @since 20"]
#[cfg(feature = "api-20")]
pub type IMAGE_ALLOCATOR_MODE = u32;
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_PictureMetadata struct.\n\n @param metadataType Metadata type.\n @param metadata Double pointer to the OH_PictureMetadata struct created.\n @return {@link IMAGE_SUCCESS}: The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}: A parameter is incorrect.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureMetadata_Create(
        metadataType: Image_MetadataType,
        metadata: *mut *mut OH_PictureMetadata,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains a property of metadata based on the key. **value.data** obtained through this API lacks the string\n terminator **\\0**. Please use it with caution.\n\n @param metadata Pointer to an OH_PictureMetadata struct.\n @param key Pointer to the key of the property.\n @param value Pointer to the value of the property.\n @return {@link IMAGE_SUCCESS}: The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}: A parameter is incorrect.\n     <br>{@link IMAGE_UNSUPPORTED_METADATA}: The metadata type is not supported, or the metadata type and the\n     auxiliary picture type do not match.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureMetadata_GetProperty(
        metadata: *mut OH_PictureMetadata,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the metadata value of an OH_PictureMetadata instance. The output **value.data** ends with the string\n terminator **\\0**.\n\n @param metadata Pointer to an OH_PictureMetadata struct.\n @param key Pointer to the key of the property.\n @param value Pointer to the value of the property.\n @return {@link IMAGE_SUCCESS}: The operation is successful.\n     <br>{@link IMAGE_INVALID_PARAMETER}: The **metadata**, **key**, or **value** parameter is a null pointer.\n     <br>{@link IMAGE_UNSUPPORTED_METADATA}: The metadata type is not supported, or the metadata type and the\n     auxiliary picture type do not match.\n @since 19"]
    #[cfg(feature = "api-19")]
    pub fn OH_PictureMetadata_GetPropertyWithNull(
        metadata: *mut OH_PictureMetadata,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets a property of metadata based on the key.\n\n @param metadata Pointer to an OH_PictureMetadata struct.\n @param key Pointer to the key of the property.\n @param value Pointer to the value of the property.\n @return {@link IMAGE_SUCCESS}: The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}: A parameter is incorrect.\n     <br>{@link IMAGE_UNSUPPORTED_METADATA}: The metadata type is not supported, or the metadata type and the\n     auxiliary picture type do not match.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureMetadata_SetProperty(
        metadata: *mut OH_PictureMetadata,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets blob data in the metadata.\n\n @param metadata Pointer to an OH_PictureMetadata struct.\n @param blob Pointer to the blob data.\n @param blobSize Size of the blob data.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} metadata is nullptr, or blob is nullptr, or blobSize is 0.</li>\n         <li>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.</li>\n         <li>{@link IMAGE_UNSUPPORTED_OPERATION} failed to set blob data.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureMetadata_SetBlobData(
        metadata: *mut OH_PictureMetadata,
        blob: *mut u8,
        blobSize: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the size of the blob data in the metadata.\n\n @param metadata Pointer to an OH_PictureMetadata struct.\n @param blobSize Pointer to the size of the blob data.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} metadata or blobSize is nullptr.</li>\n         <li>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureMetadata_GetBlobDataSize(
        metadata: *mut OH_PictureMetadata,
        blobSize: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains blob data from the metadata.\n\n @param metadata Pointer to an OH_PictureMetadata struct.\n @param blob Pointer to the blob data obtained.\n @param blobSize Size of the blob data. The value must be greater than or equal to the value obtained by the\n     OH_PictureMetadata_GetBlobSize method.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} metadata is nullptr, or blob is nullptr, or blobSize is 0, or blobSize\n             is less than metadata length.</li>\n         <li>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.</li>\n         <li>{@link IMAGE_UNSUPPORTED_OPERATION} failed to get blob data.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureMetadata_GetBlobData(
        metadata: *mut OH_PictureMetadata,
        blob: *mut u8,
        blobSize: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_PictureMetadata struct.\n\n @param metadata Pointer to an OH_PictureMetadata struct.\n @return {@link IMAGE_SUCCESS}: The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}: A parameter is incorrect.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureMetadata_Release(metadata: *mut OH_PictureMetadata) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Clones metadata.\n\n @param oldMetadata Pointer to an OH_PictureMetadata struct.\n @param newMetadata Double pointer to the OH_PictureMetadata struct obtained.\n @return {@link IMAGE_SUCCESS}: The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}: A parameter is incorrect.\n     <br>{@link IMAGE_ALLOC_FAILED}: The memory allocation fails.\n     <br>{@link IMAGE_COPY_FAILED}: The memory copy fails.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureMetadata_Clone(
        oldMetadata: *mut OH_PictureMetadata,
        newMetadata: *mut *mut OH_PictureMetadata,
    ) -> Image_ErrorCode;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OHIPCParcel {
    _unused: [u8; 0],
}
#[doc = " if rects is nullptr, fill the Buffer dirty size by default"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Region_Rect {
    pub x: i32,
    pub y: i32,
    pub w: u32,
    pub h: u32,
}
#[doc = " the window content is not updated until a buffer of\n the window size is received"]
pub const OHScalingMode_OH_SCALING_MODE_FREEZE: OHScalingMode = 0;
#[doc = " the buffer is scaled in two dimensions to match the window size"]
pub const OHScalingMode_OH_SCALING_MODE_SCALE_TO_WINDOW: OHScalingMode = 1;
#[doc = " the buffer is uniformly scaled so that the smaller size of\n the buffer matches the window size"]
pub const OHScalingMode_OH_SCALING_MODE_SCALE_CROP: OHScalingMode = 2;
#[doc = " the window is clipped to the size of the buffer's clipping rectangle\n pixels outside the clipping rectangle are considered fully transparent."]
pub const OHScalingMode_OH_SCALING_MODE_NO_SCALE_CROP: OHScalingMode = 3;
#[doc = " @brief Indicates Scaling Mode.\n @since 9\n @deprecated since 10\n @useinstead OHScalingModeV2"]
pub type OHScalingMode = u32;
#[doc = " the window content is not updated until a buffer of\n the window size is received"]
pub const OHScalingModeV2_OH_SCALING_MODE_FREEZE_V2: OHScalingModeV2 = 0;
#[doc = " the buffer is scaled in two dimensions to match the window size"]
pub const OHScalingModeV2_OH_SCALING_MODE_SCALE_TO_WINDOW_V2: OHScalingModeV2 = 1;
#[doc = " the buffer is uniformly scaled so that the smaller size of\n the buffer matches the window size"]
pub const OHScalingModeV2_OH_SCALING_MODE_SCALE_CROP_V2: OHScalingModeV2 = 2;
#[doc = " the window is clipped to the size of the buffer's clipping rectangle\n pixels outside the clipping rectangle are considered fully transparent."]
pub const OHScalingModeV2_OH_SCALING_MODE_NO_SCALE_CROP_V2: OHScalingModeV2 = 3;
#[doc = " Adapt to the buffer and scale proportionally to the buffer size. Prioritize displaying all buffer content.\n If the size is not the same as the window size, fill the unfilled area of the window with a background color."]
pub const OHScalingModeV2_OH_SCALING_MODE_SCALE_FIT_V2: OHScalingModeV2 = 4;
#[doc = " @brief Indicates Scaling Mode.\n @since 12"]
pub type OHScalingModeV2 = u32;
pub const OHHDRMetadataKey_OH_METAKEY_RED_PRIMARY_X: OHHDRMetadataKey = 0;
pub const OHHDRMetadataKey_OH_METAKEY_RED_PRIMARY_Y: OHHDRMetadataKey = 1;
pub const OHHDRMetadataKey_OH_METAKEY_GREEN_PRIMARY_X: OHHDRMetadataKey = 2;
pub const OHHDRMetadataKey_OH_METAKEY_GREEN_PRIMARY_Y: OHHDRMetadataKey = 3;
pub const OHHDRMetadataKey_OH_METAKEY_BLUE_PRIMARY_X: OHHDRMetadataKey = 4;
pub const OHHDRMetadataKey_OH_METAKEY_BLUE_PRIMARY_Y: OHHDRMetadataKey = 5;
pub const OHHDRMetadataKey_OH_METAKEY_WHITE_PRIMARY_X: OHHDRMetadataKey = 6;
pub const OHHDRMetadataKey_OH_METAKEY_WHITE_PRIMARY_Y: OHHDRMetadataKey = 7;
pub const OHHDRMetadataKey_OH_METAKEY_MAX_LUMINANCE: OHHDRMetadataKey = 8;
pub const OHHDRMetadataKey_OH_METAKEY_MIN_LUMINANCE: OHHDRMetadataKey = 9;
pub const OHHDRMetadataKey_OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL: OHHDRMetadataKey = 10;
pub const OHHDRMetadataKey_OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL: OHHDRMetadataKey = 11;
pub const OHHDRMetadataKey_OH_METAKEY_HDR10_PLUS: OHHDRMetadataKey = 12;
pub const OHHDRMetadataKey_OH_METAKEY_HDR_VIVID: OHHDRMetadataKey = 13;
#[doc = " @brief Enumerates the HDR metadata keys.\n @since 9\n @deprecated since 10"]
pub type OHHDRMetadataKey = u32;
#[doc = " @brief Defines the HDR metadata.\n @since 9\n @deprecated since 10"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OHHDRMetaData {
    pub key: OHHDRMetadataKey,
    pub value: f32,
}
#[doc = " @brief Defines the ExtData Handle\n @since 9\n @deprecated since 10"]
#[repr(C)]
#[derive(Debug)]
pub struct OHExtDataHandle {
    pub fd: i32,
    pub reserveInts: u32,
    pub reserve: __IncompleteArrayField<i32>,
}
#[doc = " @brief The struct describes the alias for an image object at the native layer.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageNative {
    _unused: [u8; 0],
}
#[doc = " @brief {@link OH_ImageBufferData} is the image data struct encapsulated at the native layer. To obtain an {@link OH_ImageBufferData}\n object, call {@link OH_ImageNative_GetBufferData}.\n\n The struct stores the shallow copy of the original image data. Once the original data is released, no read\n or write operations should be performed on the pointers within this struct; otherwise, undefined behavior\n will occur.\n\n @since 23"]
#[cfg(feature = "api-23")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageBufferData {
    #[doc = " rowStride of each component."]
    pub rowStride: *mut i32,
    #[doc = " pixelStride of each component."]
    pub pixelStride: *mut i32,
    #[doc = " number of strides."]
    pub numStride: i32,
    #[doc = " byte length of the buffer"]
    pub bufferSize: usize,
    #[doc = " native buffer of the image."]
    pub nativeBuffer: *mut OH_NativeBuffer,
}
extern "C" {
    #[doc = " @brief Obtains {@link Image_Size} of an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param size Pointer to the {@link Image_Size} object obtained.\n @return {@linkImage_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n     <br>{@linkImage_ErrorCode} IMAGE_BAD_PARAMETER - A parameter is incorrect.\n     <br>{@linkImage_ErrorCode} IMAGE_UNKNOWN_ERROR - An unknown error occurs.\n @since 12"]
    pub fn OH_ImageNative_GetImageSize(
        image: *mut OH_ImageNative,
        size: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the component types of an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param types Pointer to the component type list object obtained. Since the number of components is uncertain, this\n     API needs to be called twice: first, set **types** to **NULL** to obtain the number of components (**typeSize**);\n     second, allocate corresponding memory for **types** based on **typeSize** and then obtain the component type list.\n @param typeSize Pointer to the number of component types obtained.\n @return {@linkImage_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n     <br>{@linkImage_ErrorCode} IMAGE_BAD_PARAMETER - A parameter is incorrect.\n @since 12"]
    pub fn OH_ImageNative_GetComponentTypes(
        image: *mut OH_ImageNative,
        types: *mut *mut u32,
        typeSize: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the buffer corresponding to a component type in an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param componentType Component type. The value is obtained using the {@link OH_ImageNative_GetComponentTypes} API.\n @param nativeBuffer Double pointer to the buffer, which is an {@link OH_NativeBuffer} object.\n @return {@linkImage_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n     <br>{@linkImage_ErrorCode} IMAGE_BAD_PARAMETER - A parameter is incorrect.\n @since 12"]
    pub fn OH_ImageNative_GetByteBuffer(
        image: *mut OH_ImageNative,
        componentType: u32,
        nativeBuffer: *mut *mut OH_NativeBuffer,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the size of the buffer corresponding to a component type in an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param componentType Component type. The value is obtained using the {@link OH_ImageNative_GetComponentTypes} API.\n @param size Pointer to the size of the buffer.\n @return {@linkImage_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n     <br>{@linkImage_ErrorCode} IMAGE_BAD_PARAMETER - A parameter is incorrect.\n @since 12"]
    pub fn OH_ImageNative_GetBufferSize(
        image: *mut OH_ImageNative,
        componentType: u32,
        size: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the row stride corresponding to a component type in an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param componentType Component type. The value is obtained using the {@link OH_ImageNative_GetComponentTypes} API.\n @param rowStride Pointer to the row stride obtained.\n @return {@linkImage_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n     <br>{@linkImage_ErrorCode} IMAGE_BAD_PARAMETER - A parameter is incorrect.\n @since 12"]
    pub fn OH_ImageNative_GetRowStride(
        image: *mut OH_ImageNative,
        componentType: u32,
        rowStride: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pixel stride corresponding to a component type in an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param componentType Component type. The value is obtained using the {@link OH_ImageNative_GetComponentTypes} API.\n @param pixelStride Pointer to the pixel stride obtained.\n @return {@linkImage_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n     <br>{@linkImage_ErrorCode} IMAGE_BAD_PARAMETER - A parameter is incorrect.\n @since 12"]
    pub fn OH_ImageNative_GetPixelStride(
        image: *mut OH_ImageNative,
        componentType: u32,
        pixelStride: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the timestamp of an {@link OH_ImageNative} object. Timestamps, measured in nanoseconds, are usually\n monotonically increasing.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param timestamp Pointer to the timestamp.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS The operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER A parameter is incorrect.\n @since 12"]
    pub fn OH_ImageNative_GetTimestamp(
        image: *mut OH_ImageNative,
        timestamp: *mut i64,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @return {@linkImage_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n     <br>{@linkImage_ErrorCode} IMAGE_BAD_PARAMETER - A parameter is incorrect.\n @since 12"]
    pub fn OH_ImageNative_Release(image: *mut OH_ImageNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the color space in an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param colorSpaceName Pointer to the image color space. For details about the color space corresponding to **colorSpaceName**,\n     see {@link ColorSpaceName}.\n @return {@link IMAGE_SUCCESS} The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} A parameter is incorrect.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageNative_GetColorSpace(
        image: *mut OH_ImageNative,
        colorSpaceName: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image format in an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param format Pointer to the image format.\n @return {@link IMAGE_SUCCESS} The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} A parameter is incorrect.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageNative_GetFormat(
        image: *mut OH_ImageNative,
        format: *mut OH_NativeBuffer_Format,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image buffer data object in an {@link OH_ImageNative} object.\n\n @param image Pointer to an {@link OH_ImageNative} object.\n @param imageBufferData Pointer to the image buffer data object.\n @return {@link IMAGE_SUCCESS} The operation is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} A parameter is incorrect.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageNative_GetBufferData(
        image: *mut OH_ImageNative,
        imageBufferData: *mut OH_ImageBufferData,
    ) -> Image_ErrorCode;
}
#[doc = " @brief Define a Pixelmap struct type, used for pixelmap pointer controls.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PixelmapNative {
    _unused: [u8; 0],
}
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_NativeColorSpaceManager {
    _unused: [u8; 0],
}
pub const PIXELMAP_ALPHA_TYPE_PIXELMAP_ALPHA_TYPE_UNKNOWN: PIXELMAP_ALPHA_TYPE = 0;
pub const PIXELMAP_ALPHA_TYPE_PIXELMAP_ALPHA_TYPE_OPAQUE: PIXELMAP_ALPHA_TYPE = 1;
pub const PIXELMAP_ALPHA_TYPE_PIXELMAP_ALPHA_TYPE_PREMULTIPLIED: PIXELMAP_ALPHA_TYPE = 2;
pub const PIXELMAP_ALPHA_TYPE_PIXELMAP_ALPHA_TYPE_UNPREMULTIPLIED: PIXELMAP_ALPHA_TYPE = 3;
#[doc = " @brief Define a pixelmap alpha type.\n\n @since 12"]
pub type PIXELMAP_ALPHA_TYPE = u32;
pub const PIXEL_FORMAT_PIXEL_FORMAT_UNKNOWN: PIXEL_FORMAT = 0;
pub const PIXEL_FORMAT_PIXEL_FORMAT_RGB_565: PIXEL_FORMAT = 2;
pub const PIXEL_FORMAT_PIXEL_FORMAT_RGBA_8888: PIXEL_FORMAT = 3;
pub const PIXEL_FORMAT_PIXEL_FORMAT_BGRA_8888: PIXEL_FORMAT = 4;
pub const PIXEL_FORMAT_PIXEL_FORMAT_RGB_888: PIXEL_FORMAT = 5;
pub const PIXEL_FORMAT_PIXEL_FORMAT_ALPHA_8: PIXEL_FORMAT = 6;
pub const PIXEL_FORMAT_PIXEL_FORMAT_RGBA_F16: PIXEL_FORMAT = 7;
pub const PIXEL_FORMAT_PIXEL_FORMAT_NV21: PIXEL_FORMAT = 8;
pub const PIXEL_FORMAT_PIXEL_FORMAT_NV12: PIXEL_FORMAT = 9;
pub const PIXEL_FORMAT_PIXEL_FORMAT_RGBA_1010102: PIXEL_FORMAT = 10;
pub const PIXEL_FORMAT_PIXEL_FORMAT_YCBCR_P010: PIXEL_FORMAT = 11;
pub const PIXEL_FORMAT_PIXEL_FORMAT_YCRCB_P010: PIXEL_FORMAT = 12;
#[doc = " ALPHA_U8 format\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const PIXEL_FORMAT_PIXEL_FORMAT_ALPHA_U8: PIXEL_FORMAT = 15;
#[doc = " ALPHA_F16 format\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const PIXEL_FORMAT_PIXEL_FORMAT_ALPHA_F16: PIXEL_FORMAT = 16;
pub type PIXEL_FORMAT = u32;
#[doc = " Nearest-neighbor interpolation algorithm"]
pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_NONE:
    OH_PixelmapNative_AntiAliasingLevel = 0;
#[doc = " Bilinear interpolation algorithm"]
pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_LOW:
    OH_PixelmapNative_AntiAliasingLevel = 1;
#[doc = " Bilinear interpolation algorithm with mipmap linear filtering"]
pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_MEDIUM:
    OH_PixelmapNative_AntiAliasingLevel = 2;
#[doc = " Cubic interpolation algorithm"]
pub const OH_PixelmapNative_AntiAliasingLevel_OH_PixelmapNative_AntiAliasing_HIGH:
    OH_PixelmapNative_AntiAliasingLevel = 3;
#[doc = " @brief Defines the anti-aliasing level.\n\n @since 12"]
pub type OH_PixelmapNative_AntiAliasingLevel = u32;
#[doc = " Indicate the types of metadata that image needs to use."]
pub const OH_Pixelmap_HdrMetadataKey_HDR_METADATA_TYPE: OH_Pixelmap_HdrMetadataKey = 0;
#[doc = " Static metadata key."]
pub const OH_Pixelmap_HdrMetadataKey_HDR_STATIC_METADATA: OH_Pixelmap_HdrMetadataKey = 1;
#[doc = " Dynamic metadata key."]
pub const OH_Pixelmap_HdrMetadataKey_HDR_DYNAMIC_METADATA: OH_Pixelmap_HdrMetadataKey = 2;
#[doc = " Gainmap metadata key."]
pub const OH_Pixelmap_HdrMetadataKey_HDR_GAINMAP_METADATA: OH_Pixelmap_HdrMetadataKey = 3;
#[doc = " @brief Enumerates the HDR metadata types that need to be stored in Pixelmap.\n\n @since 12"]
pub type OH_Pixelmap_HdrMetadataKey = u32;
#[doc = " No metadata."]
pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_NONE: OH_Pixelmap_HdrMetadataType = 0;
#[doc = " Indicates that metadata will be used for the base image."]
pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_BASE: OH_Pixelmap_HdrMetadataType = 1;
#[doc = " Indicates that metadata will be used for the gainmap image."]
pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_GAINMAP: OH_Pixelmap_HdrMetadataType = 2;
#[doc = " Indicates that metadata will be used for the alternate image."]
pub const OH_Pixelmap_HdrMetadataType_HDR_METADATA_TYPE_ALTERNATE: OH_Pixelmap_HdrMetadataType = 3;
#[doc = " @brief Value for HDR_METADATA_TYPE.\n\n @since 12"]
pub type OH_Pixelmap_HdrMetadataType = u32;
#[doc = " @brief Value for HDR_STATIC_METADATA.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Pixelmap_HdrStaticMetadata {
    #[doc = " The X-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b."]
    pub displayPrimariesX: [f32; 3usize],
    #[doc = " The Y-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b."]
    pub displayPrimariesY: [f32; 3usize],
    #[doc = " The X-coordinate of the white point value."]
    pub whitePointX: f32,
    #[doc = " The Y-coordinate of the white point value."]
    pub whitePointY: f32,
    #[doc = " Max luminance."]
    pub maxLuminance: f32,
    #[doc = " Min luminance."]
    pub minLuminance: f32,
    #[doc = " Maximum brightness of displayed content."]
    pub maxContentLightLevel: f32,
    #[doc = " Maximum average brightness of displayed content."]
    pub maxFrameAverageLightLevel: f32,
}
#[doc = " @brief Value for HDR_DYNAMIC_METADATA.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Pixelmap_HdrDynamicMetadata {
    #[doc = " The value of dynamic metadata."]
    pub data: *mut u8,
    #[doc = " The length of dynamic metadata."]
    pub length: u32,
}
#[doc = " @brief Value for HDR_GAINMAP_METADATA.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Pixelmap_HdrGainmapMetadata {
    #[doc = " The version used by the writer."]
    pub writerVersion: u16,
    #[doc = " The minimum version a parser needs to understand."]
    pub miniVersion: u16,
    #[doc = " The number of gain map channels, with a value of 1 or 3."]
    pub gainmapChannelNum: u8,
    #[doc = " Indicate whether to use the color space of the base image."]
    pub useBaseColorFlag: bool,
    #[doc = " The baseline hdr headroom."]
    pub baseHeadroom: f32,
    #[doc = " The alternate hdr headroom."]
    pub alternateHeadroom: f32,
    #[doc = " The per-component max gain map values."]
    pub gainmapMax: [f32; 3usize],
    #[doc = " The per-component min gain map values."]
    pub gainmapMin: [f32; 3usize],
    #[doc = " The per-component gamma values."]
    pub gamma: [f32; 3usize],
    #[doc = " The per-component baseline offset."]
    pub baselineOffset: [f32; 3usize],
    #[doc = " The per-component alternate offset."]
    pub alternateOffset: [f32; 3usize],
}
#[doc = " @brief Value for HDR_METADATA_KEY. Corresponding relationship with HDR_METADATA_KEY.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Pixelmap_HdrMetadataValue {
    #[doc = " The value corresponding to the HDR_METADATA_TYPE key"]
    pub type_: OH_Pixelmap_HdrMetadataType,
    #[doc = " The value corresponding to the HDR_STATIC_METADATA key"]
    pub staticMetadata: OH_Pixelmap_HdrStaticMetadata,
    #[doc = " The value corresponding to the HDR_DYNAMIC_METADATA key"]
    pub dynamicMetadata: OH_Pixelmap_HdrDynamicMetadata,
    #[doc = " The value corresponding to the HDR_GAINMAP_METADATA key"]
    pub gainmapMetadata: OH_Pixelmap_HdrGainmapMetadata,
}
#[doc = " @brief Defines the options used for creating a pixel map.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Pixelmap_InitializationOptions {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Create a for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter is nullptr or\n         create OH_Pixelmap_InitializationOptions object failed.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_Create(
        options: *mut *mut OH_Pixelmap_InitializationOptions,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get width number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param width the number of image width.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or width is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_GetWidth(
        options: *mut OH_Pixelmap_InitializationOptions,
        width: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set width number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param width the number of image width.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_SetWidth(
        options: *mut OH_Pixelmap_InitializationOptions,
        width: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get height number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param height the number of image height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or height is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_GetHeight(
        options: *mut OH_Pixelmap_InitializationOptions,
        height: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set height number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param height the number of image height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_SetHeight(
        options: *mut OH_Pixelmap_InitializationOptions,
        height: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get pixelFormat number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or pixelFormat is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_GetPixelFormat(
        options: *mut OH_Pixelmap_InitializationOptions,
        pixelFormat: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set pixelFormat number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_SetPixelFormat(
        options: *mut OH_Pixelmap_InitializationOptions,
        pixelFormat: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get pixelFormat number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param srcpixelFormat the number of image srcpixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or srcpixelFormat is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_GetSrcPixelFormat(
        options: *mut OH_Pixelmap_InitializationOptions,
        srcpixelFormat: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set pixelFormat number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param srcpixelFormat the number of image srcpixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_SetSrcPixelFormat(
        options: *mut OH_Pixelmap_InitializationOptions,
        srcpixelFormat: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get rowStride for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param rowStride the rowStride of image buffer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if rowStride is null.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error, maybe options is released.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_GetRowStride(
        options: *mut OH_Pixelmap_InitializationOptions,
        rowStride: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set rowStride number for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param rowStride the rowStride of image buffer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if rowStride does not match width.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error, maybe options is released.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_SetRowStride(
        options: *mut OH_Pixelmap_InitializationOptions,
        rowStride: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get alphaType number for InitializationOtions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param alphaType the number of image alphaType.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options or alphaType is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_GetAlphaType(
        options: *mut OH_Pixelmap_InitializationOptions,
        alphaType: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set alphaType number for InitializationOtions struct.\n\n @param options The InitializationOtions pointer will be operated.\n @param alphaType the number of image alphaType.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_SetAlphaType(
        options: *mut OH_Pixelmap_InitializationOptions,
        alphaType: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get editable for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param editable The boolean value representing the editable status.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if options or editable is invalid.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PixelmapInitializationOptions_GetEditable(
        options: *mut OH_Pixelmap_InitializationOptions,
        editable: *mut bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set editable for InitializationOptions struct.\n\n @param options The InitializationOptions pointer will be operated.\n @param editable The boolean value representing the editable status.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if options is invalid.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PixelmapInitializationOptions_SetEditable(
        options: *mut OH_Pixelmap_InitializationOptions,
        editable: bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief delete InitializationOtions pointer.\n\n @param options The InitializationOtions pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null.\n @since 12"]
    pub fn OH_PixelmapInitializationOptions_Release(
        options: *mut OH_Pixelmap_InitializationOptions,
    ) -> Image_ErrorCode;
}
#[doc = " @brief Defines the pixel map information.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Pixelmap_ImageInfo {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Create imageinfo struct  .\n\n @param info The imageinfo pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter is nullptr or\n         create OH_Pixelmap_ImageInfo object failed.\n @since 12"]
    pub fn OH_PixelmapImageInfo_Create(info: *mut *mut OH_Pixelmap_ImageInfo) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get width number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param width The number of imageinfo width.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or width is null.\n @since 12"]
    pub fn OH_PixelmapImageInfo_GetWidth(
        info: *mut OH_Pixelmap_ImageInfo,
        width: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get height number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param height The number of imageinfo height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or height is null.\n @since 12"]
    pub fn OH_PixelmapImageInfo_GetHeight(
        info: *mut OH_Pixelmap_ImageInfo,
        height: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get alphaMode number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param alphaMode The number of imageinfo alphaMode.\n @return Image functions result code.\n     {@link IMAGE_SUCCESS} if the execution is successful.\n     {@link IMAGE_BAD_PARAMETER} info is nullptr, or alphaMode is nullptr.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_PixelmapImageInfo_GetAlphaMode(
        info: *mut OH_Pixelmap_ImageInfo,
        alphaMode: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get rowStride number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param rowStride The number of imageinfo rowStride.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or rowStride is null.\n @since 12"]
    pub fn OH_PixelmapImageInfo_GetRowStride(
        info: *mut OH_Pixelmap_ImageInfo,
        rowStride: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get pixelFormat number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param pixelFormat The number of imageinfo pixelFormat.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or pixelFormat is null.\n @since 12"]
    pub fn OH_PixelmapImageInfo_GetPixelFormat(
        info: *mut OH_Pixelmap_ImageInfo,
        pixelFormat: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get alphaType number for imageinfo struct.\n\n @param info The imageinfo pointer will be operated.\n @param alphaType The number of imageinfo alphaType.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or alphaType is null.\n @since 12"]
    pub fn OH_PixelmapImageInfo_GetAlphaType(
        info: *mut OH_Pixelmap_ImageInfo,
        alphaType: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get isHdr boolean for imageinfo struct.\n\n @param info The imageinfo pointer will be operated. Pointer connot be null.\n @param isHdr Whether the image has a high dynamic range.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info or isHdr is null.\n @since 12"]
    pub fn OH_PixelmapImageInfo_GetDynamicRange(
        info: *mut OH_Pixelmap_ImageInfo,
        isHdr: *mut bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Delete imageinfo struct pointer.\n\n @param info The imageinfo pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if info is null.\n @since 12"]
    pub fn OH_PixelmapImageInfo_Release(info: *mut OH_Pixelmap_ImageInfo) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a <b>PixelMap</b> object.\n\n @param data Color buffer in BGRA_8888 format.\n @param dataLength Color buffer size in BGRA_8888 format.\n @param options IPixel properties, including the alpha type, size, pixel format, and editable.\n @param pixelmap Pixelmap pointer for created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Possible causes:\n         if data or options is null or failed to create pixelmap due to invalid options.\n @since 12"]
    pub fn OH_PixelmapNative_CreatePixelmap(
        data: *mut u8,
        dataLength: usize,
        options: *mut OH_Pixelmap_InitializationOptions,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a pixelmap based on options {@link OH_Pixelmap_InitializationOptions}, the memory type used by the\n pixelmap can be specified by allocatorType {@link IMAGE_ALLOCATOR_MODE}. By default, the system selects the memory\n type based on the image type, image size, platform capability, etc. When processing the pixelmap returned by this\n interface, please always consider the impact of stride.\n\n @param data Input color buffer in BGRA_8888 format by default.\n @param dataLength Length of input buffer in bytes.\n @param options Pixelmap initialization properties including size, pixel format, alpha type, and editable flags.\n @param allocator Indicate which memory type will be used by the returned pixelmap.\n @param pixelmap Output parameter receiving the created pixelmap object pointer.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n         {@link IMAGE_TOO_LARGE} too large data or image.\n         {@link IMAGE_UNSUPPORTED_OPERATION} unsupported operations.\n         {@link IMAGE_DMA_OPERATION_FAILED} DMA operation failed.\n         {@link IMAGE_ALLOCATOR_MODE_UNSUPPORTED} unsupported allocator mode, e.g.,\n         use share memory to create a HDR image as only DMA supported hdr metadata.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_PixelmapNative_CreatePixelmapUsingAllocator(
        data: *mut u8,
        dataLength: usize,
        options: *mut OH_Pixelmap_InitializationOptions,
        allocator: IMAGE_ALLOCATOR_MODE,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Convert a native <b>PixelMap</b> object to <b>PixelMap</b> napi object.\n\n @param env Indicates the NAPI environment pointer.\n @param pixelmapNative Indicates a pointer to the <b>PixelMap</b> object created at the native layer.\n @param pixelmapNapi the <b>PixelMap</b> pointer will be converted.\n @return Image functions result code.\n     {@link IMAGE_SUCCESS} if the execution is successful.\n     {@link IMAGE_BAD_PARAMETER} pixelmapNative is nullptr\n @since 12"]
    pub fn OH_PixelmapNative_ConvertPixelmapNativeToNapi(
        env: napi_env,
        pixelmapNative: *mut OH_PixelmapNative,
        pixelmapNapi: *mut napi_value,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Convert a <b>PixelMap</b> napi object to native <b>PixelMap</b> object.\n\n @param env Indicates the NAPI environment pointer.\n @param pixelmapNapi Indicates napi <b>PixelMap</b> object.\n @param pixelmapNative Indicates native <b>PixelMap</b> pointer to created.\n @return Image functions result code.\n     {@link IMAGE_SUCCESS} if the execution is successful.\n     {@link IMAGE_BAD_PARAMETER} pixelmapNative is nullptr, or pixelmapNapi is not a PixelMap\n @since 12"]
    pub fn OH_PixelmapNative_ConvertPixelmapNativeFromNapi(
        env: napi_env,
        pixelmapNapi: napi_value,
        pixelmapNative: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Reads data of this pixel map to an Buffer. If this pixel map is created in the BGRA_8888 format,\n the data read is the same as the original data.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param destination Buffer to which the image pixel map data will be written.\n @param bufferSize Buffer size to which the image pixel map data will be written.\n @return Function result code:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} Parameter error. Possible causes:\n         1.Parameter is nullptr\n         2.pixelmap's inner pixelmap is nullptr.\n         3.Parameter bufferSize is less than the actual data size.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g.\n         memory copy failed or pixelmap's attributes are incorrect.\n @since 12"]
    pub fn OH_PixelmapNative_ReadPixels(
        pixelmap: *mut OH_PixelmapNative,
        destination: *mut u8,
        bufferSize: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Reads image data in an Buffer and writes the data to a Pixelmap object.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param source Buffer from which the image data will be read.\n @param bufferSize Buffer size from which the image data will be read.\n @return Function result code:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} Parameter error. Possible causes:\n         1.Parameter is nullptr\n         2.pixelmap's inner pixelmap is nullptr.\n         3.Parameter bufferSize is less than the actual data size.\n         {@link IMAGE_UNSUPPORTED_OPERATION} If the pixelmap is not editable.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g.\n         memory copy failed or pixelmap's attributes are incorrect.\n @since 12"]
    pub fn OH_PixelmapNative_WritePixels(
        pixelmap: *mut OH_PixelmapNative,
        source: *mut u8,
        bufferSize: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Reads data from a certain area of the PixelMap to a buffer. The resulting data will be in BGRA_8888 format.\n\n @param pixelmap The PixelMap to be read.\n @param area Area of the PixelMap to read the data. Data will be read and copied into area->pixels.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or area is incorrect.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g. unsupported pixel format.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_ReadPixelsFromArea(
        pixelmap: *mut OH_PixelmapNative,
        area: *mut Image_PositionArea,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Writes data from a buffer to a certain area of the PixelMap. The source data should be in BGRA_8888 format.\n\n @param pixelmap The PixelMap to be written.\n @param area Area of the PixelMap to write the data.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or area is incorrect.\n         {@link IMAGE_UNSUPPORTED_OPERATION} If the PixelMap is not editable.\n         {@link IMAGE_UNKNOWN_ERROR} Internal unknown error, e.g. unsupported pixel format.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_WritePixelsToArea(
        pixelmap: *mut OH_PixelmapNative,
        area: *mut Image_PositionArea,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get argb pixel buffer from pixelmap.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param destination Buffer to which the image pixel map data will be written.\n @param bufferSize Buffer size to which the image pixel map data will be written.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, destination and bufferSize are incorrect.\n         {@link IMAGE_UNSUPPORTED_CONVERSION} If format does not support conversion to argb or conversion failed.\n         {@link IMAGE_ALLOC_FAILED} If device has no memory.\n         {@link IMAGE_COPY_FAILED} If memory copy failed.\n @see OH_PixelmapNative\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PixelmapNative_GetArgbPixels(
        pixelmap: *mut OH_PixelmapNative,
        destination: *mut u8,
        bufferSize: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Convert {@link OH_PixelmapNative} to standard dynamic range.\n\n @param pixelmap The Pixelmap pointer will be operated. Pointer connot be null.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - The operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - Parameter error.Possible causes:Parameter verification failed.\n returns {@link Image_ErrorCode} IMAGE_UNSUPPORTED_OPERATION - Unsupported operation.Pixelmap can't be converted.\n @since 12"]
    pub fn OH_PixelmapNative_ToSdr(pixelmap: *mut OH_PixelmapNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains pixel map information of this image.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param imageInfo Indicates the pointer to the image information.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n         3.imageInfo is nullptr.\n @since 12"]
    pub fn OH_PixelmapNative_GetImageInfo(
        pixelmap: *mut OH_PixelmapNative,
        imageInfo: *mut OH_Pixelmap_ImageInfo,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets opacity of the PixelMap. Every pixel will be set to the same opacity value.\n\n @param pixelmap Pointer of the PixelMap to be modified.\n @param value The target opacity value to be set.\n     The valid range is (0.0, 1.0] where 1.0 is fully opaque and becoming more transparent as it approaches 0.0.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} The PixelMap has been released.\n     {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation because the PixelMap is locked.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter.\n         Possible causes: 1. The rate is out of range. 2. The parameter is null.\n     {@link IMAGE_UNSUPPORTED_DATA_FORMAT} Unsupported data format. Possible cause: Alpha type is not supported.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_SetOpacity(
        pixelmap: *mut OH_PixelmapNative,
        value: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets an opacity rate for this image pixel map.\n     It is recommended to use {@link OH_PixelmapNative_SetOpacity}.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param rate Opacity rate to set. The value ranges from 0 to 1.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
    pub fn OH_PixelmapNative_Opacity(
        pixelmap: *mut OH_PixelmapNative,
        rate: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Scales the PixelMap in the horizontal and/or vertical dimensions.\n\n @param pixelmap Pointer of the PixelMap to be scaled.\n @param scaleX The scale ratio of width.\n @param scaleY The scale ratio of height.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} The PixelMap has been released.\n     {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation because the PixelMap is locked.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter. Possible cause: The parameter is null.\n     {@link IMAGE_ALLOC_FAILED} Failed to allocate memory.\n         Possible causes: 1. The resulting PixelMap size is too large. 2. The system is out of memory.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_ApplyScale(
        pixelmap: *mut OH_PixelmapNative,
        scaleX: f32,
        scaleY: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Scales this image based on the input width and height.\n     It is recommended to use {@link OH_PixelmapNative_ApplyScale}.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
    pub fn OH_PixelmapNative_Scale(
        pixelmap: *mut OH_PixelmapNative,
        scaleX: f32,
        scaleY: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Scales the PixelMap in the horizontal and/or vertical dimensions with anti-aliasing.\n\n @param pixelmap Pointer of the PixelMap to be scaled.\n @param scaleX The scale ratio of width.\n @param scaleY The scale ratio of height.\n @param level The anti-aliasing algorithm to be used.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} The PixelMap has been released.\n     {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation because the PixelMap is locked.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter. Possible cause: The parameter is null.\n     {@link IMAGE_ALLOC_FAILED} Failed to allocate memory.\n         Possible causes: 1. The resulting PixelMap size is too large. 2. The system is out of memory.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_ApplyScaleWithAntiAliasing(
        pixelmap: *mut OH_PixelmapNative,
        scaleX: f32,
        scaleY: f32,
        level: OH_PixelmapNative_AntiAliasingLevel,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Scales this image based on the input width and height with anti-aliasing.\n     It is recommended to use {@link OH_PixelmapNative_ApplyScaleWithAntiAliasing}.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @param level The anti-aliasing algorithm to be used.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, x and y are incorrect.\n returns {@link Image_ErrorCode} IMAGE_TOO_LARGE - if image is too large.\n returns {@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if device has no memory.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error, maybe source pixelmap is released.\n @see OH_PixelmapNative\n @since 12"]
    pub fn OH_PixelmapNative_ScaleWithAntiAliasing(
        pixelmap: *mut OH_PixelmapNative,
        scaleX: f32,
        scaleY: f32,
        level: OH_PixelmapNative_AntiAliasingLevel,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Create a scaled pixelmap based on the source pixelmap and the input width and height.\n\n @param srcPixelmap The source native pixelmap.\n @param dstPixelmap The destination native pixelmap for create.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n @see OH_PixelmapNative\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PixelmapNative_CreateScaledPixelMap(
        srcPixelmap: *mut OH_PixelmapNative,
        dstPixelmap: *mut *mut OH_PixelmapNative,
        scaleX: f32,
        scaleY: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Create a scaled pixelmap based on the source pixelmap and the input width and height with anti-aliasing.\n\n @param srcPixelmap The source native pixelmap.\n @param dstPixelmap The destination native pixelmap for create.\n @param scaleX Scaling ratio of the width.\n @param scaleY Scaling ratio of the height.\n @param level The anti-aliasing algorithm to be used.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n         {@link IMAGE_TOO_LARGE} If image is too large.\n         {@link IMAGE_ALLOC_FAILED} If device has no memory.\n @see OH_PixelmapNative\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PixelmapNative_CreateScaledPixelMapWithAntiAliasing(
        srcPixelmap: *mut OH_PixelmapNative,
        dstPixelmap: *mut *mut OH_PixelmapNative,
        scaleX: f32,
        scaleY: f32,
        level: OH_PixelmapNative_AntiAliasingLevel,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Repositions the PixelMap in the horizontal and/or vertical directions.\n\n @param pixelmap Pointer of the PixelMap to be translated.\n @param x The distance in pixels to move in the horizontal direction.\n @param y The distance in pixels to move in the vertical direction.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} The PixelMap has been released.\n     {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation because the PixelMap is locked.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter. Possible cause: The parameter is null.\n     {@link IMAGE_ALLOC_FAILED} Failed to allocate memory.\n         Possible causes: 1. The resulting PixelMap size is too large. 2. The system is out of memory.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_ApplyTranslate(
        pixelmap: *mut OH_PixelmapNative,
        x: f32,
        y: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Translates this image based on the input coordinates.\n     It is recommended to use {@link OH_PixelmapNative_ApplyTranslate}.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param x The distance to be translate in the X direction.\n @param y The distance to be translate in the Y direction.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
    pub fn OH_PixelmapNative_Translate(
        pixelmap: *mut OH_PixelmapNative,
        x: f32,
        y: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a PixelMap with only alpha channel from the source PixelMap.\n\n @param srcPixelmap The source PixelMap.\n @param dstPixelmap The target PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. srcPixelmap or dstPixelmap is incorrect.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_CreateAlphaPixelmap(
        srcPixelmap: *mut OH_PixelmapNative,
        dstPixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Clones a PixelMap from the source PixelMap.\n\n @param srcPixelmap The source PixelMap to be cloned.\n @param dstPixelmap The target PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. srcPixelmap or dstPixelmap is incorrect.\n         {@link IMAGE_UNSUPPORTED_DATA_FORMAT} If the pixel format is unsupported.\n         {@link IMAGE_TOO_LARGE} If the PixelMap size is too large.\n         {@link IMAGE_INIT_FAILED} If the PixelMap initialization failed.\n         {@link IMAGE_ALLOC_FAILED} If the copying of PixelMap data failed.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_Clone(
        srcPixelmap: *mut OH_PixelmapNative,
        dstPixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a cropped and then scaled PixelMap based on the source PixelMap.\n\n @param srcPixelmap The source PixelMap.\n @param region The crop region.\n @param scale The scale ratio of width and height.\n @param level The anti-aliasing algorithm to be used.\n @param dstPixelmap The target PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. srcPixelmap, region, scale, or dstPixelmap is\n                                     incorrect.\n         {@link IMAGE_UNSUPPORTED_DATA_FORMAT} If the pixel format is unsupported.\n         {@link IMAGE_TOO_LARGE} If the PixelMap size is too large.\n         {@link IMAGE_INIT_FAILED} If the PixelMap initialization failed.\n         {@link IMAGE_ALLOC_FAILED} If the copying of PixelMap data failed.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_CreateCroppedAndScaledPixelMap(
        srcPixelmap: *mut OH_PixelmapNative,
        region: *mut Image_Region,
        scale: *mut Image_Scale,
        level: OH_PixelmapNative_AntiAliasingLevel,
        dstPixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Rotates the PixelMap.\n     Note: YUV format PixelMaps only support rotation angles that are multiples of 90 degrees.\n\n @param pixelmap Pointer of the PixelMap to be rotated.\n @param angle The rotation angle in degrees.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} The PixelMap has been released.\n     {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation because the PixelMap is locked.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter. Possible cause: The parameter is null.\n     {@link IMAGE_ALLOC_FAILED} Failed to allocate memory.\n         Possible causes: 1. The resulting PixelMap size is too large. 2. The system is out of memory.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_ApplyRotate(
        pixelmap: *mut OH_PixelmapNative,
        angle: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Rotates this image based on the input angle.\n     It is recommended to use {@link OH_PixelmapNative_ApplyRotate}.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param angle Angle to rotate.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
    pub fn OH_PixelmapNative_Rotate(
        pixelmap: *mut OH_PixelmapNative,
        angle: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Flips the PixelMap in the horizontal and/or vertical directions.\n\n @param pixelmap Pointer of the PixelMap to be flipped.\n @param shouldFlipHorizontally Whether to flip horizontally.\n @param shouldFlipVertically Whether to flip vertically.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} The PixelMap has been released.\n     {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation because the PixelMap is locked.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter. Possible cause: The parameter is null.\n     {@link IMAGE_ALLOC_FAILED} Failed to allocate memory. Possible cause: The system is out of memory.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_ApplyFlip(
        pixelmap: *mut OH_PixelmapNative,
        shouldFlipHorizontally: bool,
        shouldFlipVertically: bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Flips this image horizontally or vertically, or both.\n     It is recommended to use {@link OH_PixelmapNative_ApplyFlip}.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param shouldFlipHorizontally Whether to flip the image horizontally.\n @param shouldFlipVertically Whether to flip the image vertically.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.pixelmap's inner pixelmap is nullptr.\n @since 12"]
    pub fn OH_PixelmapNative_Flip(
        pixelmap: *mut OH_PixelmapNative,
        shouldFlipHorizontally: bool,
        shouldFlipVertically: bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Crops the PixelMap.\n\n @param pixelmap Pointer of the PixelMap to be cropped.\n @param region Pointer of the region to crop.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} The PixelMap has been released.\n     {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation because the PixelMap is locked.\n     {@link IMAGE_INVALID_REGION} The specified region is invalid or out of range.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter. Possible cause: Any parameter is null.\n     {@link IMAGE_ALLOC_FAILED} Failed to allocate memory.\n         Possible causes: 1. Failed to process pixel data. 2. The system is out of memory.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_ApplyCrop(
        pixelmap: *mut OH_PixelmapNative,
        region: *mut Image_Region,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Crops this image based on the input size.\n     It is recommended to use {@link OH_PixelmapNative_ApplyCrop}.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @param region Area size, read according to area.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - The operation is successful.\n         {@link IMAGE_BAD_PARAMETER}  - Parameter error.Possible causes:\n         1.pixelmap is nullptr.\n         2.region is nullptr.\n         3.pixelmap's inner pixelmap is nullptr.\n @since 12"]
    pub fn OH_PixelmapNative_Crop(
        pixelmap: *mut OH_PixelmapNative,
        region: *mut Image_Region,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases an <b>OH_Pixelmap</b> object.\n\n @param pixelmap The Pixelmap pointer will be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if either:\n         1.Pixelmap is nullptr.\n         2.It's inner pixelmap is nullptr.\n         3.Pixelmap is not allowed to release.\n @since 12"]
    pub fn OH_PixelmapNative_Release(pixelmap: *mut OH_PixelmapNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_PixelmapNative</b> object and deallocates its resources.\n\n @param pixelmap A pointer to the OH_PixelmapNative pointer to destroy.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if pixelmap is null or *pixelmap is null.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PixelmapNative_Destroy(pixelmap: *mut *mut OH_PixelmapNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Converts the alpha type of the PixelMap to either premultiplied or unpremultiplied.\n     The conversion only supports pixel formats that have an alpha channel, except RGBA_F16.\n\n @param srcPixelmap The source PixelMap containing pixel data to be converted.\n @param dstPixelmap An empty destination PixelMap that must have the same properties (width, height,\n     pixel format, etc.) as the source PixelMap, except that its alpha type must be opposite to that of\n     the source (premultiplied vs. unpremultiplied). The converted pixel data will be written into this PixelMap.\n @param toPremul Specifies the conversion direction. If true, converts from unpremultiplied to premultiplied alpha;\n     if false, converts from premultiplied to unpremultiplied alpha.\n @return Function result code:\n     {@link IMAGE_SUCCESS} The operation is successful.\n     {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get image data.\n         Possible cause: Internal data is corrupted. Please check the logs for detailed information.\n     {@link IMAGE_PIXELMAP_RELEASED} Either PixelMap has been released.\n     {@link IMAGE_INVALID_PARAMETER} Invalid parameter.\n         Possible causes: 1. Either PixelMap does not meet the requirements. 2. Any parameter is null.\n     {@link IMAGE_UNSUPPORTED_DATA_FORMAT} Unsupported pixel format for either PixelMap.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PixelmapNative_ConvertAlphaType(
        srcPixelmap: *mut OH_PixelmapNative,
        dstPixelmap: *mut OH_PixelmapNative,
        toPremul: bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Converting images to alpha format\n     It is recommended to use {@link OH_PixelmapNative_ConvertAlphaType}.\n\n @param srcpixelmap The source pixel map pointer will be operated.\n @param dstpixelmap The destination pixel map pointer will be operated.\n @param isPremul Whether it is pre-multiplied, true for prediction, false for non-pre-multiplied.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if either:\n         1.srcpixelmap or dstpixelmap is null pointer.\n         2.Their inner pixelmap structures are unavailable.\n @since 12"]
    pub fn OH_PixelmapNative_ConvertAlphaFormat(
        srcpixelmap: *mut OH_PixelmapNative,
        dstpixelmap: *mut OH_PixelmapNative,
        isPremul: bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Create a empty <b>PixelMap</b> object.\n\n @param options IPixel properties, including the alpha type, size, pixel format, and editable.\n @param pixelmap Pixelmap pointer for created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} - if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} - if options is null or\n         failed to create pixelmap due to invalid options.\n @since 12"]
    pub fn OH_PixelmapNative_CreateEmptyPixelmap(
        options: *mut OH_Pixelmap_InitializationOptions,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a empty pixelmap based on options {@link OH_Pixelmap_InitializationOptions}, the memory type used\n by the pixelmap can be specified by allocatorType {@link IMAGE_ALLOCATOR_MODE}. By default,\n the system selects the memory type based on the image type, image size, platform capability, etc. When processing\n the pixelmap returned by this interface, please always consider the impact of stride.\n\n @param options Pixelmap initialization properties including size, pixel format, alpha type, and editable flags.\n @param allocator Indicate which memory type will be used by the returned pixelmap.\n @param pixelmap Output parameter receiving the created pixelmap object pointer.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid.\n         {@link IMAGE_TOO_LARGE} too large data or image.\n         {@link IMAGE_UNSUPPORTED_OPERATION} unsupported operations.\n         {@link IMAGE_ALLOCATOR_MODE_UNSUPPORTED} unsupported allocator mode, e.g., use\n         share memory to create a HDR image as only DMA supported hdr metadata.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_PixelmapNative_CreateEmptyPixelmapUsingAllocator(
        options: *mut OH_Pixelmap_InitializationOptions,
        allocator: IMAGE_ALLOCATOR_MODE,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a PixelMap from a Surface with the Surface ID.\n\n @param surfaceId The Surface ID.\n @param length Length of the Surface ID.\n @param pixelmap The PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. surfaceId or pixelmap is incorrect.\n         {@link IMAGE_CREATE_PIXELMAP_FAILED} If the PixelMap creation failed.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_CreatePixelmapFromSurface(
        surfaceId: *const ::std::os::raw::c_char,
        length: usize,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a PixelMap object based on the ID of a Surface with transformation.\n\n @param surfaceId ID of the Surface.\n @param length Length of the Surface ID.\n @param transformEnabled Whether to inverse transform the PixelMap to cancel out the transformation from the Surface.\n     If true, the PixelMap will be transformed by the same amount from the Surface but in a reversed direction;\n     if false, the PixelMap will not be transformed.\n @param pixelmap The PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} Operation is successful.\n         {@link IMAGE_INVALID_PARAMETER} Invalid parameter, e.g. surfaceId or pixelmap is incorrect.\n         {@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation, e.g. on cross-platform.\n         {@link IMAGE_GET_IMAGE_DATA_FAILED} Failed to get the data from Surface.\n         {@link IMAGE_CREATE_PIXELMAP_FAILED} Failed to create the PixelMap.\n @see OH_PixelmapNative\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_PixelmapNative_CreatePixelmapFromSurfaceWithTransformation(
        surfaceId: *const ::std::os::raw::c_char,
        length: usize,
        transformEnabled: bool,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates a PixelMap from a native buffer.\n\n @param nativeBuffer The native buffer.\n @param pixelmap The PixelMap to be created.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. nativeBuffer or pixelmap is incorrect.\n         {@link IMAGE_CREATE_PIXELMAP_FAILED} If the PixelMap creation failed.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_CreatePixelmapFromNativeBuffer(
        nativeBuffer: *mut OH_NativeBuffer,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get metadata.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param key Type of metadata.\n @param value Value of metadata.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, key and value are incorrect.\n returns {@link Image_ErrorCode} IMAGE_DMA_NOT_EXIST - if DMA memory does not exist.\n returns {@link Image_ErrorCode} IMAGE_COPY_FAILED - if memory copy failed.\n @see OH_PixelmapNative\n @since 12"]
    pub fn OH_PixelmapNative_GetMetadata(
        pixelmap: *mut OH_PixelmapNative,
        key: OH_Pixelmap_HdrMetadataKey,
        value: *mut *mut OH_Pixelmap_HdrMetadataValue,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set metadata.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param key Type of metadata.\n @param value Value of metadata.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, key and value are incorrect.\n returns {@link Image_ErrorCode} IMAGE_DMA_NOT_EXIST - if DMA memory does not exist.\n returns {@link Image_ErrorCode} IMAGE_COPY_FAILED - if memory copy failed.\n @see OH_PixelmapNative\n @since 12"]
    pub fn OH_PixelmapNative_SetMetadata(
        pixelmap: *mut OH_PixelmapNative,
        key: OH_Pixelmap_HdrMetadataKey,
        value: *mut OH_Pixelmap_HdrMetadataValue,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get the native buffer from the PixelMap.\n\n @param pixelmap The PixelMap to get the native buffer from.\n @param nativeBuffer The native buffer to retrieve.\n @return Returns {@link Image_ErrorCode} IMAGE_RESULT_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, pixelmap or nativeBuffer is null.\n returns {@link Image_ErrorCode} IMAGE_DMA_NOT_EXIST - if DMA memory dose not exist.\n returns {@link Image_ErrorCode} IMAGE_DMA_OPERATION_FAILED - if operations related to DMA memory has failed.\n @see OH_PixelmapNative\n @since 12"]
    pub fn OH_PixelmapNative_GetNativeBuffer(
        pixelmap: *mut OH_PixelmapNative,
        nativeBuffer: *mut *mut OH_NativeBuffer,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get the native colorspace from the PixelMap.\n\n @param pixelmap The native pixelmap to get the native colorspace from.\n @param colorSpaceNative The native colorspace to retrieve.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} The param of pixelmap or colorSpaceNative is nullptr or invalid.\n @see OH_PixelmapNative\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PixelmapNative_GetColorSpaceNative(
        pixelmap: *mut OH_PixelmapNative,
        colorSpaceNative: *mut *mut OH_NativeColorSpaceManager,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set the native colorspace for the PixelMap.\n\n @param pixelmap The native pixelmap to set the native colorspace for.\n @param colorSpaceNative The native colorspace to set.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} The param of pixelmap or colorSpaceNative is nullptr or invalid.\n @see OH_PixelmapNative\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PixelmapNative_SetColorSpaceNative(
        pixelmap: *mut OH_PixelmapNative,
        colorSpaceNative: *mut OH_NativeColorSpaceManager,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set pixelmap memory name.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param name The pointer of name that needs to be set.\n @param size The size of name size that needs to be set.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, name and size are incorrect.\n         {@link IMAGE_UNSUPPORTED_MEMORY_FORMAT} If memory format is unsupported.\n @see OH_PixelmapNative\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PixelmapNative_SetMemoryName(
        pixelmap: *mut OH_PixelmapNative,
        name: *mut ::std::os::raw::c_char,
        size: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get the total number of bytes occupied by all pixels in the Pixelmap, without any padding.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param byteCount The total number of bytes to be retrieved.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid.\n @see OH_PixelmapNative\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PixelmapNative_GetByteCount(
        pixelmap: *mut OH_PixelmapNative,
        byteCount: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get the size of the allocated memory used to store this pixelmap's pixels.\n\n @param pixelmap The Pixelmap pointer to be operated.\n @param allocationByteCount The size of the allocated memory.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or allocationByteCount are invalid.\n @see OH_PixelmapNative\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PixelmapNative_GetAllocationByteCount(
        pixelmap: *mut OH_PixelmapNative,
        allocationByteCount: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the memory address of a PixelMap and locks the memory.\n        When the memory is locked, any operation that modifies or releases the PixelMap will fail and return\n        {@link IMAGE_BAD_PARAMETER}.\n\n @param pixelmap The PixelMap pointer to be operated.\n @param addr The double pointer to the memory address of the PixelMap.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or addr are invalid.\n         {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be locked.\n @see OH_PixelmapNative\n @since 15"]
    #[cfg(feature = "api-15")]
    pub fn OH_PixelmapNative_AccessPixels(
        pixelmap: *mut OH_PixelmapNative,
        addr: *mut *mut ::std::os::raw::c_void,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Unlocks the memory of the PixelMap data.\n        This function is used with {@link OH_PixelmapNative_AccessPixels} in pairs.\n\n @param pixelmap The PixelMap pointer to be operated.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap is invalid.\n         {@link IMAGE_LOCK_UNLOCK_FAILED} If memory failed to be unlocked.\n @see OH_PixelmapNative\n @since 15"]
    #[cfg(feature = "api-15")]
    pub fn OH_PixelmapNative_UnaccessPixels(pixelmap: *mut OH_PixelmapNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the unique ID of a PixelMap.\n\n @param pixelmap The PixelMap to retrieve the unique ID.\n @param uniqueId The resulting unique ID.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or uniqueId is incorrect.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_GetUniqueId(
        pixelmap: *mut OH_PixelmapNative,
        uniqueId: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks whether the PixelMap has been released.\n\n @param pixelmap The PixelMap to check.\n @param released The resulting release status.\n @return Function result code:\n         {@link IMAGE_SUCCESS} If the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} If any parameter is invalid, e.g. pixelmap or released is incorrect.\n @see OH_PixelmapNative\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_PixelmapNative_IsReleased(
        pixelmap: *mut OH_PixelmapNative,
        released: *mut bool,
    ) -> Image_ErrorCode;
}
#[doc = " @brief The struct is used to perform operations related to the picture.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PictureNative {
    _unused: [u8; 0],
}
#[doc = " @brief The struct describes the auxiliary picture, which is used to perform operations related to the auxiliary\n picture.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_AuxiliaryPictureNative {
    _unused: [u8; 0],
}
#[doc = " @brief The struct describes the auxiliary picture information, which is used to perform operations related to the\n auxiliary picture information.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_AuxiliaryPictureInfo {
    _unused: [u8; 0],
}
#[doc = " Gainmap"]
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_GAINMAP: Image_AuxiliaryPictureType = 1;
#[doc = " Depth map"]
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_DEPTH_MAP: Image_AuxiliaryPictureType =
    2;
#[doc = " Unrefocus map"]
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_UNREFOCUS_MAP:
    Image_AuxiliaryPictureType = 3;
#[doc = " Linear map"]
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_LINEAR_MAP: Image_AuxiliaryPictureType =
    4;
#[doc = " Fragment map"]
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_FRAGMENT_MAP:
    Image_AuxiliaryPictureType = 5;
#[doc = " @brief Type of the auxiliary picture.\n\n @since 13"]
#[cfg(feature = "api-13")]
pub type Image_AuxiliaryPictureType = u32;
#[cfg(feature = "api-23")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ComposeOptions {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Creates an **OH_ComposeOptions** instance.\n\n @param options Pointer to **OH_ComposeOptions**.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ComposeOptions_Create(options: *mut *mut OH_ComposeOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the pixel format in **OH_ComposeOptions**.\n\n @param options Pointer to **OH_ComposeOptions**.\n @param desiredPixelFormat Pixel format. The RGBA_1010102, YCBCR_P010, and YCRCB_P010 formats are supported.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredPixelFormat is not supported.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ComposeOptions_SetDesiredPixelFormat(
        options: *mut OH_ComposeOptions,
        desiredPixelFormat: PIXEL_FORMAT,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pixel format in **OH_ComposeOptions**.\n\n @param options Pointer to **OH_ComposeOptions**.\n @param desiredPixelFormat Pixel format in the composition options.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr,or desiredPixelFormat is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ComposeOptions_GetDesiredPixelFormat(
        options: *mut OH_ComposeOptions,
        desiredPixelFormat: *mut PIXEL_FORMAT,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to **OH_ComposeOptions**.\n\n @param options Pointer to **OH_ComposeOptions**.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ComposeOptions_Release(options: *mut OH_ComposeOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_PictureNative object.\n\n @param mainPixelmap Pointer to the OH_PixelmapNative object of the main picture.\n @param picture Double pointer to the OH_PictureNative object created.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} mainPixelmap is nullptr, or picture is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_CreatePicture(
        mainPixelmap: *mut OH_PixelmapNative,
        picture: *mut *mut OH_PictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pointer to the OH_PixelmapNative object of a main picture.\n\n @param picture Pointer to an OH_PictureNative object.\n @param mainPixelmap Double pointer to the OH_PixelmapNative object obtained.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or mainPixelmap is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_GetMainPixelmap(
        picture: *mut OH_PictureNative,
        mainPixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pointer to the OH_PixelmapNative object of an HDR picture.\n\n @param picture Pointer to an OH_PictureNative object.\n @param hdrPixelmap Double pointer to the OH_PixelmapNative object of the HDR picture.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or hdrPixelmap is nullptr.\n     <br>{@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation, e.g. the picture does not has a gainmap.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_GetHdrComposedPixelmap(
        picture: *mut OH_PictureNative,
        hdrPixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pointer to **OH_PixelmapNative** of an HDR picture based on **OH_ComposeOptions**.\n\n @param picture Pointer to an OH_PictureNative object.\n @param options Pointer to **OH_ComposeOptions**.\n @param hdrPixelmap Pointer to **OH_PixelmapNative** of the obtained HDR picture.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or hdrPixelmap is nullptr.\n     <br>{@link IMAGE_UNSUPPORTED_OPERATION} Unsupported operation, e.g. the picture does not has a gainmap.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_PictureNative_GetHdrComposedPixelmapWithOptions(
        picture: *mut OH_PictureNative,
        options: *mut OH_ComposeOptions,
        hdrPixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pointer to the OH_PixelmapNative object of a gain map.\n\n @param picture Pointer to an OH_PictureNative object.\n @param gainmapPixelmap Double pointer to the OH_PixelmapNative object of the gain map.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or gainmapPixelmap is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_GetGainmapPixelmap(
        picture: *mut OH_PictureNative,
        gainmapPixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets an auxiliary picture.\n\n @param picture Pointer to an OH_PictureNative object.\n @param type Type of the auxiliary picture.\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or auxiliaryPicture is nullptr, or the type is invalid.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_SetAuxiliaryPicture(
        picture: *mut OH_PictureNative,
        type_: Image_AuxiliaryPictureType,
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains an auxiliary picture by type.\n\n @param picture Pointer to an OH_PictureNative object.\n @param type Type of the auxiliary picture.\n @param auxiliaryPicture Double pointer to the OH_AuxiliaryPictureNative object obtained.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or auxiliaryPicture is nullptr, or the type is invalid.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_GetAuxiliaryPicture(
        picture: *mut OH_PictureNative,
        type_: Image_AuxiliaryPictureType,
        auxiliaryPicture: *mut *mut OH_AuxiliaryPictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the metadata of a main picture.\n\n @param picture Pointer to an OH_PictureNative object.\n @param metadataType Metadata type.\n @param metadata Double pointer to the metadata.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or metadata is nullptr.\n     <br>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_GetMetadata(
        picture: *mut OH_PictureNative,
        metadataType: Image_MetadataType,
        metadata: *mut *mut OH_PictureMetadata,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the metadata for a main picture.\n\n @param picture Pointer to an OH_PictureNative object.\n @param metadataType Metadata type.\n @param metadata Pointer to the metadata.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr, or metadata is nullptr.\n     <br>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_SetMetadata(
        picture: *mut OH_PictureNative,
        metadataType: Image_MetadataType,
        metadata: *mut OH_PictureMetadata,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the number of auxiliary pictures in a Picture object.\n\n @param picture Pointer to an OH_PictureNative object.\n @param count Pointer to the number of auxiliary pictures.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} picture or count is nullptr, or fail to get the picture.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureNative_GetAuxiliaryPictureCount(
        picture: *mut OH_PictureNative,
        count: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the types of auxiliary pictures in a Picture object.\n\n @param picture Pointer to an OH_PictureNative object.\n @param auxiliaryPictureTypes Pointer to the array that receives the auxiliary picture types.\n @param count On input, the size of auxiliaryPictureTypes array.\n              On output, the actual number of auxiliary pictures.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} picture, auxiliaryPictureTypes, or count is nullptr,\n         or fail to get the picture, or count is smaller than required.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureNative_GetAuxiliaryPictureTypes(
        picture: *mut OH_PictureNative,
        auxiliaryPictureTypes: *mut Image_AuxiliaryPictureType,
        count: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the number of metadata entries in a Picture object.\n\n @param picture Pointer to an OH_PictureNative object.\n @param count Pointer to the number of metadata entries.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} picture or count is nullptr, or fail to get the picture.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureNative_GetMetadataCount(
        picture: *mut OH_PictureNative,
        count: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the types of metadata in a Picture object.\n\n @param picture Pointer to an OH_PictureNative object.\n @param metadataTypes Pointer to the array that receives the metadata types.\n @param count On input, the size of metadataTypes array.\n              On output, the actual number of metadata entries.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} picture, metadataTypes, or count is nullptr,\n         or fail to get the picture, or count is smaller than required.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureNative_GetMetadataTypes(
        picture: *mut OH_PictureNative,
        metadataTypes: *mut Image_MetadataType,
        count: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Removes an auxiliary picture from a Picture object.\n\n @param picture Pointer to an OH_PictureNative object.\n @param type Type of the auxiliary picture to remove.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the auxiliary picture was successfully removed or did not exist.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} picture is nullptr, or fail to get the picture,\n         or the type is invalid.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureNative_RemoveAuxiliaryPicture(
        picture: *mut OH_PictureNative,
        type_: Image_AuxiliaryPictureType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Removes metadata from a Picture object.\n\n @param picture Pointer to an OH_PictureNative object.\n @param type Type of the metadata to remove.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the metadata was successfully removed or did not exist.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} picture is nullptr, or fail to get the picture.</li>\n         <li>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type.</li>\n         </ul>\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureNative_RemoveMetadata(
        picture: *mut OH_PictureNative,
        type_: Image_MetadataType,
    ) -> Image_ErrorCode;
}
#[doc = " @brief This structure is used to specify an auxiliary picture copy rule when creating a deep copy of a\n PictureNative object. It describes how to copy an auxiliary picture from one type to another.\n\n @since 26.0.0"]
#[cfg(feature = "api-26")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PictureNative_AuxiliaryPictureCopyItem {
    #[doc = " @brief Source auxiliary picture type. It specifies the type of auxiliary picture to be copied from the\n source picture.\n\n @since 26.0.0"]
    pub srcType: Image_AuxiliaryPictureType,
    #[doc = " @brief Destination auxiliary picture type. It specifies the type under which the copied auxiliary picture\n will be stored in the destination picture.\n\n @since 26.0.0"]
    pub dstType: Image_AuxiliaryPictureType,
}
#[doc = " @brief This structure is used to specify a metadata copy rule when creating a deep copy of a PictureNative object.\n It describes how to copy metadata from one type to another.\n\n @since 26.0.0"]
#[cfg(feature = "api-26")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PictureNative_MetadataCopyItem {
    #[doc = " @brief Source metadata type. It specifies the type of metadata to be copied from the source picture.\n\n @since 26.0.0"]
    pub srcType: Image_MetadataType,
    #[doc = " @brief Destination metadata type. It specifies the type under which the copied metadata will be stored in the\n destination picture.\n\n @since 26.0.0"]
    pub dstType: Image_MetadataType,
}
extern "C" {
    #[doc = " @brief Creates a deep copy of a PictureNative object with specified auxiliary pictures and metadata copied to\n specified destination types.\n\n @param source The source PictureNative object to be copied. Must not be NULL.\n @param auxiliaryPictureCopyItems An array describing the auxiliary pictures to copy,\n        including source and destination auxiliary picture types. Can be NULL if\n        auxiliaryPictureCopyCount is 0.\n @param auxiliaryPictureCopyCount The number of items in auxiliaryPictureCopyItems.\n @param metadataCopyItems An array describing the metadata entries to copy,\n        including source and destination metadata types. Can be NULL if\n        metadataCopyCount is 0.\n @param metadataCopyCount The number of items in metadataCopyItems.\n @param sourceAuxPictureAsMainPixelMap Specifies an auxiliary picture type in the source\n        picture to be used as the main pixel map in the copied picture. Can be NULL if\n        the original main pixel map should be used.\n @param picture Output parameter used to receive the newly created PictureNative object.\n        The caller is responsible for releasing it when it is no longer needed.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} if source or picture is nullptr, or counts mismatch,\n         or fail to get the source picture, or Count is not zero but corresponding array is nullptr.</li>\n         <li>{@link IMAGE_ALLOC_FAILED} memory allocation failed.</li>\n         </ul>\n @release picture_native/OH_PictureNative_Release {picture}\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_PictureNative_DeepCopyWithItems(
        source: *mut OH_PictureNative,
        auxiliaryPictureCopyItems: *const OH_PictureNative_AuxiliaryPictureCopyItem,
        auxiliaryPictureCopyCount: u32,
        metadataCopyItems: *const OH_PictureNative_MetadataCopyItem,
        metadataCopyCount: u32,
        sourceAuxPictureAsMainPixelMap: *mut Image_AuxiliaryPictureType,
        picture: *mut *mut OH_PictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_PictureNative object.\n\n @param picture Pointer to an OH_PictureNative object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureNative_Release(picture: *mut OH_PictureNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_AuxiliaryPictureNative object. This API supports only continuous pixel data\n whose {@link pixel format} is BGRA_8888 and creates an auxiliary picture in RGBA_8888 format.\n\n @param data Pointer to the image data.\n @param dataLength Length of the image data.\n @param size Pointer to the size of the auxiliary picture.\n @param type Type of the auxiliary picture.\n @param auxiliaryPicture Double pointer to the OH_AuxiliaryPictureNative object created.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} data is nullptr, or dataLength is invalid, or size is nullptr, or the type\n         is invalid, or auxiliaryPicture is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_Create(
        data: *mut u8,
        dataLength: usize,
        size: *mut Image_Size,
        type_: Image_AuxiliaryPictureType,
        auxiliaryPicture: *mut *mut OH_AuxiliaryPictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Reads pixels in the buffer and writes the result to an auxiliary picture.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param source Pixels to be written.\n @param bufferSize Buffer size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or source is nullptr, or the bufferSize is invalid.\n     <br>{@link IMAGE_ALLOC_FAILED} memory alloc failed.\n     <br>{@link IMAGE_COPY_FAILED} memory copy failed.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_WritePixels(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        source: *mut u8,
        bufferSize: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Reads pixels of an auxiliary picture and writes the result to the buffer.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param destination Pointer to the buffer to which the pixels of the auxiliary data will be written.\n @param bufferSize Pointer to the buffer size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or destination is nullptr,\n         or the bufferSize is invalid.\n     <br>{@link IMAGE_ALLOC_FAILED} memory alloc failed.\n     <br>{@link IMAGE_COPY_FAILED} memory copy failed.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_ReadPixels(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        destination: *mut u8,
        bufferSize: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the type of an auxiliary picture.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param type Pointer to the auxiliary picture type.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or type is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_GetType(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        type_: *mut Image_AuxiliaryPictureType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the information of an auxiliary picture.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param info Double pointer to the auxiliary picture information.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or info is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_GetInfo(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        info: *mut *mut OH_AuxiliaryPictureInfo,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the information for an auxiliary picture.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param info Pointer to the auxiliary picture information.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or info is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_SetInfo(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        info: *mut OH_AuxiliaryPictureInfo,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the metadata of an auxiliary picture.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param metadataType Metadata type.\n @param metadata Double pointer to the metadata.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or metadata is nullptr.\n     <br>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_GetMetadata(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        metadataType: Image_MetadataType,
        metadata: *mut *mut OH_PictureMetadata,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the metadata for an auxiliary picture.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param metadataType Metadata type.\n @param metadata Pointer to the metadata.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or metadata is nullptr.\n     <br>{@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_SetMetadata(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        metadataType: Image_MetadataType,
        metadata: *mut OH_PictureMetadata,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the OH_PixelmapNative object of an auxiliary picture.\n\n @param auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.\n @param pixelmap Double pointer to the OH_PixelmapNative object obtained.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_INVALID_PARAMETER} auxiliaryPicture is nullptr, or pixelmap is nullptr.</li>\n         <li>{@link IMAGE_GET_IMAGE_DATA_FAILED} fail to get the auxiliary picture or its pixelmap content.</li>\n         <li>{@link IMAGE_ALLOC_FAILED} memory allocation failed.</li>\n         </ul>\n @release pixelmap_native/OH_PixelmapNative_Destroy {pixelmap}\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_AuxiliaryPictureNative_AcquirePixelmap(
        auxiliaryPicture: *mut OH_AuxiliaryPictureNative,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_AuxiliaryPictureNative object.\n\n @param picture Pointer to an OH_AuxiliaryPictureNative object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} picture is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureNative_Release(
        picture: *mut OH_AuxiliaryPictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an OH_AuxiliaryPictureInfo object.\n\n @param info Double pointer to the OH_AuxiliaryPictureInfo object created.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_Create(
        info: *mut *mut OH_AuxiliaryPictureInfo,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the auxiliary picture type in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param type Pointer to the type of the auxiliary picture.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or type is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_GetType(
        info: *mut OH_AuxiliaryPictureInfo,
        type_: *mut Image_AuxiliaryPictureType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the auxiliary picture type in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param type Type of the auxiliary picture.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or type is invalid.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_SetType(
        info: *mut OH_AuxiliaryPictureInfo,
        type_: Image_AuxiliaryPictureType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image size in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param size Pointer to the size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or size is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_GetSize(
        info: *mut OH_AuxiliaryPictureInfo,
        size: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the image size in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param size Pointer to the size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or size is nullptr.\n\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_SetSize(
        info: *mut OH_AuxiliaryPictureInfo,
        size: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the row stride in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param rowStride Pointer to the row stride, which is the number of bytes from one row of pixels in memory to the\n next row of pixels in memory.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or rowStride is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_GetRowStride(
        info: *mut OH_AuxiliaryPictureInfo,
        rowStride: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the row stride in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param rowStride Row stride, which is the number of bytes from one row of pixels in memory to the next row of pixels\n in memory.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or rowStride is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_SetRowStride(
        info: *mut OH_AuxiliaryPictureInfo,
        rowStride: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pixel format in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param pixelFormat Pointer to the pixel format obtained.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or pixelFormat is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_GetPixelFormat(
        info: *mut OH_AuxiliaryPictureInfo,
        pixelFormat: *mut PIXEL_FORMAT,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the pixel format in **OH_AuxiliaryPictureInfo**.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @param pixelFormat Pixel format.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_SetPixelFormat(
        info: *mut OH_AuxiliaryPictureInfo,
        pixelFormat: PIXEL_FORMAT,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_AuxiliaryPictureInfo object.\n\n @param info Pointer to the OH_AuxiliaryPictureInfo object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_AuxiliaryPictureInfo_Release(info: *mut OH_AuxiliaryPictureInfo) -> Image_ErrorCode;
}
#[doc = " @brief The struct describes the image source, which is encapsulated at the native layer and is used to create image\n data. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and\n operate the fields in the struct.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageSourceNative {
    _unused: [u8; 0],
}
#[doc = " @brief The OH_ImageSource_Info struct describes the image source information encapsulated at the native layer. The\n struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate\n the fields in the struct.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageSource_Info {
    _unused: [u8; 0],
}
#[doc = " @brief The struct describes the decoding options for pictures. It is obtained by calling\n {@link OH_DecodingOptionsForPicture_Create}.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_DecodingOptionsForPicture {
    _unused: [u8; 0],
}
#[doc = " The system determines which memory to use to create the PixelMap."]
#[cfg(feature = "api-15")]
pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_AUTO: IMAGE_ALLOCATOR_TYPE = 0;
#[doc = " Use DMA buffer to create the PixelMap."]
#[cfg(feature = "api-15")]
pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_DMA: IMAGE_ALLOCATOR_TYPE = 1;
#[doc = " Use share memory to create the PixelMap."]
#[cfg(feature = "api-15")]
pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_SHARE_MEMORY: IMAGE_ALLOCATOR_TYPE = 2;
#[doc = " @brief Enumerates the types of allocators used to allocate PixelMap memory.\n\n @since 15"]
#[cfg(feature = "api-15")]
pub type IMAGE_ALLOCATOR_TYPE = u32;
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_ImageSource_Info object.\n\n @param info Double pointer to the OH_ImageSource_Info object created.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_BAD_PARAMETER} info is nullptr.</li>\n         </ul>\n @release image_source_native/OH_ImageSourceInfo_Release {info}\n @since 12"]
    pub fn OH_ImageSourceInfo_Create(info: *mut *mut OH_ImageSource_Info) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image width.\n\n @param info Pointer to an OH_ImageSource_Info object.\n @param width Pointer to the image width, in px.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or width is nullptr.\n @since 12"]
    pub fn OH_ImageSourceInfo_GetWidth(
        info: *mut OH_ImageSource_Info,
        width: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image height.\n\n @param info Pointer to an OH_ImageSource_Info object.\n @param height Pointer to the image height, in px.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or height is nullptr.\n @since 12"]
    pub fn OH_ImageSourceInfo_GetHeight(
        info: *mut OH_ImageSource_Info,
        height: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the dynamic range of an image.\n\n @param info Pointer to an OH_ImageSource_Info object.\n @param isHdr Pointer to a Boolean that specifies whether the HDR is used.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr, or isHdr is nullptr.\n @since 12"]
    pub fn OH_ImageSourceInfo_GetDynamicRange(
        info: *mut OH_ImageSource_Info,
        isHdr: *mut bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the MIME type of an image source.\n\n @param info Pointer to the OH_ImageSource_Info struct.\n @param mimetype Pointer to the MIME type of the image source.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} info is nullptr, or mimeType is nullptr.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImageSourceInfo_GetMimeType(
        info: *mut OH_ImageSource_Info,
        mimetype: *mut Image_MimeType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_ImageSource_Info object.\n\n @param info Pointer to an OH_ImageSource_Info object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 12"]
    pub fn OH_ImageSourceInfo_Release(info: *mut OH_ImageSource_Info) -> Image_ErrorCode;
}
#[doc = " @brief The OH_DecodingOptions struct describes the decoding options encapsulated at the native layer. The struct is\n used to set decoding options and is passed in as an input parameter for creating a PixelMap. For details, see\n {@link OH_ImageSourceNative_CreatePixelmap}.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_DecodingOptions {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_DecodingOptions object.\n\n @param  options Double pointer to the OH_DecodingOptions object created.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_BAD_PARAMETER} options is nullptr.</li>\n         </ul>\n @release image_source_native/OH_DecodingOptions_Release {options}\n @since 12"]
    pub fn OH_DecodingOptions_Create(options: *mut *mut OH_DecodingOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the pixel format.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param pixelFormat Pointer to the pixel format. For details about the available options, see {@link PIXEL_FORMAT}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or pixelFormat is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_GetPixelFormat(
        options: *mut OH_DecodingOptions,
        pixelFormat: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the pixel format.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param pixelFormat Pixel format. For details about the available options, see {@link PIXEL_FORMAT}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_SetPixelFormat(
        options: *mut OH_DecodingOptions,
        pixelFormat: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the index of an image.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param index Pointer to the index of the image.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or index is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_GetIndex(
        options: *mut OH_DecodingOptions,
        index: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the index for an image.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param index Index of the image.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_SetIndex(
        options: *mut OH_DecodingOptions,
        index: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the rotation degree.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param rotate Pointer to the angle to rotate, in degrees.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or rotate is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_GetRotate(
        options: *mut OH_DecodingOptions,
        rotate: *mut f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the rotation angle.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param rotate Angle to rotate, in degrees.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_SetRotate(
        options: *mut OH_DecodingOptions,
        rotate: f32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the desired output size.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param desiredSize Pointer to the desired output size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredSize is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_GetDesiredSize(
        options: *mut OH_DecodingOptions,
        desiredSize: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the desired output size.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param desiredSize Pointer to the desired output size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredSize is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_SetDesiredSize(
        options: *mut OH_DecodingOptions,
        desiredSize: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the region to decode.\n Since the corresponding **SetDesiredRegion** function cannot meet the regional decoding requirements, starting from\n API version 19, you are advised to use {@link OH_DecodingOptions_GetCropRegion} instead.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param desiredRegion Pointer to the region to decode.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredRegion is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_GetDesiredRegion(
        options: *mut OH_DecodingOptions,
        desiredRegion: *mut Image_Region,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the region to decode.\n The actual decoding will process the entire original image, without any regional decoding effect. Starting from API\n version 19, you are advised to use {@link OH_DecodingOptions_SetCropRegion} instead.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @param desiredRegion Pointer to the region to decode.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options or desiredRegion is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_SetDesiredRegion(
        options: *mut OH_DecodingOptions,
        desiredRegion: *mut Image_Region,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the desired dynamic range configured during decoding.\n\n @param options Pointer to an OH_DecodingOptions object.\n @param desiredDynamicRange Pointer to the desired dynamic range. For details about the available options, see\n {@link IMAGE_DYNAMIC_RANGE}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredDynamicRange is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_GetDesiredDynamicRange(
        options: *mut OH_DecodingOptions,
        desiredDynamicRange: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the desired dynamic range during decoding.\n\n @param options Pointer to an OH_DecodingOptions object.\n @param desiredDynamicRange Desired dynamic range. For details about the available options, see\n {@link IMAGE_DYNAMIC_RANGE}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_DecodingOptions_SetDesiredDynamicRange(
        options: *mut OH_DecodingOptions,
        desiredDynamicRange: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the cropping and scaling strategy used during decoding.\n\n @param options Pointer to an OH_DecodingOptions object.\n @param cropAndScaleStrategy Pointer to the cropping and scaling strategy that is executed when **desiredSize** and\n     **desiredRegion** are both specified.\n @return {@link IMAGE_SUCCESS}: The execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}: options or cropAndScaleStrategy is a null pointer.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_DecodingOptions_GetCropAndScaleStrategy(
        options: *mut OH_DecodingOptions,
        cropAndScaleStrategy: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the cropping and scaling strategy used during decoding.\n\n @param options Pointer to an OH_DecodingOptions object.\n @param cropAndScaleStrategy Cropping and scaling strategy that is executed when **desiredSize** and **desiredRegion**\n are both specified.\n @return {@link IMAGE_SUCCESS} The execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is a null pointer or cropAndScaleStrategy is not in the range of Image_CropAndScaleStrategy.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_DecodingOptions_SetCropAndScaleStrategy(
        options: *mut OH_DecodingOptions,
        cropAndScaleStrategy: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the desired color space for the decoding options.\n\n @param options Pointer to the decoding options.\n @param colorSpace Color space. For details, see {@link ColorSpaceName}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if options is a null pointer or colorSpace is not supported.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_DecodingOptions_SetDesiredColorSpace(
        options: *mut OH_DecodingOptions,
        colorSpace: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the color space set in the decoding options.\n\n @param options Pointer to the decoding options.\n @param colorSpace Pointer to the color space. For details, see {@link ColorSpaceName}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if options or colorSpace is null pointer.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_DecodingOptions_GetDesiredColorSpace(
        options: *mut OH_DecodingOptions,
        colorSpace: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the cropping region in the decoding options.\n\n @param options Pointer to the decoding options.\n @param cropRegion Pointer to the cropping region.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer.\n @since 19"]
    #[cfg(feature = "api-19")]
    pub fn OH_DecodingOptions_SetCropRegion(
        options: *mut OH_DecodingOptions,
        cropRegion: *mut Image_Region,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the cropping region in the decoding options.\n\n @param options Pointer to the decoding options.\n @param cropRegion Pointer to the cropping region.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer.\n @since 19"]
    #[cfg(feature = "api-19")]
    pub fn OH_DecodingOptions_GetCropRegion(
        options: *mut OH_DecodingOptions,
        cropRegion: *mut Image_Region,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_DecodingOptions object.\n\n @param  options Pointer to an OH_DecodingOptions object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} if options is a null pointer.\n @since 12"]
    pub fn OH_DecodingOptions_Release(options: *mut OH_DecodingOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_ImageSourceNative object based on a URI.\n\n @param uri Pointer to the URI of the image source. Only file URIs or Base64 URIs are accepted. Currently, only\n     absolute paths are supported.\n @param uriSize URI length.\n @param res Double pointer to the OH_ImageSourceNative object created at the C++ local layer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} if uri is a null pointer.\n @since 12"]
    pub fn OH_ImageSourceNative_CreateFromUri(
        uri: *mut ::std::os::raw::c_char,
        uriSize: usize,
        res: *mut *mut OH_ImageSourceNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_ImageSourceNative object based on a file descriptor.\n\n @param fd File descriptor.\n @param res Double pointer to the OH_ImageSourceNative object created at the C++ local layer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} if fd is invalid.\n @since 12"]
    pub fn OH_ImageSourceNative_CreateFromFd(
        fd: i32,
        res: *mut *mut OH_ImageSourceNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_ImageSourceNative object based on buffer data.\n The buffer data must be undecoded. Do not pass the pixel buffer data such as RBGA and YUV. If you want to create a\n PixelMap based on the pixel buffer data, call {@link OH_PixelmapNative_CreatePixelmap}.\n\n @param data Pointer to the buffer data.\n @param dataSize Size of the buffer.\n @param res Double pointer to the OH_ImageSourceNative object created at the C++ local layer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} if data is a null pointer or if dataSize is 0.\n @since 12"]
    pub fn OH_ImageSourceNative_CreateFromData(
        data: *mut u8,
        dataSize: usize,
        res: *mut *mut OH_ImageSourceNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an image source from data buffer. The data buffer is directly accessed by the image source object,\n and therefore the data buffer must remain accessible within the lifecycle of the image source object.\n\n @param data Pointer to the data buffer.\n @param datalength Size of the data buffer.\n @param imageSource Double pointer to the image source.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if data or imageSource is a null pointer or if datalength is 0.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImageSourceNative_CreateFromDataWithUserBuffer(
        data: *mut u8,
        datalength: usize,
        imageSource: *mut *mut OH_ImageSourceNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_ImageSourceNative object by using the raw file descriptor of an image resource\n file.\n\n @param rawFile Pointer to the file descriptor of the raw file.\n @param res Double pointer to the OH_ImageSourceNative object created at the C++ local layer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} if rawFile is a null pointer.\n @since 12"]
    pub fn OH_ImageSourceNative_CreateFromRawFile(
        rawFile: *mut RawFileDescriptor,
        res: *mut *mut OH_ImageSourceNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_PixelmapNative object based on decoding options.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param  options Pointer to the decoding options.\n @param pixelmap Double pointer to the OH_PixelmapNative object created at the C++ local layer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS} unsupported options,\n         e.g, cannot convert image into desired pixel format.\n @since 12"]
    pub fn OH_ImageSourceNative_CreatePixelmap(
        source: *mut OH_ImageSourceNative,
        options: *mut OH_DecodingOptions,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an OH_PixelmapNative object based on decoding options and memory type, where **allocatorType**\n specifies the memory type of the PixelMap.\n By default, the system selects an appropriate memory type based on the image type, image size, and platform\n capability. When processing the returned PixelMap object, consider the impact of stride.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param options Pointer to the decoding options.\n @param allocator Memory type used by the returned PixelMap.\n @param pixelmap Double pointer to the OH_PixelmapNative object created at the C++ local layer.\n @return Result code.\n @since 15"]
    #[cfg(feature = "api-15")]
    pub fn OH_ImageSourceNative_CreatePixelmapUsingAllocator(
        source: *mut OH_ImageSourceNative,
        options: *mut OH_DecodingOptions,
        allocator: IMAGE_ALLOCATOR_TYPE,
        pixelmap: *mut *mut OH_PixelmapNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an array of OH_PixelmapNative objects based on decoding options.\n This function decodes all frames at once. If the number of frames is high or the size of individual frames is large,\n it can lead to significant memory usage. In these cases, you are advised to use the **Image** component for\n displaying animations. The **Image** component decodes frames one by one, which uses less memory than this function.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param  options Pointer to the decoding options.\n @param resVecPixMap Indicates a pointer array to the <b>Pixelmap</b> objects obtained at the C++ native layer.\n It cannot be a null pointer.\n @param size Size of the array. You can use {@link OH_ImageSourceNative_GetFrameCount} to obtain the size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr, or options is nullptr, or resVecPixMap is nullptr.\n @since 12"]
    pub fn OH_ImageSourceNative_CreatePixelmapList(
        source: *mut OH_ImageSourceNative,
        options: *mut OH_DecodingOptions,
        resVecPixMap: *mut *mut OH_PixelmapNative,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_PictureNative object based on decoding options.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param options Pointer to the decoding options.\n @param picture Double pointer to the OH_PictureNative object created at the C++ local layer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr, or picture is nullptr.\n     <br>{@link IMAGE_DECODE_FAILED} decode failed.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_ImageSourceNative_CreatePicture(
        source: *mut OH_ImageSourceNative,
        options: *mut OH_DecodingOptionsForPicture,
        picture: *mut *mut OH_PictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_PictureNative object at the specified index.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param index Index of the image.\n @param picture Double pointer to the OH_PictureNative object created at the C++ local layer.\n @return {@link IMAGE_SUCCESS}: The execution is successful.\n     <br>{@link IMAGE_BAD_SOURCE}: The data source is abnormal.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIMETYPE}: The image format is unsupported.\n     <br>{@link IMAGE_SOURCE_TOO_LARGE}: The image is too large.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS}: The operation is not supported, for example, invalid index.\n     <br>{@link IMAGE_DECODE_FAILED}: Decoding fails.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImageSourceNative_CreatePictureAtIndex(
        source: *mut OH_ImageSourceNative,
        index: u32,
        picture: *mut *mut OH_PictureNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image delay time list.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param delayTimeList Pointer to the delay time list obtained. It cannot be a null pointer.\n @param size Size of the delay time list. You can use {@link OH_ImageSourceNative_GetFrameCount} to obtain the size.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr, or delayTimeList is nullptr.\n @since 12"]
    pub fn OH_ImageSourceNative_GetDelayTimeList(
        source: *mut OH_ImageSourceNative,
        delayTimeList: *mut i32,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the information about an image with a given index.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param index Index of an image. For a GIF image, the value range is [0, N-1], where N indicates the number of GIF\n     frames. For an image with only one frame, you can pass in **0**.\n @param info Pointer to the image information obtained, which is an OH_ImageSource_Info struct.\n For details, see {@link OH_ImageSource_Info}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr, or info is nullptr, or failed to get image info.\n @since 12"]
    pub fn OH_ImageSourceNative_GetImageInfo(
        source: *mut OH_ImageSourceNative,
        index: i32,
        info: *mut OH_ImageSource_Info,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param key Pointer to the property key. For details, see {@link Image_String}. For details about the value range of **key**, see the definition of {@link OHOS_IMAGE_PROPERTY_XXX}\n     . The memory must be released after the image source is used. For details, see {@link OH_ImageSourceNative_Release}.\n @param value Pointer to the value obtained. You can pass in a null pointer with the size set to zero. In this case,\n     the system will allocate memory, but you must release the memory after use.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr, or key is nullptr, or value is nullptr.\n     <br>{@link IMAGE_ALLOC_FAILED} allocate memory failed.\n     <br>{@link IMAGE_COPY_FAILED} copy memory failed.\n @since 12"]
    pub fn OH_ImageSourceNative_GetImageProperty(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property from an <b>ImageSource</b> object. The output value.data is null-terminated.\n\n @param source Pointer to ImageSource.\n @param key Pointer to the property key.\n @param value Pointer to the property value. Output Parameter.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n @since 19"]
    #[cfg(feature = "api-19")]
    pub fn OH_ImageSourceNative_GetImagePropertyWithNull(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property. The output **value.data** is terminated with a string terminator.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param key Pointer to the property key.\n @param value Pointer to the value obtained.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr, or key is nullptr, or value is nullptr,\n         or failed to modify image property because of invalid parameters.\n @since 12"]
    pub fn OH_ImageSourceNative_ModifyImageProperty(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the number of image frames.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @param frameCount Indicates a pointer to the number of frames obtained.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr, or frameCount is nullptr.\n @since 12"]
    pub fn OH_ImageSourceNative_GetFrameCount(
        source: *mut OH_ImageSourceNative,
        frameCount: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_ImageSourceNative object.\n\n @param source Pointer to an OH_ImageSourceNative object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} source is nullptr.\n @since 12"]
    pub fn OH_ImageSourceNative_Release(source: *mut OH_ImageSourceNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_DecodingOptionsForPicture object.\n\n @param options Double pointer to the OH_DecodingOptionsForPicture object created.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_DecodingOptionsForPicture_Create(
        options: *mut *mut OH_DecodingOptionsForPicture,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains desired auxiliary pictures in the decoding options (auxiliary pictures contained in **picture**\n expected to be decoded.)\n\n @param options Pointer to an OH_DecodingOptionsForPicture object.\n @param desiredAuxiliaryPictures Double pointer to the desired auxiliary pictures.\n @param length Length of the desired auxiliary pictures.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, desiredAuxiliaryPictures is nullptr,\n         or length is invalid.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_DecodingOptionsForPicture_GetDesiredAuxiliaryPictures(
        options: *mut OH_DecodingOptionsForPicture,
        desiredAuxiliaryPictures: *mut *mut Image_AuxiliaryPictureType,
        length: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets desired auxiliary pictures in the decoding options.\n\n @param options Pointer to an OH_DecodingOptionsForPicture object.\n @param desiredAuxiliaryPictures Pointer to the desired auxiliary pictures.\n @param length Length of the desired auxiliary pictures.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, desiredAuxiliaryPictures is nullptr,\n         or length is invalid.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_DecodingOptionsForPicture_SetDesiredAuxiliaryPictures(
        options: *mut OH_DecodingOptionsForPicture,
        desiredAuxiliaryPictures: *mut Image_AuxiliaryPictureType,
        length: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_DecodingOptionsForPicture object.\n\n @param options Pointer to an OH_DecodingOptionsForPicture object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_DecodingOptionsForPicture_Release(
        options: *mut OH_DecodingOptionsForPicture,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the supported image formats that can be decoded.\n\n @param supportedFormats Double pointer to the supported image formats.\n @param length Pointer to the size of the array.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if <b>supportedFormats</b> or <b>length</b> is empty.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImageSourceNative_GetSupportedFormats(
        supportedFormats: *mut *mut Image_MimeType,
        length: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property as short int type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a short int value.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyShort(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut u16,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property as long int type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a long int value.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyLong(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property as double type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double value.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyDouble(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut f64,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the array length of an array type property or the string length of a string type property.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param size Array length for an array type property, string length for a string type property. Output Parameter.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or size is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a array\\string value.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyArraySize(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        size: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property as string type.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size String length.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a string value.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyString(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut ::std::os::raw::c_char,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property as int array.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size Array length.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a int array.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyIntArray(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut i32,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property as double array.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size Array length.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double array.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyDoubleArray(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut f64,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the value of an image property as blob.\n\n @param source ImageSource from which the property is queried.\n @param key The property to be queried.\n @param value Query result. Output Parameter. The caller needs to manage memory application and release.\n @param size Array length.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a blob.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_GetImagePropertyBlob(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut ::std::os::raw::c_void,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Modify the value of an image property as short int.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a short int.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_ModifyImagePropertyShort(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: u16,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Modify the value of an image property as long int.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a long int.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_ModifyImagePropertyLong(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Modify the value of an image property as double.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_ModifyImagePropertyDouble(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: f64,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Modify the value of an image property as int array.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @param size Array length.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not an int array.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_ModifyImagePropertyIntArray(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut i32,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Modify the value of an image property as double array.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @param size Array length.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a double array.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_ModifyImagePropertyDoubleArray(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut f64,
        size: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Modify the value of an image property as blob.\n\n @param source ImageSource from which the property is modified.\n @param key The property to be modified.\n @param value The value set to the property.\n @param size Array length.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist, or is not a blob.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_ImageSourceNative_ModifyImagePropertyBlob(
        source: *mut OH_ImageSourceNative,
        key: *mut Image_String,
        value: *mut ::std::os::raw::c_void,
        size: usize,
    ) -> Image_ErrorCode;
}
#[doc = " @brief Defines raw data in an image.\n It is used in {@link OH_ImageSourceNative_CreateImageRawData}.\n\n @since 24"]
#[cfg(feature = "api-24")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageRawData {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Obtains rawData object from an image.\n         The rawData object usually occupies a large amount of memory because it contains\n         raw data from the camera. When the rawData object and the data it contains are not used, call the\n         {@link OH_ImageSourceNative_DestroyImageRawData} method to destroy them in a timely manner.\n\n @param source Pointer to the image source.\n @param rawData Double pointer to the rawData object obtained after decoding.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_SOURCE} Bad source.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if the rawData object is invalid.\n     <br>{@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} Unsupported MIME type.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_ImageSourceNative_CreateImageRawData(
        source: *const OH_ImageSourceNative,
        rawData: *mut *mut OH_ImageRawData,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets binary data from the rawData object.\n\n @param rawData Pointer to the rawData object.\n @param data Pointer to the binary buffer data.\n @param length Pointer to the length of data obtained.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if the rawData object is invalid.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_ImageSourceNative_GetBufferFromRawData(
        rawData: *const OH_ImageRawData,
        data: *mut *mut u8,
        length: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets number of bits that each pixel actually occupies in the buffer data.\n\n @param rawData Pointer to the rawData object.\n @param bitsPerPixel Pointer to the bitsPerPixel obtained.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if the rawData object is invalid.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_ImageSourceNative_GetBitsPerPixelFromRawData(
        rawData: *const OH_ImageRawData,
        bitsPerPixel: *mut u8,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys the rawData object.\n\n @param rawData Pointer to the rawData object.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_SOURCE_INVALID_PARAMETER} if the rawData object is invalid.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_ImageSourceNative_DestroyImageRawData(
        rawData: *mut OH_ImageRawData,
    ) -> Image_ErrorCode;
}
#[doc = " @brief The struct describes the image packer, which is used to perform operations related to an image packer.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImagePackerNative {
    _unused: [u8; 0],
}
#[doc = " @brief OH_PackingOptions is an image encoding option struct encapsulated at the native layer. It cannot be\n manipulated directly; instead, functions shall be called to create and release the struct, and operate on its\n specific fields.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PackingOptions {
    _unused: [u8; 0],
}
#[doc = " @brief OH_PackingOptionsForSequence is an image sequence encoding option struct encapsulated at the native layer. It\n cannot be manipulated directly; instead, functions shall be called to create and release the struct, and operate on\n its specific fields.\n\n @since 18"]
#[cfg(feature = "api-18")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PackingOptionsForSequence {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_PackingOptions struct.\n\n @param options Double pointer to the OH_PackingOptions struct created.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_BAD_PARAMETER} options is nullptr.</li>\n         </ul>\n @release image_packer_native/OH_PackingOptions_Release {options}\n @since 12"]
    pub fn OH_PackingOptions_Create(options: *mut *mut OH_PackingOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the MIME type. **value.data** obtained through this API lacks the string terminator **\\0**. Please\n use it with caution.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param format Pointer to the MIME type. You can pass in a null pointer with the size set to zero. In this case,\n     the system will allocate memory, but you must release the memory after use.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or format is nullptr.\n     <br>{@link IMAGE_ALLOC_FAILED} allocate memory failed.\n     <br>{@link IMAGE_COPY_FAILED} copy memory failed\n @since 12"]
    pub fn OH_PackingOptions_GetMimeType(
        options: *mut OH_PackingOptions,
        format: *mut Image_MimeType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the MIME type in the packing options. The output **format.data** ends with the string terminator **\\0**.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param format Pointer to the MIME type.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_PACKER_INVALID_PARAMETER} if options or format is nullptr.\n @since 19"]
    #[cfg(feature = "api-19")]
    pub fn OH_PackingOptions_GetMimeTypeWithNull(
        options: *mut OH_PackingOptions,
        format: *mut Image_MimeType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the MIME type.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param format Pointer to a MIME type string in the form \"type/subtype\".\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or format is nullptr.\n     <br>{@link IMAGE_ALLOC_FAILED} allocate memory failed.\n     <br>{@link IMAGE_COPY_FAILED} copy memory failed.\n\n @since 12"]
    pub fn OH_PackingOptions_SetMimeType(
        options: *mut OH_PackingOptions,
        format: *mut Image_MimeType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the encoding quality.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param quality Pointer to the encoding quality.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or quality is nullptr.\n @since 12"]
    pub fn OH_PackingOptions_GetQuality(
        options: *mut OH_PackingOptions,
        quality: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the encoding quality.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param quality Encoding quality.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_PackingOptions_SetQuality(
        options: *mut OH_PackingOptions,
        quality: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the **needsPackProperties** parameter in the OH_PackingOptions struct.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param needsPackProperties Whether to encode image property information (for example, Exif). The values include **true**\n (yes) and **false** (no).\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or needsPackProperties is nullptr.\n @since 12"]
    pub fn OH_PackingOptions_GetNeedsPackProperties(
        options: *mut OH_PackingOptions,
        needsPackProperties: *mut bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the **needsPackProperties** parameter in the OH_PackingOptions struct.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param needsPackProperties Whether to encode image property information (for example, Exif). The values include **true**\n (yes) and **false** (no).\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_PackingOptions_SetNeedsPackProperties(
        options: *mut OH_PackingOptions,
        needsPackProperties: bool,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the desired dynamic range during encoding.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param desiredDynamicRange Desired dynamic range. For details about the available options, see {@link IMAGE_PACKER_DYNAMIC_RANGE}\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr, or desiredDynamicRange is nullptr.\n @since 12"]
    pub fn OH_PackingOptions_GetDesiredDynamicRange(
        options: *mut OH_PackingOptions,
        desiredDynamicRange: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the desired dynamic range during encoding.\n\n @param options Pointer to an OH_PackingOptions struct.\n @param desiredDynamicRange Desired dynamic range. For details about the available options, see\n {@link IMAGE_PACKER_DYNAMIC_RANGE}.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_PackingOptions_SetDesiredDynamicRange(
        options: *mut OH_PackingOptions,
        desiredDynamicRange: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_PackingOptions struct.\n\n @param options Pointer to an OH_PackingOptions struct.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 12"]
    pub fn OH_PackingOptions_Release(options: *mut OH_PackingOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_PackingOptionsForSequence struct.\n\n @param options Double pointer to OH_PackingOptionsForSequence.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_Create(
        options: *mut *mut OH_PackingOptionsForSequence,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the number of frames for image sequence encoding.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @param frameCount Number of frames.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_SetFrameCount(
        options: *mut OH_PackingOptionsForSequence,
        frameCount: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the number of frames for image sequence encoding.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @param frameCount Pointer to the number of frames.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options or frameCount is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_GetFrameCount(
        options: *mut OH_PackingOptionsForSequence,
        frameCount: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the delay time array for image sequence encoding.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @param delayTimeList Pointer to the delay time array.\n @param delayTimeListLength Length of the delay time array.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_SetDelayTimeList(
        options: *mut OH_PackingOptionsForSequence,
        delayTimeList: *mut i32,
        delayTimeListLength: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the delay time array for image sequence encoding.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @param delayTimeList Pointer to the delay time array.\n @param delayTimeListLength Length of the delay time array.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options or delayTimeList is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_GetDelayTimeList(
        options: *mut OH_PackingOptionsForSequence,
        delayTimeList: *mut i32,
        delayTimeListLength: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the disposal type array for image sequence encoding.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @param disposalTypes Pointer to an array that defines how each image frame transitions. If the array length is less\n     than **frameCount**, the last value in the array will be used for the remaining frames. The values can be:\n     **0**: No operation is required.\n     **1**: Keeps the image unchanged.\n     **2**: Restores the background color.\n     **3**: Restores to the previous state.\n @param disposalTypesLength Length of the disposal type array.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_SetDisposalTypes(
        options: *mut OH_PackingOptionsForSequence,
        disposalTypes: *mut u32,
        disposalTypesLength: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the disposal type array for image sequence encoding.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @param disposalTypes Pointer to the disposal type array.\n @param disposalTypesLength Length of the disposal type array.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options or disposalTypes is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_GetDisposalTypes(
        options: *mut OH_PackingOptionsForSequence,
        disposalTypes: *mut u32,
        disposalTypesLength: usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the number of loops for image sequence encoding. The value range is [0, 65535], where **0** means an\n infinite loop. If this field is not carried, loop playback is not performed.\n\n @param options Pointer to OH_PackingOptionsForSequence .\n @param loopCount Number of loops.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_SetLoopCount(
        options: *mut OH_PackingOptionsForSequence,
        loopCount: u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the number of loops for image sequence encoding.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @param loopCount Pointer to the number of loops.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options or loopCount is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_GetLoopCount(
        options: *mut OH_PackingOptionsForSequence,
        loopCount: *mut u32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_PackingOptionsForSequence struct.\n\n @param options Pointer to OH_PackingOptionsForSequence.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} options is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_PackingOptionsForSequence_Release(
        options: *mut OH_PackingOptionsForSequence,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates the pointer to an OH_ImagePackerNative struct.\n\n @param imagePacker Double pointer to OH_ImagePackerNative.\n @return <ul>\n         <li>{@link IMAGE_SUCCESS} if the execution is successful.</li>\n         <li>{@link IMAGE_BAD_PARAMETER} imagePacker is nullptr.</li>\n         </ul>\n @release image_packer_native/OH_ImagePackerNative_Release {imagePacker}\n @since 12"]
    pub fn OH_ImagePackerNative_Create(
        imagePacker: *mut *mut OH_ImagePackerNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes an image source into data in a given format.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an OH_PackingOptions struct.\n @param imageSource Pointer to the image source to encode.\n @param outData Pointer to the buffer used to store the output data.\n @param size Pointer to the size of the buffer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or imageSource is nullptr, or outData is nullptr.\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
    pub fn OH_ImagePackerNative_PackToDataFromImageSource(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptions,
        imageSource: *mut OH_ImageSourceNative,
        outData: *mut u8,
        size: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes a PixelMap into data in a given format.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an OH_PackingOptions struct.\n @param pixelmap Pointer to the PixelMap to encode.\n @param outData Pointer to the buffer used to store the output data.\n @param size Pointer to the size of the buffer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or pixelmap is nullptr, or outData is nullptr.\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
    pub fn OH_ImagePackerNative_PackToDataFromPixelmap(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptions,
        pixelmap: *mut OH_PixelmapNative,
        outData: *mut u8,
        size: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes a picture into data in a given format.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an OH_PackingOptions struct.\n @param picture Pointer to the picture to encode.\n @param outData Pointer to the buffer used to store the output data.\n @param size Pointer to the size of the buffer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} imagePacker is nullptr, or picture is nullptr, or outData is nullptr,\n         or size is invalid.\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_ImagePackerNative_PackToDataFromPicture(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptions,
        picture: *mut OH_PictureNative,
        outData: *mut u8,
        size: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes a PixelMap sequence into data.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an {@link OH_PackingOptionsForSequence} struct.\n @param pixelmapSequence Double pointer to the PixelMap sequence to encode.\n @param sequenceLength Length of the PixelMap sequence.\n @param outData Pointer to the buffer used to store the output data.\n @param outDataSize Pointer to the size of the buffer.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or size/length is invalid\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_ImagePackerNative_PackToDataFromPixelmapSequence(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptionsForSequence,
        pixelmapSequence: *mut *mut OH_PixelmapNative,
        sequenceLength: usize,
        outData: *mut u8,
        outDataSize: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes an image source into a file.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an OH_PackingOptions struct.\n @param imageSource Pointer to the image source to encode.\n @param fd File descriptor, which is writable.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or imageSource is nullptr, or fd is invalid.\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
    pub fn OH_ImagePackerNative_PackToFileFromImageSource(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptions,
        imageSource: *mut OH_ImageSourceNative,
        fd: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes a PixelMap into a file.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an OH_PackingOptions struct.\n @param pixelmap Pointer to the PixelMap to encode.\n @param fd File descriptor, which is writable.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or pixelmap is nullptr, or fd is invalid.\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 12"]
    pub fn OH_ImagePackerNative_PackToFileFromPixelmap(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptions,
        pixelmap: *mut OH_PixelmapNative,
        fd: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes a picture into a file.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an OH_PackingOptions struct.\n @param picture Pointer to the picture to encode.\n @param fd File descriptor, which is writable.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} imagePacker is nullptr, or picture is nullptr, or fd is invalid.\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_ImagePackerNative_PackToFileFromPicture(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptions,
        picture: *mut OH_PictureNative,
        fd: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encodes a PixelMap sequence into a file.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @param options Pointer to an {@link OH_PackingOptionsForSequence} struct.\n @param pixelmapSequence Double pointer to the PixelMap sequence to encode.\n @param sequenceLength Length of the PixelMap sequence.\n @param fd File descriptor, which is writable.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or length is invalid\n     <br>{@link IMAGE_ENCODE_FAILED} encode failed.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_ImagePackerNative_PackToFileFromPixelmapSequence(
        imagePacker: *mut OH_ImagePackerNative,
        options: *mut OH_PackingOptionsForSequence,
        pixelmapSequence: *mut *mut OH_PixelmapNative,
        sequenceLength: usize,
        fd: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases the pointer to an OH_ImagePackerNative struct.\n\n @param imagePacker Pointer to OH_ImagePackerNative.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_BAD_PARAMETER} imagePacker is nullptr.\n @since 12"]
    pub fn OH_ImagePackerNative_Release(imagePacker: *mut OH_ImagePackerNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the supported image formats that can be encoded.\n\n @param supportedFormats Double pointer to the supported image formats.\n @param length Pointer to the size of the array.\n @return {@link IMAGE_SUCCESS} if the execution is successful.\n     <br>{@link IMAGE_PACKER_INVALID_PARAMETER} if <b>supportedFormats</b> or <b>length</b> is empty.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImagePackerNative_GetSupportedFormats(
        supportedFormats: *mut *mut Image_MimeType,
        length: *mut usize,
    ) -> Image_ErrorCode;
}
#[doc = "/**\n @brief The OH_ImageReceiverNative struct describes the image receiver, which is encapsulated at the native layer.\n The struct cannot be directly operated. Instead, functions must be called to create and release the struct and\n operate the fields in the struct.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageReceiverNative {
    _unused: [u8; 0],
}
#[doc = " @brief The struct describes the data type name of the image receiver options.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageReceiverOptions {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the callbacks for the image receiver at the native layer.\n\n @since 12"]
pub type OH_ImageReceiver_OnCallback =
    ::std::option::Option<unsafe extern "C" fn(receiver: *mut OH_ImageReceiverNative)>;
#[doc = " @brief Defines the callback for the ImageArrive event.\n\n @since 20"]
#[cfg(feature = "api-20")]
pub type OH_ImageReceiver_ImageArriveCallback = ::std::option::Option<
    unsafe extern "C" fn(
        receiver: *mut OH_ImageReceiverNative,
        userData: *mut ::std::os::raw::c_void,
    ),
>;
extern "C" {
    #[doc = " @brief Creates an OH_ImageReceiverOptions object at the application layer.\n\n @param options Double pointer to the OH_ImageReceiverOptions object created.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n     <br>{@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n\n @since 12"]
    pub fn OH_ImageReceiverOptions_Create(
        options: *mut *mut OH_ImageReceiverOptions,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image size of an OH_ImageReceiverOptions object.\n\n @param options Pointer to an OH_ImageReceiverOptions object.\n @param size Pointer to the Image_Size object obtained.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageReceiverOptions_GetSize(
        options: *mut OH_ImageReceiverOptions,
        size: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the image size of an OH_ImageReceiverOptions object.\n\n @param options Pointer to an OH_ImageReceiverOptions object.\n @param size Image_Size object.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageReceiverOptions_SetSize(
        options: *mut OH_ImageReceiverOptions,
        size: Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the image cache capacity of an OH_ImageReceiverOptions object.\n\n @param options Pointer to an OH_ImageReceiverOptions object.\n @param capacity Pointer to the capacity obtained.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageReceiverOptions_GetCapacity(
        options: *mut OH_ImageReceiverOptions,
        capacity: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the image cache capacity of an OH_ImageReceiverOptions object.\n\n @param options Pointer to an OH_ImageReceiverOptions object.\n @param capacity Capacity.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageReceiverOptions_SetCapacity(
        options: *mut OH_ImageReceiverOptions,
        capacity: i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases an OH_ImageReceiverOptions object.\n\n @param options Pointer to an OH_ImageReceiverOptions object.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverOptions\n @since 12"]
    pub fn OH_ImageReceiverOptions_Release(
        options: *mut OH_ImageReceiverOptions,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an OH_ImageReceiverNative object at the application layer.\n\n @param options Pointer to an OH_ImageReceiverOptions object.\n @param receiver Double pointer to the OH_ImageReceiverNative object obtained.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n     <br>{@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @since 12"]
    pub fn OH_ImageReceiverNative_Create(
        options: *mut OH_ImageReceiverOptions,
        receiver: *mut *mut OH_ImageReceiverNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the surface ID through an OH_ImageReceiverNative object.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @param surfaceId Pointer to the surface ID obtained.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n     <br>{@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n @see OH_ImageReceiverNative\n @since 12"]
    pub fn OH_ImageReceiverNative_GetReceivingSurfaceId(
        receiver: *mut OH_ImageReceiverNative,
        surfaceId: *mut u64,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the latest image through an OH_ImageReceiverNative object.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @param image Double pointer to the image obtained, which is an OH_ImageNative object at the application layer.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n     <br>{@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n     <br>{@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @see OH_ImageReceiverNative, OH_ImageNative\n @since 12"]
    pub fn OH_ImageReceiverNative_ReadLatestImage(
        receiver: *mut OH_ImageReceiverNative,
        image: *mut *mut OH_ImageNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the next image through an OH_ImageReceiverNative object.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @param image Double pointer to the image obtained, which is an OH_ImageNative object at the application layer.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n     <br>{@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n     <br>{@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @see OH_ImageReceiverNative, OH_ImageNative\n @since 12"]
    pub fn OH_ImageReceiverNative_ReadNextImage(
        receiver: *mut OH_ImageReceiverNative,
        image: *mut *mut OH_ImageNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Registers the {@link OH_ImageReceiver_OnCallback} callback.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @param callback Callback to register.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative, OH_ImageReceiver_OnCallback\n @since 12"]
    pub fn OH_ImageReceiverNative_On(
        receiver: *mut OH_ImageReceiverNative,
        callback: OH_ImageReceiver_OnCallback,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Unregisters the {@link OH_ImageReceiver_OnCallback} callback.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative, OH_ImageReceiverNative_On\n @since 12"]
    pub fn OH_ImageReceiverNative_Off(receiver: *mut OH_ImageReceiverNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the size of an **ImageReceiver** using **OH_ImageReceiverNative**.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @param size Pointer to the Image_Size object obtained.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative, Image_Size\n @since 12"]
    pub fn OH_ImageReceiverNative_GetSize(
        receiver: *mut OH_ImageReceiverNative,
        size: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the capacity of an **OH_ImageReceiverNative**.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @param capacity Pointer to the capacity obtained.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative\n @since 12"]
    pub fn OH_ImageReceiverNative_GetCapacity(
        receiver: *mut OH_ImageReceiverNative,
        capacity: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Releases an OH_ImageReceiverNative object.\n\n @param receiver Pointer to an OH_ImageReceiverNative object.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @see OH_ImageReceiverNative\n @since 12"]
    pub fn OH_ImageReceiverNative_Release(receiver: *mut OH_ImageReceiverNative)
        -> Image_ErrorCode;
}
extern "C" {
    #[doc = " Registers an {@link OH_ImageReceiver_ImageArriveCallback} callback.\n\n @param receiver Pointer to an OH_ImageReceiverNative object that processes the callback.\n @param callback Callback to register.\n @param userData Pointer to user data.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS is returned if the operation is successful.\n     <br>{@link Image_ErrorCode} IMAGE_RECEIVER_INVALID_PARAMETER is returned if receiver or callback is null.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImageReceiverNative_OnImageArrive(
        receiver: *mut OH_ImageReceiverNative,
        callback: OH_ImageReceiver_ImageArriveCallback,
        userData: *mut ::std::os::raw::c_void,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " Unregisters an {@link OH_ImageReceiver_ImageArriveCallback} callback.\n\n @param receiver Pointer to an OH_ImageReceiverNative object that processes the callback.\n @param callback Callback to unregister.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - Operation succeeded.\n     <br>{@link Image_ErrorCode} IMAGE_RECEIVER_INVALID_PARAMETER - <b>receiver</b> is empty or <b>callback</b> is not registered.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImageReceiverNative_OffImageArrive(
        receiver: *mut OH_ImageReceiverNative,
        callback: OH_ImageReceiver_ImageArriveCallback,
    ) -> Image_ErrorCode;
}