顾海波

【需求】适配鸿蒙照片转rgb

@@ -5,16 +5,16 @@ packages: @@ -5,16 +5,16 @@ packages:
5 dependency: transitive 5 dependency: transitive
6 description: 6 description:
7 name: archive 7 name: archive
8 - sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a"  
9 - url: "https://pub.dev" 8 + sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742"
  9 + url: "https://pub.flutter-io.cn"
10 source: hosted 10 source: hosted
11 - version: "3.3.7" 11 + version: "4.0.4"
12 async: 12 async:
13 dependency: transitive 13 dependency: transitive
14 description: 14 description:
15 name: async 15 name: async
16 sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 16 sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
17 - url: "https://pub.dev" 17 + url: "https://pub.flutter-io.cn"
18 source: hosted 18 source: hosted
19 version: "2.11.0" 19 version: "2.11.0"
20 boolean_selector: 20 boolean_selector:
@@ -22,55 +22,55 @@ packages: @@ -22,55 +22,55 @@ packages:
22 description: 22 description:
23 name: boolean_selector 23 name: boolean_selector
24 sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 24 sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
25 - url: "https://pub.dev" 25 + url: "https://pub.flutter-io.cn"
26 source: hosted 26 source: hosted
27 version: "2.1.1" 27 version: "2.1.1"
28 camera: 28 camera:
29 dependency: "direct main" 29 dependency: "direct main"
30 description: 30 description:
31 name: camera 31 name: camera
32 - sha256: b4cede7c66f44fa476272d21bfe143d5f32e75de1ea56f737e3eaf982da23bab  
33 - url: "https://pub.dev" 32 + sha256: dfa8fc5a1adaeb95e7a54d86a5bd56f4bb0e035515354c8ac6d262e35cec2ec8
  33 + url: "https://pub.flutter-io.cn"
34 source: hosted 34 source: hosted
35 - version: "0.10.5+3" 35 + version: "0.10.6"
36 camera_android: 36 camera_android:
37 dependency: transitive 37 dependency: transitive
38 description: 38 description:
39 name: camera_android 39 name: camera_android
40 - sha256: ffbcf60f107776e0bfda7ed787e7ae6ec7f4cb962598973756daa2ad70d8f191  
41 - url: "https://pub.dev" 40 + sha256: "32f04948a284b71d938fe275616faf4957d07f9b3aab8021bfc8c418301a289e"
  41 + url: "https://pub.flutter-io.cn"
42 source: hosted 42 source: hosted
43 - version: "0.10.8+7" 43 + version: "0.10.9+11"
44 camera_avfoundation: 44 camera_avfoundation:
45 dependency: transitive 45 dependency: transitive
46 description: 46 description:
47 name: camera_avfoundation 47 name: camera_avfoundation
48 - sha256: "332747f20cf911980e38c8442108102d4456752711781108fda237635baf362c"  
49 - url: "https://pub.dev" 48 + sha256: ba48b65a3a97004276ede882e6b838d9667642ff462c95a8bb57ca8a82b6bd25
  49 + url: "https://pub.flutter-io.cn"
50 source: hosted 50 source: hosted
51 - version: "0.9.13+3" 51 + version: "0.9.18+11"
52 camera_platform_interface: 52 camera_platform_interface:
53 dependency: transitive 53 dependency: transitive
54 description: 54 description:
55 name: camera_platform_interface 55 name: camera_platform_interface
56 - sha256: "60fa0bb62a4f3bf3a7c413e31e4cd01b69c779ccc8e4668904a24581b86c316b"  
57 - url: "https://pub.dev" 56 + sha256: "953e7baed3a7c8fae92f7200afeb2be503ff1a17c3b4e4ed7b76f008c2810a31"
  57 + url: "https://pub.flutter-io.cn"
58 source: hosted 58 source: hosted
59 - version: "2.5.1" 59 + version: "2.9.0"
60 camera_web: 60 camera_web:
61 dependency: transitive 61 dependency: transitive
62 description: 62 description:
63 name: camera_web 63 name: camera_web
64 - sha256: "894df2a4e9ddd77ffecee9553d5980eeabb8bf09d98e53934859e67dc367933b"  
65 - url: "https://pub.dev" 64 + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f"
  65 + url: "https://pub.flutter-io.cn"
66 source: hosted 66 source: hosted
67 - version: "0.3.2+1" 67 + version: "0.3.5"
68 characters: 68 characters:
69 dependency: transitive 69 dependency: transitive
70 description: 70 description:
71 name: characters 71 name: characters
72 sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 72 sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
73 - url: "https://pub.dev" 73 + url: "https://pub.flutter-io.cn"
74 source: hosted 74 source: hosted
75 version: "1.3.0" 75 version: "1.3.0"
76 clock: 76 clock:
@@ -78,65 +78,57 @@ packages: @@ -78,65 +78,57 @@ packages:
78 description: 78 description:
79 name: clock 79 name: clock
80 sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 80 sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
81 - url: "https://pub.dev" 81 + url: "https://pub.flutter-io.cn"
82 source: hosted 82 source: hosted
83 version: "1.1.1" 83 version: "1.1.1"
84 collection: 84 collection:
85 dependency: transitive 85 dependency: transitive
86 description: 86 description:
87 name: collection 87 name: collection
88 - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687  
89 - url: "https://pub.dev" 88 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
  89 + url: "https://pub.flutter-io.cn"
