ohos-image-native-sys 0.0.4

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
/* 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 Defines the region of the image source to decode.\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 lenth 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 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 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;
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."]
#[cfg(feature = "api-13")]
pub const Image_MetadataType_EXIF_METADATA: Image_MetadataType = 1;
#[doc = " Fragment metadata."]
#[cfg(feature = "api-13")]
pub const Image_MetadataType_FRAGMENT_METADATA: Image_MetadataType = 2;
#[doc = " Metadata of a GIF image.\n\n @since 20"]
#[cfg(feature = "api-20")]
pub const Image_MetadataType_GIF_METADATA: Image_MetadataType = 5;
#[doc = " @brief Define the metadata type.\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 a <b>PictureMetadata</b> object.\n\n @param metadataType The type of metadata.\n @param metadata The PictureMetadata pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr.\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 the property of picture metadata.\n\n @param metadata The PictureMetadata pointer will be operated.\n @param key The property's key.\n @param value The property's value.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr, or key is nullptr, or value is nullptr.\n         {@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_PictureMetadata_GetProperty(
        metadata: *mut OH_PictureMetadata,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set picture metadata property.\n\n @param metadata The PictureMetadata pointer will be operated.\n @param key The property's key.\n @param value The property's value.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr, or key is nullptr, or value is nullptr.\n         {@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_PictureMetadata_SetProperty(
        metadata: *mut OH_PictureMetadata,
        key: *mut Image_String,
        value: *mut Image_String,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the property of picture metadata. The output value.data is null-terminated.\n\n @param metadata Pointer to OH_PictureMetadata.\n @param key Pointer to property's key.\n @param value Pointer to property's value. Output parameter.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_INVALID_PARAMETER} metadata is nullptr, or key is nullptr, or value is nullptr.\n         {@link IMAGE_UNSUPPORTED_METADATA} unsupported metadata type, or the metadata type does not match the\n         auxiliary picture type.\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 Releases this PictureMetadata object.\n\n @param metadata The PictureMetadata pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr.\n @since 13"]
    #[cfg(feature = "api-13")]
    pub fn OH_PictureMetadata_Release(metadata: *mut OH_PictureMetadata) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains a clone of metadata.\n\n @param oldMetadata The PictureMetadata pointer will be operated.\n @param newMetadata The PictureMetadata pointer will be cloned.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} metadata is nullptr.\n         {@link IMAGE_ALLOC_FAILED} memory alloc failed.\n         {@link IMAGE_COPY_FAILED} memory copy failed.\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 Defines an <b>OH_ImageNative</b> object.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageNative {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the image buffer data.\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 Indicates the pointer to an {@link OH_ImageNative} object.\n @param size Indicates the pointer to the {@link Image_Size} object obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n @since 12"]
    pub fn OH_ImageNative_GetImageSize(
        image: *mut OH_ImageNative,
        size: *mut Image_Size,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get type arry from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param types Indicates the pointer to an {@link OH_ImageNative} component arry obtained.\n @param typeSize Indicates the pointer to the {@link OH_ImageNative} component arry size obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\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 Get byte buffer from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param nativeBuffer Indicates the pointer to the component buffer obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\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 Get size of buffer from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param size Indicates the pointer to the size of buffer obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageNative_GetBufferSize(
        image: *mut OH_ImageNative,
        componentType: u32,
        size: *mut usize,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get row stride from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param rowStride Indicates the pointer to the row stride obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageNative_GetRowStride(
        image: *mut OH_ImageNative,
        componentType: u32,
        rowStride: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get pixel stride from an {@link OH_ImageNative} object by the component type.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param componentType Indicates the type of component.\n @param pixelStride Indicates the pointer to the pixel stride obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageNative_GetPixelStride(
        image: *mut OH_ImageNative,
        componentType: u32,
        pixelStride: *mut i32,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get timestamp from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param timestamp Indicates the pointer to the timestamp obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the operation is successful.\n         {@link IMAGE_BAD_PARAMETER} if the input parameter is invalid.\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 It is used to release the object {@link OH_ImageNative}.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n @since 12"]
    pub fn OH_ImageNative_Release(image: *mut OH_ImageNative) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the color space from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param colorSpaceName Indicates the pointer to the obtained color space name, see {@link ColorSpaceName}.\n @return Returns one of the following result codes:\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@link IMAGE_BAD_PARAMETER} if bad parameter.\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 from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param format Indicates the pointer to the obtained image format.\n @return Returns one of the following result codes:\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@link IMAGE_BAD_PARAMETER} if bad parameter.\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 from an {@link OH_ImageNative} object.\n\n @param image Indicates the pointer to an {@link OH_ImageNative} object.\n @param imageBufferData Indicates the pointer to the obtained image buffer data.\n @return Returns one of the following result codes:\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@link IMAGE_BAD_PARAMETER} if bad parameter.\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],
}
#[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;
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 an opacity rate for this image pixel map.\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 this image based on the input width and height.\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 this image based on the input width and height with anti-aliasing.\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 Translates this image based on the input coordinates.\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 this image based on the input angle.\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 this image horizontally or vertically, or both.\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 this image based on the input size.\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 Converting images to alpha format\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 Define a Picture struct type, used for picture pointer controls.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PictureNative {
    _unused: [u8; 0],
}
#[doc = " @brief Define a AuxiliaryPicture struct type, used for auxiliary\n picture pointer controls.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_AuxiliaryPictureNative {
    _unused: [u8; 0],
}
#[doc = " @brief Define a AuxiliaryPictureInfo struct type, used for auxiliary\n picture info controls.\n\n @since 13"]
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_AuxiliaryPictureInfo {
    _unused: [u8; 0],
}
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_GAINMAP: Image_AuxiliaryPictureType = 1;
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_DEPTH_MAP: Image_AuxiliaryPictureType =
    2;
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_UNREFOCUS_MAP:
    Image_AuxiliaryPictureType = 3;
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_LINEAR_MAP: Image_AuxiliaryPictureType =
    4;
#[cfg(feature = "api-13")]
pub const Image_AuxiliaryPictureType_AUXILIARY_PICTURE_TYPE_FRAGMENT_MAP:
    Image_AuxiliaryPictureType = 5;
#[doc = " @brief Define a auxiliary picture type.\n\n @since 13"]
#[cfg(feature = "api-13")]
pub type Image_AuxiliaryPictureType = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ComposeOptions {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Create a instance for OH_ComposeOptions struct.\n\n @param options The OH_ComposeOptions pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set desired pixel format for ComposeOptions.\n\n @param options The OH_ComposeOptions pointer will be operated.\n @param desiredPixelFormat The desired pixel format will be set, RGBA_1010102\\YCBCR_P010\\YCRCB_P010 are supported.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get desired pixel format for ComposeOptions.\n\n @param options The OH_ComposeOptions pointer will be operated.\n @param desiredPixelFormat The desired pixel format.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an OH_ComposeOptions object.\n\n @param options Indicates a OH_ComposeOptions pointer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create a <b>Picture</b> object.\n\n @param mainPixelmap The pixel map of the main image.\n @param picture Picture pointer for created.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 pixel map of the main image.\n\n @param picture The Picture pointer will be operated.\n @param mainPixelmap Main pixel map pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 hdr pixel map.\n\n @param picture The Picture pointer will be operated.\n @param hdrPixelmap Hdr pixel map pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or hdrPixelmap is nullptr.\n         {@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 hdr pixel map with options.\n\n @param picture The Picture pointer will be operated.\n @param options The compose options.\n @param hdrPixelmap Hdr pixel map pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or hdrPixelmap is nullptr.\n         {@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 gainmap pixel map.\n\n @param picture The Picture pointer will be operated.\n @param gainmapPixelmap Gainmap pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set auxiliary picture.\n\n @param picture The Picture pointer will be operated.\n @param type The type of auxiliary picture.\n @param auxiliaryPicture AuxiliaryPicture object.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 the auxiliary picture based on type.\n\n @param picture The Picture pointer will be operated.\n @param type The type of auxiliary picture.\n @param auxiliaryPicture AuxiliaryPicture pointer for obtained.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 main picture.\n\n @param picture The Picture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata of main picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or metadata is nullptr.\n         {@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 Set main picture metadata.\n\n @param picture The Picture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} picture is nullptr, or metadata is nullptr.\n         {@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 Releases this Picture object.\n\n @param picture The Picture pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create a <b>AuxiliaryPicture</b> object.\n\n @param data The image data buffer.\n @param dataLength The length of data.\n @param size The size of auxiliary picture.\n @param type The type of auxiliary picture.\n @param auxiliaryPicture AuxiliaryPicture pointer for created.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Write pixels to auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param source The pixels will be written.\n @param bufferSize The size of pixels.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or source is nullptr, or the bufferSize is invalid.\n         {@link IMAGE_ALLOC_FAILED} memory alloc failed.\n         {@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 Read pixels from auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param destination The pixels will be read.\n @param bufferSize The size of pixels for reading.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or destination is nullptr,\n         or the bufferSize is invalid.\n         {@link IMAGE_ALLOC_FAILED} memory alloc failed.\n         {@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 auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param type The type of auxiliary picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 info of auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param info The info of auxiliary picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set auxiliary picture info.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param info The info will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 auxiliary picture.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata of auxiliary picture.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or metadata is nullptr.\n         {@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 Set auxiliary picture metadata.\n\n @param auxiliaryPicture The AuxiliaryPicture pointer will be operated.\n @param metadataType The type of metadata.\n @param metadata The metadata will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} auxiliaryPicture is nullptr, or metadata is nullptr.\n         {@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 Releases this AuxiliaryPicture object.\n\n @param picture The Picture pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create a <b>AuxiliaryPictureInfo</b> object.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 type of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param type The type of auxiliary picture info.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set auxiliary picture info type.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param type The type will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 size of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param size The size of auxiliary picture info.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set auxiliary picture info size.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param size The size will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr, or size is nullptr.\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 rowStride of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param rowStride The rowStride of auxiliary picture info.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set auxiliary picture info rowStride.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param rowStride The rowStride will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 pixelFormat of auxiliary picture info.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param pixelFormat The pixelFormat will be get.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set auxiliary picture info pixelFormat.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @param pixelFormat The pixelFormat will be set.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 this AuxiliaryPictureInfo object.\n\n @param info The AuxiliaryPictureInfo pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Defines an image source object for the image interface.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageSourceNative {
    _unused: [u8; 0],
}
#[doc = " @brief Defines image source infomation\n {@link OH_ImageSourceInfo_Create}.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageSource_Info {
    _unused: [u8; 0],
}
#[doc = " @brief Defines decoding options for picture\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],
}
#[cfg(feature = "api-15")]
pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_AUTO: IMAGE_ALLOCATOR_TYPE = 0;
#[cfg(feature = "api-15")]
pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_DMA: IMAGE_ALLOCATOR_TYPE = 1;
#[cfg(feature = "api-15")]
pub const IMAGE_ALLOCATOR_TYPE_IMAGE_ALLOCATOR_TYPE_SHARE_MEMORY: IMAGE_ALLOCATOR_TYPE = 2;
#[doc = " @brief Type of allocator used to allocate memory of a PixelMap..\n\n @since 15"]
#[cfg(feature = "api-15")]
pub type IMAGE_ALLOCATOR_TYPE = u32;
extern "C" {
    #[doc = " @brief Create a pointer for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
    pub fn OH_ImageSourceInfo_Create(info: *mut *mut OH_ImageSource_Info) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get width number for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @param width the number of image width.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get height number for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @param height the number of image height.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get isHdr for OH_ImageSource_Info struct.\n\n @param info The OH_ImageSource_Info pointer will be operated. Pointer connot be null.\n @param isHdr Whether the image has a high dynamic range.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 delete OH_ImageSource_Info pointer.\n\n @param info The OH_ImageSource_Info pointer will be operated.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} info is nullptr.\n @since 12"]
    pub fn OH_ImageSourceInfo_Release(info: *mut OH_ImageSource_Info) -> Image_ErrorCode;
}
#[doc = " @brief Defines the options for decoding the image source.\n It is used in {@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 Create a pointer for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
    pub fn OH_DecodingOptions_Create(options: *mut *mut OH_DecodingOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get pixelFormat number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set pixelFormat number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param pixelFormat the number of image pixelFormat.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get index number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param index the number of image index.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set index number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param index the number of image index.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get rotate number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param rotate the number of image rotate.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set rotate number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param rotate the number of image rotate.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get desiredSize number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredSize the number of image desiredSize.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set desiredSize number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredSize the number of image desiredSize.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set desiredRegion number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredRegion the number of image desiredRegion.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set desiredRegion number for OH_DecodingOptions struct.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @param desiredRegion the number of image desiredRegion.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set desiredDynamicRange number for OH_DecodingOptions struct.\n\n @param options The OH_DecodingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}. Pointer connot be null.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 a cropping and scaling strategy for decoding options.\n\n @param options Pointer to the decoding options.\n @param cropAndScaleStrategy Strategy for executing the cropping and scaling operations when both desiredSize and\n desiredRegion are specified.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} The execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is a null pointer or cropAndScaleStrategy is not in the range of\n         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 Obtains the cropping and scaling strategy of decoding options.\n\n @param options Pointer to the decoding options.\n @param cropAndScaleStrategy Pointer to the strategy for executing the cropping and scaling operations when both\n desiredSize and desiredRegion are specified.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS}: The execution is successful.\n         {@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 Set desiredDynamicRange number for OH_DecodingOptions struct.\n\n @param options The OH_DecodingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 color space set in the decoding options.\n\n @param options Pointer to the decoding options.\n @param colorSpace Pointer to the color space.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 desired color space for the decoding options.\n\n @param options Pointer to the decoding options.\n @param colorSpace Desired color space.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Sets the crop region for the decoding options.\n\n @param options Pointer to the decoding options.\n @param cropRegion The target region will be cropped from the image.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Gets the crop region for the decoding options.\n\n @param options Pointer to the decoding options.\n @param cropRegion The target region will be cropped from the image.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 delete OH_DecodingOptions pointer.\n\n @param  options The OH_DecodingOptions pointer will be operated.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an ImageSource pointer.\n\n @param uri Indicates a pointer to the image source URI. Only a file URI or Base64 URI is accepted.\n @param uriSize Indicates the length of the image source URI.\n @param res Indicates a pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an void pointer\n\n @param fd Indicates the image source file descriptor.\n @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an void pointer\n\n @param data Indicates a pointer to the image source data. Only a formatted packet data or Base64 data is accepted.\n @param dataSize Indicates the size of the image source data.\n @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create an image source from data buffer. The data buffer is directly accessed by the image source\n object, 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 Length of the data buffer.\n @param imageSource Double pointer to the image source.\n @return Result code.\n {@link IMAGE_SUCCESS} if the execution is successful.\n {@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 an void pointer\n\n @param rawFile Indicates the raw file's file descriptor.\n @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Decodes an void pointer\n based on the specified {@link OH_DecodingOptions} struct.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param  options Indicates a pointer to the options for decoding the image source.\n For details, see {@link OH_DecodingOptions}.\n @param pixelmap Indicates a void pointer to the <b>Pixelmap</b> object obtained at the C++ native layer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr.\n         {@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 a PixelMap based on decoding parameters {@link OH_DecodingOptions}, the memory type used by the\n PixelMap can be specified by allocatorType {@link IMAGE_ALLOCATOR_TYPE}. 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 source Image Source.\n @param options Decoding parameters, such as the size, pixel format, and color space of the pixelMap.\n For details, see {@link OH_DecodingOptions}.\n @param allocator Indicate which memory type will be used by the returned PixelMap.\n @param pixelmap Decoded <b>Pixelmap</b> object.\n @return Error code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or picture is nullptr.\n         {@link IMAGE_BAD_SOURCE} data source exception.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} unsupported mime type.\n         {@link IMAGE_SOURCE_TOO_LARGE} image to large.\n         {@link IMAGE_SOURCE_UNSUPPORTED_ALLOCATOR_TYPE} unsupported allocator type,\n         e.g., use share memory to decode a HDR image as only DMA supported hdr metadata.\n         {@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS} unsupported options,\n         e.g, cannot convert image into desired pixel format.\n         {@link IMAGE_DECODE_FAILED} decode failed.\n         {@link IMAGE_SOURCE_ALLOC_FAILED} memory allocation failed.\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 Decodes an void pointer\n the <b>Pixelmap</b> objects at the C++ native layer\n based on the specified {@link OH_DecodingOptions} struct.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param  options Indicates a pointer to the options for decoding the image source.\n For details, see {@link OH_DecodingOptions}.\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 Indicates a size of resVecPixMap. User can get size from {@link OH_ImageSourceNative_GetFrameCount}.\n @return @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create Picture pointer from ImageSource\n based on the specified {@link OH_DecodingOptionsForPicture} struct.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param options Indicates a pointer to the options for decoding the image source.\n For details, see {@link OH_DecodingOptionsForPicture}.\n @param picture Indicates a void pointer to the <b>Picture</b> object obtained at the C++ native layer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or picture is nullptr.\n         {@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 Decodes an image at the specified index into a Picture object.\n\n @param source Pointer to the image source.\n @param index Image index.\n @param picture Double pointer to the Picture object obtained after decoding.\n @return Result code.\n {@link IMAGE_SUCCESS}: The execution is successful.\n {@link IMAGE_BAD_SOURCE}: The data source is abnormal.\n {@link IMAGE_SOURCE_UNSUPPORTED_MIMETYPE}: The image format is unsupported.\n {@link IMAGE_SOURCE_TOO_LARGE}: The image is too large.\n {@link IMAGE_SOURCE_UNSUPPORTED_OPTIONS}: The operation is not supported, for example, invalid index.\n {@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 delay time list from some <b>ImageSource</b> objects (such as GIF image sources).\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param delayTimeList Indicates a pointer to the delay time list obtained. It cannot be a null pointer.\n @param size Indicates a size of delayTimeList. User can get size from {@link OH_ImageSourceNative_GetFrameCount}.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 image source information from an <b>ImageSource</b> object by index.\n\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param index Indicates the index of the frame.\n @param info Indicates a pointer to the image source information obtained.\n For details, see {@link OH_ImageSource_Info}.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 from an <b>ImageSource</b> object.\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 Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} source is nullptr, or key is nullptr, or value is nullptr.\n         {@link IMAGE_ALLOC_FAILED} allocate memory failed.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Modifies the value of an image property of an <b>ImageSource</b> object.\n @param source Indicates a void pointer(from ImageSource pointer convert).\n @param key Indicates a pointer to the property. For details, see {@link Image_String}., key is an exif constant.\n Release after use ImageSource, see {@link OH_ImageSourceNative_Release}.\n @param value Indicates a pointer to the new value of the property.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 frames from an <b>ImageSource</b> object.\n\n @param source Indicates a pointer to the {@link OH_ImageSource} object at the C++ native layer.\n @param res Indicates a pointer to the number of frames obtained.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an <b>ImageSourc</b> object.\n\n @param source Indicates a ImageSource pointer.\n @return Returns one of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create a pointer for OH_DecodingOptionsForPicture struct.\n\n @param options The OH_DecodingOptionsForPicture pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 the desired auxiliary pictures of decoding options.\n\n @param options The OH_DecodingOptionsForPicture pointer will be operated.\n @param desiredAuxiliaryPictures The desired auxiliary pictures in DecodingOptionsForPicture.\n @param length The length of desired auxiliary pictures.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set decoding options desired auxiliary pictures.\n\n @param options The OH_DecodingOptionsForPicture pointer will be operated.\n @param desiredAuxiliaryPictures The desired auxiliary pictures will be set.\n @param length The length of desired auxiliary pictures.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an <b>DecodingOptionsForPicture</b> object.\n\n @param options Indicates a DecodingOptionsForPicture pointer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an array of the supported image formats.\n @param length Pointer to the length of the array.\n @return One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@link IMAGE_SOURCE_UNSUPPORTED_METADATA} if indicated metadata doesn't exist,\n         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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key, value or size is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if source, key or value is nullptr.\n         {@link IMAGE_SOURCE_UNSUPPORTED_MIME_TYPE} if query image property of current mimetype is not supported.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_SOURCE} Bad source.\n         {@link IMAGE_SOURCE_INVALID_PARAMETER} if the rawData object is invalid.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Returns One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Define a ImagePacker struct type, used for ImagePacker pointer controls.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImagePackerNative {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the image packing options.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_PackingOptions {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the image sequence packing options.\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 Create a pointer for PackingOptions struct.\n\n @param options The PackingOptions pointer will be operated.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
    pub fn OH_PackingOptions_Create(options: *mut *mut OH_PackingOptions) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get mime type for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param format the number of image format.The user can pass in a null pointer and zero size, we will allocate memory,\n but user must free memory after use.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or format is nullptr.\n         {@link IMAGE_ALLOC_FAILED} allocate memory failed.\n         {@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 Gets MIME type from OH_PackingOptions. The output format.data is null-terminated.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param format MimeType set in the OH_PackingOptions.\n @return Returns functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set format number for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param format the number of image format.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} options is nullptr, or format is nullptr.\n         {@link IMAGE_ALLOC_FAILED} allocate memory failed.\n         {@link IMAGE_COPY_FAILED} copy memory failed.\n @since 12"]
    pub fn OH_PackingOptions_SetMimeType(
        options: *mut OH_PackingOptions,
        format: *mut Image_MimeType,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get quality for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param quality The number of image quality.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set quality number for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param quality The number of image quality.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get needsPackProperties for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param needsPackProperties Whether the image properties can be saved, like Exif.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set needsPackProperties for OH_PackingOptions struct.\n\n @param options The OH_PackingOptions pointer will be operated.\n @param needsPackProperties Whether the image properties can be saved, like Exif.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get desiredDynamicRange for PackingOptions struct.\n\n @param options The PackingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. Pointer connot be null.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set desiredDynamicRange number for PackingOptions struct.\n\n @param options The PackingOptions pointer will be operated. Pointer connot be null.\n @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 delete OH_PackingOptions pointer.\n\n @param options The OH_PackingOptions pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create a pointer for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set FrameCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param frameCount The number of image frameCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get FrameCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param frameCount The number of image frameCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set DelayTimeList number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param delayTimeList The pointer of image delayTime list.\n @param delayTimeListLength The number of image delayTimeListLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get DelayTimeList number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param delayTimeList The pointer of image delayTime list.\n @param delayTimeListLength The number of image delayTimeListLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set DisposalTypes number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param disposalTypes The pointer of image disposalTypes.\n @param disposalTypesLength The number of image disposalTypesLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get DisposalTypes number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param disposalTypes The pointer of image disposalTypes.\n @param disposalTypesLength The number of image disposalTypesLength.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Set LoopCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param loopCount The number of image loopCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Get LoopCount number for OH_PackingOptionsForSequence struct.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @param loopCount The number of image loopCount.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 delete OH_PackingOptionsForSequence pointer.\n\n @param options The OH_PackingOptionsForSequence pointer will be operated.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 Create a pointer for OH_ImagePackerNative struct.\n\n @param imagePacker The imagePacker to be created.\n @return Returns {@link Image_ErrorCode}\n @since 12"]
    pub fn OH_ImagePackerNative_Create(
        imagePacker: *mut *mut OH_ImagePackerNative,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Encoding an <b>ImageSource</b> into the data with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param imageSource The imageSource to be packed.\n @param outData The output data buffer to store the packed image.\n @param size A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or imageSource is nullptr, or outData is nullptr.\n         {@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 Encoding a <b>Pixelmap</b> into the data with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param pixelmap The pixelmap to be packed.\n @param outData The output data buffer to store the packed image.\n @param size A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or pixelmap is nullptr, or outData is nullptr.\n         {@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 Encoding a <b>Picture</b> into the data with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param picture The picture to be packed.\n @param outData The output data buffer to store the packed image.\n @param size A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} imagePacker is nullptr, or picture is nullptr, or outData is nullptr,\n         or size is invalid.\n         {@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 Encoding a <b>PixelMap</b> sequence into the data\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptionsForSequence}.\n @param pixelmapSequence The pixelmap sequence to be packed.\n @param sequenceLength The pixelmap sequence size to be packed.\n @param outData The output data buffer to store the packed image.\n @param outDataSize A pointer to the size of the output data buffer.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or size/length is invalid\n         {@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 Encoding an <b>ImageSource</b> into the a file with fd with required format.\n\n @param imagePacker The image packer to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param imageSource The imageSource to be packed.\n @param fd Indicates a writable file descriptor.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or imageSource is nullptr, or fd is invalid.\n         {@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 Encoding a <b>Pixelmap</b> into the a file with fd with required format\n\n @param imagePacker The image packer to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param pixelmap The pixelmap to be packed.\n @param fd Indicates a writable file descriptor.\n @return @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr,\n         or pixelmap is nullptr, or fd is invalid.\n         {@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 Encoding a <b>Picture</b> into the a file with fd with required format.\n\n @param imagePacker The imagePacker to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptions}.\n @param picture The picture to be packed.\n @param fd Indicates a writable file descriptor.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} imagePacker is nullptr, or picture is nullptr, or fd is invalid.\n         {@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 Encoding a <b>PixelMap</b> sequence into the a file with fd\n\n @param imagePacker The image packer to use for packing.\n @param options Indicates the encoding {@link OH_PackingOptionsForSequence}.\n @param pixelmapSequence The pixelmap sequence to be packed.\n @param sequenceLength The pixelmap sequence size to be packed.\n @param fd Indicates a writable file descriptor.\n @return Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@link IMAGE_BAD_PARAMETER} one of the pointer type parameters is nullptr, or length is invalid\n         {@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 an imagePacker object.\n\n @param imagePacker A pointer to the image packer object to be released.\n @return Returns Image functions result code.\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 an array of the supported image formats.\n @param length Pointer to the length of the array.\n @return One of the following result codes:\n         {@link IMAGE_SUCCESS} if the execution is successful.\n         {@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 = " @brief Defines an <b>OH_ImageReceiverNative</b> object.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageReceiverNative {
    _unused: [u8; 0],
}
#[doc = " @brief Defines an image receiver options object.\n\n @since 12"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_ImageReceiverOptions {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the callbacks for images.\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 <b>OH_ImageReceiverOptions</b> object at the application layer.\n\n @param options Indicates the pointer to the <b>OH_ImageReceiverOptions</b> object obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_ALLOC_FAILED - if alloc failed.\n @since 12"]
    pub fn OH_ImageReceiverOptions_Create(
        options: *mut *mut OH_ImageReceiverOptions,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get size of an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param size Indicates the value of the {@Link Image_Size} object will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 Set size of an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param size Indicates the value of the {@link Image_Size} object will be seted.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 Get capacity from an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param capacity Indicates the pointer to capacity will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 Set capacity of an {@link OH_ImageReceiverOptions} object.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @param capacity Indicates the value of capacity will be seted.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 {@link OH_ImageReceiverOptions} object.\n It is used to release the object {@link OH_ImageReceiverOptions}.\n\n @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 <b>OH_ImageReceiverNative</b> object at the application layer.\n\n @param options Indicates the options for setting the <b>OH_ImageReceiverNative</b> object.\n @param receiver Indicates the pointer to the <b>OH_ImageReceiverNative</b> object obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@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 receiver ID through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param surfaceId Indicates the pointer to the surfaceID will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@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 {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param image Indicates the pointer to an <b>OH_ImageNative</b> object at the application layer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n returns {@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 {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param image Indicates the pointer to an <b>OH_ImageNative</b> object at the application layer.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if bad parameter.\n returns {@link Image_ErrorCode} IMAGE_UNKNOWN_ERROR - inner unknown error.\n returns {@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 an {@link OH_ImageReceiver_OnCallback} callback event.\n\n This callback event is triggered whenever a new image is received.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param callback Indicates the {@link OH_ImageReceiver_OnCallback} callback event to register.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 event.\n\n Turn off the callback witch triggered by {@link OH_ImageReceiverNative_On}.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 = " Registers an {@link OH_ImageReceiver_ImageArriveCallback} callback.\n\n @param receiver Pointer to an OH_ImageReceiverNative object that processes the callback.\n @param callback OH_ImageReceiver_ImageArriveCallback to register.\n @param userData Pointer to the user data passed to the callback.\n @return Result code. {@link Image_ErrorCode} IMAGE_SUCCESS is returned if the operation is successful.\n {@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 <b>OH_ImageReceiverNative</b> object that processes the callback.\n @param callback <b>OH_ImageReceiver_ImageArriveCallback</b> callback to unregister.\n @return {@link Image_ErrorCode} IMAGE_SUCCESS - Operation succeeded.\n {@link Image_ErrorCode} IMAGE_RECEIVER_INVALID_PARAMETER - <b>receiver</b> is empty or <b>callback</b> is not\n registered.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_ImageReceiverNative_OffImageArrive(
        receiver: *mut OH_ImageReceiverNative,
        callback: OH_ImageReceiver_ImageArriveCallback,
    ) -> Image_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the size of the image receiver through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param size Indicates the pointer to the {@link Image_Size} object will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 the image receiver through an {@link OH_ImageReceiverNative} object.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @param capacity Indicates the pointer to the capacity will be obtained.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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 {@link OH_ImageReceiverNative} object.\n\n This API is not used to release an <b>ImageReceiver2</b> object at the application layer.\n\n @param receiver Indicates the pointer to an {@link OH_ImageReceiverNative} object.\n @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.\n returns {@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;
}