90 source: hosted 90 source: hosted
91 - version: "1.17.2"  
92 - convert:  
93 - dependency: transitive  
94 - description:  
95 - name: convert  
96 - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"  
97 - url: "https://pub.dev"  
98 - source: hosted  
99 - version: "3.1.1" 91 + version: "1.18.0"
100 cross_file: 92 cross_file:
101 dependency: transitive 93 dependency: transitive
102 description: 94 description:
103 name: cross_file 95 name: cross_file
104 - sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"  
105 - url: "https://pub.dev" 96 + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
  97 + url: "https://pub.flutter-io.cn"
106 source: hosted 98 source: hosted
107 - version: "0.3.3+4" 99 + version: "0.3.4+2"
108 crypto: 100 crypto:
109 dependency: transitive 101 dependency: transitive
110 description: 102 description:
111 name: crypto 103 name: crypto
112 - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab  
113 - url: "https://pub.dev" 104 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
  105 + url: "https://pub.flutter-io.cn"
114 source: hosted 106 source: hosted
115 - version: "3.0.3" 107 + version: "3.0.6"
116 cupertino_icons: 108 cupertino_icons:
117 dependency: "direct main" 109 dependency: "direct main"
118 description: 110 description:
119 name: cupertino_icons 111 name: cupertino_icons
120 - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be  
121 - url: "https://pub.dev" 112 + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
  113 + url: "https://pub.flutter-io.cn"
122 source: hosted 114 source: hosted
123 - version: "1.0.5" 115 + version: "1.0.8"
124 fake_async: 116 fake_async:
125 dependency: transitive 117 dependency: transitive
126 description: 118 description:
127 name: fake_async 119 name: fake_async
128 sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 120 sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
129 - url: "https://pub.dev" 121 + url: "https://pub.flutter-io.cn"
130 source: hosted 122 source: hosted
131 version: "1.3.1" 123 version: "1.3.1"
132 ffi: 124 ffi:
133 dependency: transitive 125 dependency: transitive
134 description: 126 description:
135 name: ffi 127 name: ffi
136 - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"  
137 - url: "https://pub.dev" 128 + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
  129 + url: "https://pub.flutter-io.cn"
138 source: hosted 130 source: hosted
139 - version: "2.1.0" 131 + version: "2.1.3"
140 flutter: 132 flutter:
141 dependency: "direct main" 133 dependency: "direct main"
142 description: flutter 134 description: flutter
@@ -146,18 +138,18 @@ packages: @@ -146,18 +138,18 @@ packages:
146 dependency: "direct dev" 138 dependency: "direct dev"
147 description: 139 description:
148 name: flutter_lints 140 name: flutter_lints
149 - sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"  
150 - url: "https://pub.dev" 141 + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
  142 + url: "https://pub.flutter-io.cn"
151 source: hosted 143 source: hosted
152 - version: "2.0.2" 144 + version: "2.0.3"
153 flutter_plugin_android_lifecycle: 145 flutter_plugin_android_lifecycle:
154 dependency: transitive 146 dependency: transitive
155 description: 147 description:
156 name: flutter_plugin_android_lifecycle 148 name: flutter_plugin_android_lifecycle
157 - sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360"  
158 - url: "https://pub.dev" 149 + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda"
  150 + url: "https://pub.flutter-io.cn"
159 source: hosted 151 source: hosted
160 - version: "2.0.15" 152 + version: "2.0.22"
161 flutter_test: 153 flutter_test:
162 dependency: "direct dev" 154 dependency: "direct dev"
163 description: flutter 155 description: flutter
@@ -172,103 +164,111 @@ packages: @@ -172,103 +164,111 @@ packages:
172 dependency: "direct main" 164 dependency: "direct main"
173 description: 165 description:
174 name: image 166 name: image
175 - sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf  
176 - url: "https://pub.dev" 167 + sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3"
  168 + url: "https://pub.flutter-io.cn"
  169 + source: hosted
  170 + version: "4.5.3"
  171 + leak_tracker:
  172 + dependency: transitive
  173 + description:
  174 + name: leak_tracker
  175 + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
  176 + url: "https://pub.flutter-io.cn"
  177 + source: hosted
  178 + version: "10.0.4"
  179 + leak_tracker_flutter_testing:
  180 + dependency: transitive
  181 + description:
  182 + name: leak_tracker_flutter_testing
  183 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
  184 + url: "https://pub.flutter-io.cn"
177 source: hosted 185 source: hosted
178 - version: "4.0.17"  
179 - js: 186 + version: "3.0.3"
  187 + leak_tracker_testing:
180 dependency: transitive 188 dependency: transitive
181 description: 189 description:
182 - name: js  
183 - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3  
184 - url: "https://pub.dev" 190 + name: leak_tracker_testing
  191 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
  192 + url: "https://pub.flutter-io.cn"
185 source: hosted 193 source: hosted
186 - version: "0.6.7" 194 + version: "3.0.1"
187 lints: 195 lints:
188 dependency: transitive 196 dependency: transitive
189 description: 197 description:
190 name: lints 198 name: lints
191 sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" 199 sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
192 - url: "https://pub.dev" 200 + url: "https://pub.flutter-io.cn"
193 source: hosted 201 source: hosted
194 version: "2.1.1" 202 version: "2.1.1"
195 matcher: 203 matcher:
196 dependency: transitive 204 dependency: transitive
197 description: 205 description:
198 name: matcher 206 name: matcher
199 - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"  
200 - url: "https://pub.dev" 207 + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
  208 + url: "https://pub.flutter-io.cn"
201 source: hosted 209 source: hosted
202 - version: "0.12.16" 210 + version: "0.12.16+1"
203 material_color_utilities: 211 material_color_utilities:
204 dependency: transitive 212 dependency: transitive
205 description: 213 description:
206 name: material_color_utilities 214 name: material_color_utilities
207 - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"  
208 - url: "https://pub.dev" 215 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
  216 + url: "https://pub.flutter-io.cn"
209 source: hosted 217 source: hosted
210 - version: "0.5.0" 218 + version: "0.8.0"
211 meta: 219 meta:
212 dependency: transitive 220 dependency: transitive
213 description: 221 description:
214 name: meta 222 name: meta
215 - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"  
216 - url: "https://pub.dev" 223 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
  224 + url: "https://pub.flutter-io.cn"
217 source: hosted 225 source: hosted
218 - version: "1.9.1" 226 + version: "1.12.0"
219 path: 227 path:
220 dependency: transitive 228 dependency: transitive
221 description: 229 description:
222 name: path 230 name: path
223 - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"  
224 - url: "https://pub.dev" 231 + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
  232 + url: "https://pub.flutter-io.cn"
225 source: hosted 233 source: hosted
226 - version: "1.8.3" 234 + version: "1.9.0"
227 petitparser: 235 petitparser:
228 dependency: transitive 236 dependency: transitive
229 description: 237 description:
230 name: petitparser 238 name: petitparser
231 - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750  
232 - url: "https://pub.dev" 239 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
  240 + url: "https://pub.flutter-io.cn"
233 source: hosted 241 source: hosted
234 - version: "5.4.0" 242 + version: "6.0.2"
235 plugin_platform_interface: 243 plugin_platform_interface:
236 dependency: transitive 244 dependency: transitive
237 description: 245 description:
238 name: plugin_platform_interface 246 name: plugin_platform_interface
239 - sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd"  
240 - url: "https://pub.dev" 247 + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
  248 + url: "https://pub.flutter-io.cn"
241 source: hosted 249 source: hosted
242 - version: "2.1.5"  
243 - pointycastle: 250 + version: "2.1.8"
  251 + posix:
244 dependency: transitive 252 dependency: transitive
245 description: 253 description:
246 - name: pointycastle  
247 - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"  
248 - url: "https://pub.dev" 254 + name: posix
  255 + sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
  256 + url: "https://pub.flutter-io.cn"
249 source: hosted 257 source: hosted
250 - version: "3.7.3" 258 + version: "6.0.1"
251 processing_camera_image: 259 processing_camera_image:
252 dependency: "direct main" 260 dependency: "direct main"
253 description: 261 description:
254 path: ".." 262 path: ".."
255 relative: true 263 relative: true
256 source: path 264 source: path
257 - version: "0.0.10"  
258 - quiver:  
259 - dependency: transitive  
260 - description:  
261 - name: quiver  
262 - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47  
263 - url: "https://pub.dev"  
264 - source: hosted  
265 - version: "3.2.1" 265 + version: "0.0.12"
266 rxdart: 266 rxdart:
267 dependency: "direct main" 267 dependency: "direct main"
268 description: 268 description:
269 name: rxdart 269 name: rxdart
270 sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" 270 sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
271 - url: "https://pub.dev" 271 + url: "https://pub.flutter-io.cn"
272 source: hosted 272 source: hosted
273 version: "0.27.7" 273 version: "0.27.7"
274 sky_engine: 274 sky_engine:
@@ -281,39 +281,39 @@ packages: @@ -281,39 +281,39 @@ packages:
281 description: 281 description:
282 name: source_span 282 name: source_span
283 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 283 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
284 - url: "https://pub.dev" 284 + url: "https://pub.flutter-io.cn"
285 source: hosted 285 source: hosted
286 version: "1.10.0" 286 version: "1.10.0"
287 stack_trace: 287 stack_trace:
288 dependency: transitive 288 dependency: transitive
289 description: 289 description:
290 name: stack_trace 290 name: stack_trace
291 - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5  
292 - url: "https://pub.dev" 291 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
  292 + url: "https://pub.flutter-io.cn"
293 source: hosted 293 source: hosted
294 - version: "1.11.0" 294 + version: "1.11.1"
295 stream_channel: 295 stream_channel:
296 dependency: transitive 296 dependency: transitive
297 description: 297 description:
298 name: stream_channel 298 name: stream_channel
299 - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"  
300 - url: "https://pub.dev" 299 + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
  300 + url: "https://pub.flutter-io.cn"
301 source: hosted 301 source: hosted
302 - version: "2.1.1" 302 + version: "2.1.2"
303 stream_transform: 303 stream_transform:
304 dependency: transitive 304 dependency: transitive
305 description: 305 description:
306 name: stream_transform 306 name: stream_transform
307 - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"  
308 - url: "https://pub.dev" 307 + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871
  308 + url: "https://pub.flutter-io.cn"
309 source: hosted 309 source: hosted
310 - version: "2.1.0" 310 + version: "2.1.1"
311 string_scanner: 311 string_scanner:
312 dependency: transitive 312 dependency: transitive
313 description: 313 description:
314 name: string_scanner 314 name: string_scanner
315 sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 315 sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
316 - url: "https://pub.dev" 316 + url: "https://pub.flutter-io.cn"
317 source: hosted 317 source: hosted
318 version: "1.2.0" 318 version: "1.2.0"
319 term_glyph: 319 term_glyph:
@@ -321,23 +321,23 @@ packages: @@ -321,23 +321,23 @@ packages:
321 description: 321 description:
322 name: term_glyph 322 name: term_glyph
323 sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 323 sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
324 - url: "https://pub.dev" 324 + url: "https://pub.flutter-io.cn"
325 source: hosted 325 source: hosted
326 version: "1.2.1" 326 version: "1.2.1"
327 test_api: 327 test_api:
328 dependency: transitive 328 dependency: transitive
329 description: 329 description:
330 name: test_api 330 name: test_api
331 - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"  
332 - url: "https://pub.dev" 331 + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
  332 + url: "https://pub.flutter-io.cn"
333 source: hosted 333 source: hosted
334 - version: "0.6.0" 334 + version: "0.7.0"
335 typed_data: 335 typed_data:
336 dependency: transitive 336 dependency: transitive
337 description: 337 description:
338 name: typed_data 338 name: typed_data
339 sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c 339 sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
340 - url: "https://pub.dev" 340 + url: "https://pub.flutter-io.cn"
341 source: hosted 341 source: hosted
342 version: "1.3.2" 342 version: "1.3.2"
343 vector_math: 343 vector_math:
@@ -345,25 +345,33 @@ packages: @@ -345,25 +345,33 @@ packages:
345 description: 345 description:
346 name: vector_math 346 name: vector_math
347 sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 347 sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
348 - url: "https://pub.dev" 348 + url: "https://pub.flutter-io.cn"
349 source: hosted 349 source: hosted
350 version: "2.1.4" 350 version: "2.1.4"
  351 + vm_service:
  352 + dependency: transitive
  353 + description:
  354 + name: vm_service
  355 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
  356 + url: "https://pub.flutter-io.cn"
  357 + source: hosted
  358 + version: "14.2.1"
351 web: 359 web:
352 dependency: transitive 360 dependency: transitive
353 description: 361 description:
354 name: web 362 name: web
355 - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10  
356 - url: "https://pub.dev" 363 + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
  364 + url: "https://pub.flutter-io.cn"
357 source: hosted 365 source: hosted
358 - version: "0.1.4-beta" 366 + version: "1.1.1"
359 xml: 367 xml:
360 dependency: transitive 368 dependency: transitive
361 description: 369 description:
362 name: xml 370 name: xml
363 - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"  
364 - url: "https://pub.dev" 371 + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
  372 + url: "https://pub.flutter-io.cn"
365 source: hosted 373 source: hosted
366 - version: "6.3.0" 374 + version: "6.5.0"
367 sdks: 375 sdks:
368 - dart: ">=3.1.0-185.0.dev <4.0.0"  
369 - flutter: ">=3.7.0" 376 + dart: ">=3.4.0 <4.0.0"
  377 + flutter: ">=3.22.0"
@@ -315,4 +315,56 @@ uint32_t *convert_image_nv12_to_rgb(uint8_t *plane0, uint8_t *plane1, int bytesP @@ -315,4 +315,56 @@ uint32_t *convert_image_nv12_to_rgb(uint8_t *plane0, uint8_t *plane1, int bytesP
315 { 315 {
316 return _rotaion_image_32bit(src, angleRotation, width, height, background_color); 316 return _rotaion_image_32bit(src, angleRotation, width, height, background_color);
317 } 317 }
  318 +}
  319 +
  320 +uint32_t *convert_image_nv21_to_rgb(uint8_t *plane0, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal)
  321 +{
  322 + int x, y, uvIndex, index;
  323 + int yp, up, vp;
  324 + int r, g, b;
  325 + int rt, gt, bt;
  326 + int frameSize = width * height;
  327 +
  328 + uint32_t *src = malloc(sizeof(uint32_t) * (width * height));
  329 +
  330 + for (x = 0; x < width; ++x)
  331 + {
  332 + for (y = 0; y < height; ++y)
  333 + {
  334 +
  335 + // 获取 Y 分量
  336 + index = y * width + x;
  337 + yp = plane0[index] & 0xFF;
  338 + // 获取 U 和 V 分量
  339 + uvIndex = frameSize + (y / 2) * width + (x / 2) * 2;
  340 + vp = plane0[uvIndex] & 0xFF;
  341 + up = plane0[uvIndex + 1] & 0xFF;
  342 +
  343 + // YUV 转 RGB
  344 + rt = (int)(yp + 1.402 * (vp - 128));
  345 + gt = (int)(yp - 0.344 * (up - 128) - 0.714 * (vp - 128));
  346 + bt = (int)(yp + 1.772 * (up - 128));
  347 +
  348 + r = _clamp(0, 255, rt);
  349 + g = _clamp(0, 255, gt);
  350 + b = _clamp(0, 255, bt);
  351 + src[x + y * width] = (HEXFF << 24) | (b << 16) | (g << 8) | r;
  352 + }
  353 + }
  354 + if (flip_horizontal)
  355 + {
  356 + _flip_horizontal_32bit(width, height, src);
  357 + }
  358 + if (flip_vertical)
  359 + {
  360 + _flip_vertical_32bit(width, height, src);
  361 + }
  362 + if (angleRotation == 0)
  363 + {
  364 + return src;
  365 + }
  366 + else
  367 + {
  368 + return _rotaion_image_32bit(src, angleRotation, width, height, background_color);
  369 + }
318 } 370 }
@@ -16,7 +16,7 @@ extern "C" @@ -16,7 +16,7 @@ extern "C"
16 uint32_t *convert_image_nv12_to_rgb(uint8_t *plane0, uint8_t *plane1, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal); 16 uint32_t *convert_image_nv12_to_rgb(uint8_t *plane0, uint8_t *plane1, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal);
17 uint32_t *convert_image_yuv420p_to_gray(uint8_t *plane0, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal); 17 uint32_t *convert_image_yuv420p_to_gray(uint8_t *plane0, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal);
18 uint32_t *convert_image_yuv420p_to_rgb(uint8_t *plane0, uint8_t *plane1, uint8_t *plane2, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal); 18 uint32_t *convert_image_yuv420p_to_rgb(uint8_t *plane0, uint8_t *plane1, uint8_t *plane2, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal);
19 - 19 + uint32_t *convert_image_nv21_to_rgb(uint8_t *plane0, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal);
20 #ifdef __cplusplus 20 #ifdef __cplusplus
21 } 21 }
22 #endif 22 #endif
@@ -57,3 +57,12 @@ typedef ConvertImageNV12ToRGBC = Pointer<Uint32> Function(Pointer<Uint8>, @@ -57,3 +57,12 @@ typedef ConvertImageNV12ToRGBC = Pointer<Uint32> Function(Pointer<Uint8>,
57 Pointer<Uint8>, Int32, Int32, Int32, Int32, Double, Uint32, Bool, Bool); 57 Pointer<Uint8>, Int32, Int32, Int32, Int32, Double, Uint32, Bool, Bool);
58 typedef ConvertImageNV12ToRGBFlutter = Pointer<Uint32> Function(Pointer<Uint8>, 58 typedef ConvertImageNV12ToRGBFlutter = Pointer<Uint32> Function(Pointer<Uint8>,
59 Pointer<Uint8>, int, int, int, int, double, int, bool, bool); 59 Pointer<Uint8>, int, int, int, int, double, int, bool, bool);
  60 +
  61 +
  62 +/*
  63 + native convert camera image NV21 to rgb
  64 +*/
  65 +typedef ConvertImageNV21ToRGBC = Pointer<Uint32> Function(Pointer<Uint8>,
  66 + Int32, Int32, Double, Uint32, Bool, Bool);
  67 +typedef ConvertImageNV21ToRGBFlutter = Pointer<Uint32> Function(Pointer<Uint8>,
  68 + int, int, double, int, bool, bool);
@@ -33,6 +33,17 @@ abstract class ProcessingCameraImage { @@ -33,6 +33,17 @@ abstract class ProcessingCameraImage {
33 bool isFlipVectical = false, 33 bool isFlipVectical = false,
34 }); 34 });
35 35
  36 + /// [processCameraImageToRGBOHOS]. for IOS with NV21.
  37 + imglib.Image? processCameraImageToRGBOHOS({
  38 + int? width,
  39 + int? height,
  40 + Uint8List? plane0,
  41 + double? rotationAngle,
  42 + int backGroundColor = 0xFFFFFFFF,
  43 + bool isFlipHoriozntal = false,
  44 + bool isFlipVectical = false,
  45 + });
  46 +
36 /// [processCameraImageToRGBIOS]. for IOS with NV12. 47 /// [processCameraImageToRGBIOS]. for IOS with NV12.
37 imglib.Image? processCameraImageToRGBIOS({ 48 imglib.Image? processCameraImageToRGBIOS({
38 int? width, 49 int? width,
@@ -16,6 +16,7 @@ class IProcessingCameraImage implements ProcessingCameraImage { @@ -16,6 +16,7 @@ class IProcessingCameraImage implements ProcessingCameraImage {
16 late final ConvertImageYuv420pToGray8BitFlutter 16 late final ConvertImageYuv420pToGray8BitFlutter
17 _convertImageYuv420pToGray8Bit; 17 _convertImageYuv420pToGray8Bit;
18 late final ConvertImageNV12ToRGBFlutter _convertImageNV12ToRGB; 18 late final ConvertImageNV12ToRGBFlutter _convertImageNV12ToRGB;
  19 + late final ConvertImageNV21ToRGBFlutter _convertImageNV21ToRGB;
19 20
20 factory IProcessingCameraImage() { 21 factory IProcessingCameraImage() {
21 _instance ??= IProcessingCameraImage._(); 22 _instance ??= IProcessingCameraImage._();
@@ -44,6 +45,11 @@ class IProcessingCameraImage implements ProcessingCameraImage { @@ -44,6 +45,11 @@ class IProcessingCameraImage implements ProcessingCameraImage {
44 .lookup<NativeFunction<ConvertImageNV12ToRGBC>>( 45 .lookup<NativeFunction<ConvertImageNV12ToRGBC>>(
45 'convert_image_nv12_to_rgb') 46 'convert_image_nv12_to_rgb')
46 .asFunction<ConvertImageNV12ToRGBFlutter>(); 47 .asFunction<ConvertImageNV12ToRGBFlutter>();
  48 +
  49 + _convertImageNV21ToRGB = convertImageLib
  50 + .lookup<NativeFunction<ConvertImageNV21ToRGBC>>(
  51 + 'convert_image_nv21_to_rgb')
  52 + .asFunction<ConvertImageNV21ToRGBFlutter>();
47 } 53 }
48 54
49 /// [ProcessCameraImageToRGB]. 55 /// [ProcessCameraImageToRGB].
@@ -229,6 +235,55 @@ class IProcessingCameraImage implements ProcessingCameraImage { @@ -229,6 +235,55 @@ class IProcessingCameraImage implements ProcessingCameraImage {
229 ); 235 );
230 } 236 }
231 237
  238 +
  239 + /// [processCameraImageToRGBIOS]. for IOS with YUV420.
  240 + @override
  241 + imglib.Image? processCameraImageToRGBOHOS({
  242 + int? width,
  243 + int? height,
  244 + Uint8List? plane0,
  245 + double? rotationAngle,
  246 + int backGroundColor = 0xFFFFFFFF,
  247 + bool isFlipHoriozntal = false,
  248 + bool isFlipVectical = false,
  249 + }) {
  250 + if (width == null ||
  251 + height == null ||
  252 + plane0 == null ||
  253 + plane0.isEmpty) {
  254 + return null;
  255 + }
  256 + rotationAngle ??= 0;
  257 +
  258 +
  259 + Pointer<Uint8> p = ffi.malloc.allocate(plane0.length);
  260 +
  261 + Uint8List pointerList = p.asTypedList(plane0.length);
  262 + pointerList.setRange(0, plane0.length, plane0);
  263 +
  264 + Pointer<Uint32> imgP = _convertImageNV21ToRGB(
  265 + p,
  266 + width,
  267 + height,
  268 + rotationAngle,
  269 + backGroundColor,
  270 + isFlipVectical,
  271 + isFlipHoriozntal,
  272 + );
  273 +
  274 + final imgData = imgP.asTypedList(width * height);
  275 + imglib.Image img = imglib.Image.fromBytes(
  276 + bytes: imgData.buffer,
  277 + width: width,
  278 + height: height,
  279 + order: imglib.ChannelOrder.rgba);
  280 +
  281 + ffi.malloc.free(p);
  282 + ffi.malloc.free(imgP);
  283 +
  284 + return img;
  285 + }
  286 +
232 /// [processCameraImageToRGBIOS]. for IOS with YUV420. 287 /// [processCameraImageToRGBIOS]. for IOS with YUV420.
233 @override 288 @override
234 imglib.Image? processCameraImageToRGBIOS({ 289 imglib.Image? processCameraImageToRGBIOS({
@@ -11,5 +11,5 @@ endif() @@ -11,5 +11,5 @@ endif()
11 include_directories(${NATIVERENDER_ROOT_PATH} 11 include_directories(${NATIVERENDER_ROOT_PATH}
12 ${NATIVERENDER_ROOT_PATH}/include) 12 ${NATIVERENDER_ROOT_PATH}/include)
13 13
14 -add_library(convertImage SHARED napi_init.cpp converter.c) 14 +add_library(convertImage SHARED napi_init.cpp ../../../../ios/native/converter.c)
15 target_link_libraries(convertImage PUBLIC libace_napi.z.so) 15 target_link_libraries(convertImage PUBLIC libace_napi.z.so)
1 -//  
2 -// Created by thuanpm on 4/22/22.  
3 -//  
4 -  
5 -#include <stdio.h>  
6 -#include "converter.h"  
7 -#include <math.h>  
8 -#include <stdlib.h>  
9 -  
10 -#define HEXFF 255  
11 -  
12 -int _clamp(int lower, int higher, int val)  
13 -{  
14 - if (val < lower)  
15 - return 0;  
16 - else if (val > higher)  
17 - return 255;  
18 - else  
19 - return val;  
20 -}  
21 -  
22 -uint32_t *_rotaion_image_32bit(uint32_t *src, double angle, int width, int height, uint32_t background_color)  
23 -{  
24 - double rad = (angle * M_PI / 180.0);  
25 - double sinVal = sin(rad);  
26 - double cosVal = cos(rad);  
27 - int new_width = (int)(fabs(sinVal * height) + fabs(cosVal * width));  
28 - int new_height = (int)(fabs(sinVal * width) + fabs(cosVal * height));  
29 - double w2 = 0.5 * width;  
30 - double h2 = 0.5 * height;  
31 - double dw2 = 0.5 * new_width;  
32 - double dh2 = 0.5 * new_height;  
33 -  
34 - uint32_t *dest = malloc(sizeof(uint32_t) * (new_width * new_height));  
35 -  
36 - for (int i = 0; i < new_height; ++i)  
37 - {  
38 - for (int j = 0; j < new_width; ++j)  
39 - {  
40 - int oriX = (int)(w2 + (j - dw2) * cosVal + (i - dh2) * sinVal);  
41 - int oriY = (int)(h2 - (j - dw2) * sinVal + (i - dh2) * cosVal);  
42 - if (oriX >= 0 && oriX < width && oriY >= 0 && oriY < height)  
43 - {  
44 - dest[i * new_width + j] = src[oriX + oriY * width];  
45 - }  
46 - else  
47 - {  
48 - dest[i * new_width + j] = background_color;  
49 - }  
50 - }  
51 - }  
52 - free(src);  
53 - return dest;  
54 -}  
55 -  
56 -uint8_t *_rotaion_image_8bit(uint8_t *src, double angle, int width, int height, uint8_t background_color)  
57 -{  
58 - double rad = (angle * M_PI / 180.0);  
59 - double sinVal = sin(rad);  
60 - double cosVal = cos(rad);  
61 - int new_width = (int)(fabs(sinVal * height) + fabs(cosVal * width));  
62 - int new_height = (int)(fabs(sinVal * width) + fabs(cosVal * height));  
63 - double w2 = 0.5 * width;  
64 - double h2 = 0.5 * height;  
65 - double dw2 = 0.5 * new_width;  
66 - double dh2 = 0.5 * new_height;  
67 -  
68 - uint8_t *dest = malloc(sizeof(uint8_t) * (new_width * new_height));  
69 -  
70 - for (int i = 0; i < new_height; ++i)  
71 - {  
72 - for (int j = 0; j < new_width; ++j)  
73 - {  
74 - int oriX = (int)(w2 + (j - dw2) * cosVal + (i - dh2) * sinVal);  
75 - int oriY = (int)(h2 - (j - dw2) * sinVal + (i - dh2) * cosVal);  
76 - if (oriX >= 0 && oriX < width && oriY >= 0 && oriY < height)  
77 - {  
78 - dest[i * new_width + j] = src[oriX + oriY * width];  
79 - }  
80 - else  
81 - {  
82 - dest[i * new_width + j] = background_color;  
83 - }  
84 - }  
85 - }  
86 - free(src);  
87 - return dest;  
88 -}  
89 -  
90 -void _flip_horizontal_32bit(int width, int height, uint32_t *src)  
91 -{  
92 - int dw2 = (int)(width / 2);  
93 - for (int y = 0; y < height; ++y)  
94 - {  
95 - int y1 = (y * width);  
96 - for (int x = 0; x < dw2; ++x)  
97 - {  
98 - int x2 = (width - 1 - x);  
99 - uint32_t t = src[y1 + x2];  
100 - src[y1 + x2] = src[y1 + x];  
101 - src[y1 + x] = t;  
102 - }  
103 - }  
104 -}  
105 -  
106 -void _flip_horizontal_8bit(int width, int height, uint8_t *src)  
107 -{  
108 - int dw2 = (int)(width / 2);  
109 - for (int y = 0; y < height; ++y)  
110 - {  
111 - int y1 = (y * width);  
112 - for (int x = 0; x < dw2; ++x)  
113 - {  
114 - int x2 = (width - 1 - x);  
115 - uint8_t t = src[y1 + x2];  
116 - src[y1 + x2] = src[y1 + x];  
117 - src[y1 + x] = t;  
118 - }  
119 - }  
120 -}  
121 -  
122 -void _flip_vertical_32bit(int width, int height, uint32_t *src)  
123 -{  
124 - int h2 = (int)(height / 2);  
125 - for (int y = 0; y < h2; ++y)  
126 - {  
127 - int y1 = (y * width);  
128 - int y2 = (height - 1 - y) * width;  
129 - for (int x = 0; x < width; ++x)  
130 - {  
131 - uint32_t t = src[y2 + x];  
132 - src[y2 + x] = src[y1 + x];  
133 - src[y1 + x] = t;  
134 - }  
135 - }  
136 -}  
137 -  
138 -void _flip_vertical_8bit(int width, int height, uint8_t *src)  
139 -{  
140 - int h2 = (int)(height / 2);  
141 - for (int y = 0; y < h2; ++y)  
142 - {  
143 - int y1 = (y * width);  
144 - int y2 = (height - 1 - y) * width;  
145 - for (int x = 0; x < width; ++x)  
146 - {  
147 - uint8_t t = src[y2 + x];  
148 - src[y2 + x] = src[y1 + x];  
149 - src[y1 + x] = t;  
150 - }  
151 - }  
152 -}  
153 -  
154 -uint32_t *convert_image_yuv420p_to_gray(uint8_t *plane0, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal)  
155 -{  
156 - int x, y;  
157 - int yp, index;  
158 -  
159 - uint32_t *src = malloc(sizeof(uint32_t) * (width * height));  
160 -  
161 - for (x = 0; x < width; x++)  
162 - {  
163 - for (y = 0; y < height; y++)  
164 - {  
165 - index = y * width + x;  
166 - yp = plane0[index];  
167 - src[x + y * width] = (HEXFF << 24) | (yp << 16) | (yp << 8) | yp;  
168 - }  
169 - }  
170 - if (flip_horizontal)  
171 - {  
172 - _flip_horizontal_32bit(width, height, src);  
173 - }  
174 - if (flip_vertical)  
175 - {  
176 - _flip_vertical_32bit(width, height, src);  
177 - }  
178 -  
179 - if (angleRotation == 0)  
180 - {  
181 - return src;  
182 - }  
183 -  
184 - else  
185 - {  
186 - return _rotaion_image_32bit(src, angleRotation, width, height, background_color);  
187 - }  
188 -}  
189 -  
190 -uint8_t *convert_image_yuv420p_to_gray_8bit(uint8_t *plane0, int width, int height, double angleRotation, uint8_t background_color, bool flip_vertical, bool flip_horizontal)  
191 -{  
192 - int x, y;  
193 - int index;  
194 - uint8_t yp;  
195 -  
196 - uint8_t *src = malloc(sizeof(uint8_t) * (width * height));  
197 -  
198 - for (x = 0; x < width; x++)  
199 - {  
200 - for (y = 0; y < height; y++)  
201 - {  
202 - index = y * width + x;  
203 - yp = plane0[index];  
204 - src[x + y * width] = yp;  
205 - }  
206 - }  
207 -  
208 - if (flip_horizontal)  
209 - {  
210 - _flip_horizontal_8bit(width, height, src);  
211 - }  
212 - if (flip_vertical)  
213 - {  
214 - _flip_vertical_8bit(width, height, src);  
215 - }  
216 -  
217 - if (angleRotation == 0)  
218 - {  
219 - return src;  
220 - }  
221 - else  
222 - {  
223 - return _rotaion_image_8bit(src, angleRotation, width, height, background_color);  
224 - }  
225 -}  
226 -  
227 -uint32_t *convert_image_yuv420p_to_rgb(uint8_t *plane0, uint8_t *plane1, uint8_t *plane2, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal)  
228 -{  
229 - int x, y, uvIndex, index;  
230 - int yp, up, vp;  
231 - int r, g, b;  
232 - int rt, gt, bt;  
233 -  
234 - uint32_t *src = malloc(sizeof(uint32_t) * (width * height));  
235 -  
236 - for (x = 0; x < width; ++x)  
237 - {  
238 - for (y = 0; y < height; ++y)  
239 - {  
240 - uvIndex = bytesPerPixel * ((int)floor(x / 2)) + bytesPerRow * ((int)floor(y / 2));  
241 - index = y * width + x;  
242 -  
243 - yp = plane0[index];  
244 - up = plane1[uvIndex];  
245 - vp = plane2[uvIndex];  
246 - rt = round(yp + vp * 1436 / 1024 - 179);  
247 - gt = round(yp - up * 46549 / 131072 + 44 - vp * 93604 / 131072 + 91);  
248 - bt = round(yp + up * 1814 / 1024 - 227);  
249 - r = _clamp(0, 255, rt);  
250 - g = _clamp(0, 255, gt);  
251 - b = _clamp(0, 255, bt);  
252 - src[x + y * width] = (HEXFF << 24) | (b << 16) | (g << 8) | r;  
253 - }  
254 - }  
255 - if (flip_horizontal)  
256 - {  
257 - _flip_horizontal_32bit(width, height, src);  
258 - }  
259 - if (flip_vertical)  
260 - {  
261 - _flip_vertical_32bit(width, height, src);  
262 - }  
263 -  
264 - if (angleRotation == 0)  
265 - {  
266 - return src;  
267 - }  
268 - else  
269 - {  
270 - return _rotaion_image_32bit(src, angleRotation, width, height, background_color);  
271 - }  
272 -}  
273 -  
274 -uint32_t *convert_image_nv12_to_rgb(uint8_t *plane0, uint8_t *plane1, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal)  
275 -{  
276 - int x, y, uvIndex, index;  
277 - int yp, up, vp;  
278 - int r, g, b;  
279 - int rt, gt, bt;  
280 -  
281 - uint32_t *src = malloc(sizeof(uint32_t) * (width * height));  
282 -  
283 - for (x = 0; x < width; ++x)  
284 - {  
285 - for (y = 0; y < height; ++y)  
286 - {  
287 - uvIndex = bytesPerPixel * ((int)floor(x / 2)) + bytesPerRow * ((int)floor(y / 2));  
288 - index = y * width + x;  
289 -  
290 - yp = plane0[index];  
291 - up = plane1[uvIndex];  
292 - vp = plane1[uvIndex + 1];  
293 - rt = round(yp + vp * 1436 / 1024 - 179);  
294 - gt = round(yp - up * 46549 / 131072 + 44 - vp * 93604 / 131072 + 91);  
295 - bt = round(yp + up * 1814 / 1024 - 227);  
296 - r = _clamp(0, 255, rt);  
297 - g = _clamp(0, 255, gt);  
298 - b = _clamp(0, 255, bt);  
299 - src[x + y * width] = (HEXFF << 24) | (b << 16) | (g << 8) | r;  
300 - }  
301 - }  
302 - if (flip_horizontal)  
303 - {  
304 - _flip_horizontal_32bit(width, height, src);  
305 - }  
306 - if (flip_vertical)  
307 - {  
308 - _flip_vertical_32bit(width, height, src);  
309 - }  
310 - if (angleRotation == 0)  
311 - {  
312 - return src;  
313 - }  
314 - else  
315 - {  
316 - return _rotaion_image_32bit(src, angleRotation, width, height, background_color);  
317 - }  
318 -}  
1 -//  
2 -// Created by thuanpm on 4/22/22.  
3 -//  
4 -  
5 -#ifndef PROCESSING_CAMERA_IMAGE_CONVERTER_H  
6 -#define PROCESSING_CAMERA_IMAGE_CONVERTER_H  
7 -  
8 -#ifdef __cplusplus  
9 -extern "C"  
10 -{  
11 -#endif  
12 -  
13 -#include <stdbool.h>  
14 -  
15 - uint8_t *convert_image_yuv420p_to_gray_8bit(uint8_t *plane0, int width, int height, double angleRotation, uint8_t background_color, bool flip_vertical, bool flip_horizontal);  
16 - uint32_t *convert_image_nv12_to_rgb(uint8_t *plane0, uint8_t *plane1, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal);  
17 - uint32_t *convert_image_yuv420p_to_gray(uint8_t *plane0, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal);  
18 - uint32_t *convert_image_yuv420p_to_rgb(uint8_t *plane0, uint8_t *plane1, uint8_t *plane2, int bytesPerRow, int bytesPerPixel, int width, int height, double angleRotation, uint32_t background_color, bool flip_vertical, bool flip_horizontal);  
19 -  
20 -#ifdef __cplusplus  
21 -}  
22 -#endif  
23 -  
24 -#endif // PROCESSING_CAMERA_IMAGE_CONVERTER_H