Skip to content

Commit a70cae4

Browse files
authored
Merge branch 'GraphiteEditor:master' into switch_handle_shortcut
2 parents 7c43465 + 36fe9bf commit a70cae4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+458
-305
lines changed

Cargo.lock

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/raw-rs/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ thiserror = { workspace = true }
2626
# Required dependencies
2727
bitstream-io = "2.3.0"
2828
num_enum = "0.7.2"
29+
fortuples = "0.9.1"
2930

3031
# Optional workspace dependencies
3132
image = { workspace = true, optional = true }

libraries/raw-rs/build-camera-data/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn build_camera_data(_: TokenStream) -> TokenStream {
7171

7272
let mut values: Table = toml::from_str(&fs::read_to_string(model_path).unwrap()).unwrap();
7373

74-
if let Some(val) = values.get_mut("camera_to_xyz") {
74+
if let Some(val) = values.get_mut("xyz_to_camera") {
7575
*val = Value::Array(val.as_array().unwrap().iter().map(|x| Value::Integer((x.as_float().unwrap() * 10_000.) as i64)).collect());
7676
}
7777

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.9437, -0.2812, -0.0774, -0.8405, 1.6215, 0.2291, -0.0709, 0.0596, 0.7181]
1+
xyz_to_camera = [0.9437, -0.2812, -0.0774, -0.8405, 1.6215, 0.2291, -0.0709, 0.0596, 0.7181]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.9847, -0.3091, -0.0929, -0.8485, 1.6346, 0.2225, -0.0714, 0.0595, 0.7103]
1+
xyz_to_camera = [0.9847, -0.3091, -0.0929, -0.8485, 1.6346, 0.2225, -0.0714, 0.0595, 0.7103]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.9847, -0.3091, -0.0929, -0.8485, 1.6346, 0.2225, -0.0714, 0.0595, 0.7103]
1+
xyz_to_camera = [0.9847, -0.3091, -0.0929, -0.8485, 1.6346, 0.2225, -0.0714, 0.0595, 0.7103]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.9847, -0.3091, -0.0929, -0.8485, 1.6346, 0.2225, -0.0714, 0.0595, 0.7103]
1+
xyz_to_camera = [0.9847, -0.3091, -0.0929, -0.8485, 1.6346, 0.2225, -0.0714, 0.0595, 0.7103]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6038, -0.1484, -0.0579, -0.9145, 1.6746, 0.2512, -0.0875, 0.0746, 0.7218]
1+
xyz_to_camera = [0.6038, -0.1484, -0.0579, -0.9145, 1.6746, 0.2512, -0.0875, 0.0746, 0.7218]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.4950, -0.0580, -0.0103, -0.5228, 1.2542, 0.3029, -0.0709, 0.1435, 0.7371]
1+
xyz_to_camera = [0.4950, -0.0580, -0.0103, -0.5228, 1.2542, 0.3029, -0.0709, 0.1435, 0.7371]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5775, -0.0805, -0.0359, -0.8573, 1.6294, 0.2391, -0.1943, 0.2342, 0.7249]
1+
xyz_to_camera = [0.5775, -0.0805, -0.0359, -0.8573, 1.6294, 0.2391, -0.1943, 0.2342, 0.7249]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5413, -0.1162, -0.0365, -0.5665, 1.3098, 0.2866, -0.0608, 0.1179, 0.8440]
1+
xyz_to_camera = [0.5413, -0.1162, -0.0365, -0.5665, 1.3098, 0.2866, -0.0608, 0.1179, 0.8440]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5209, -0.1072, -0.0397, -0.8845, 1.6121, 0.2919, -0.1618, 0.1802, 0.8654]
1+
xyz_to_camera = [0.5209, -0.1072, -0.0397, -0.8845, 1.6121, 0.2919, -0.1618, 0.1802, 0.8654]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6435, -0.1903, -0.0536, -0.4722, 1.2449, 0.2550, -0.0663, 0.1363, 0.6517]
1+
xyz_to_camera = [0.6435, -0.1903, -0.0536, -0.4722, 1.2449, 0.2550, -0.0663, 0.1363, 0.6517]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6660, -0.1918, -0.0471, -0.4613, 1.2398, 0.2485, -0.0649, 0.1433, 0.6447]
1+
xyz_to_camera = [0.6660, -0.1918, -0.0471, -0.4613, 1.2398, 0.2485, -0.0649, 0.1433, 0.6447]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.8161, -0.2947, -0.0739, -0.4811, 1.2668, 0.2389, -0.0437, 0.1229, 0.6524]
1+
xyz_to_camera = [0.8161, -0.2947, -0.0739, -0.4811, 1.2668, 0.2389, -0.0437, 0.1229, 0.6524]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5991, -0.1456, -0.0455, -0.4764, 1.2135, 0.2980, -0.0707, 0.1425, 0.6701]
1+
xyz_to_camera = [0.5991, -0.1456, -0.0455, -0.4764, 1.2135, 0.2980, -0.0707, 0.1425, 0.6701]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5991, -0.1456, -0.0455, -0.4764, 1.2135, 0.2980, -0.0707, 0.1425, 0.6701]
1+
xyz_to_camera = [0.5991, -0.1456, -0.0455, -0.4764, 1.2135, 0.2980, -0.0707, 0.1425, 0.6701]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.7657, -0.2847, -0.0607, -0.4083, 1.1966, 0.2389, -0.0684, 0.1418, 0.5844]
1+
xyz_to_camera = [0.7657, -0.2847, -0.0607, -0.4083, 1.1966, 0.2389, -0.0684, 0.1418, 0.5844]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5973, -0.1695, -0.0419, -0.3826, 1.1797, 0.2293, -0.0639, 0.1398, 0.5789]
1+
xyz_to_camera = [0.5973, -0.1695, -0.0419, -0.3826, 1.1797, 0.2293, -0.0639, 0.1398, 0.5789]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.7657, -0.2847, -0.0607, -0.4083, 1.1966, 0.2389, -0.0684, 0.1418, 0.5844]
1+
xyz_to_camera = [0.7657, -0.2847, -0.0607, -0.4083, 1.1966, 0.2389, -0.0684, 0.1418, 0.5844]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5973, -0.1695, -0.0419, -0.3826, 1.1797, 0.2293, -0.0639, 0.1398, 0.5789]
1+
xyz_to_camera = [0.5973, -0.1695, -0.0419, -0.3826, 1.1797, 0.2293, -0.0639, 0.1398, 0.5789]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.7657, -0.2847, -0.0607, -0.4083, 1.1966, 0.2389, -0.0684, 0.1418, 0.5844]
1+
xyz_to_camera = [0.7657, -0.2847, -0.0607, -0.4083, 1.1966, 0.2389, -0.0684, 0.1418, 0.5844]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6972, -0.2408, -0.0600, -0.4330, 1.2101, 0.2515, -0.0388, 0.1277, 0.5847]
1+
xyz_to_camera = [0.6972, -0.2408, -0.0600, -0.4330, 1.2101, 0.2515, -0.0388, 0.1277, 0.5847]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.7460, -0.2365, -0.0588, -0.5687, 1.3442, 0.2474, -0.0624, 0.1156, 0.6584]
1+
xyz_to_camera = [0.7460, -0.2365, -0.0588, -0.5687, 1.3442, 0.2474, -0.0624, 0.1156, 0.6584]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.8200, -0.2976, -0.0719, -0.4296, 1.2053, 0.2532, -0.0429, 0.1282, 0.5774]
1+
xyz_to_camera = [0.8200, -0.2976, -0.0719, -0.4296, 1.2053, 0.2532, -0.0429, 0.1282, 0.5774]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5271, -0.0712, -0.0347, -0.6153, 1.3653, 0.2763, -0.1601, 0.2366, 0.7242]
1+
xyz_to_camera = [0.5271, -0.0712, -0.0347, -0.6153, 1.3653, 0.2763, -0.1601, 0.2366, 0.7242]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.7374, -0.2389, -0.0551, -0.5435, 1.3162, 0.2519, -0.1006, 0.1795, 0.6552]
1+
xyz_to_camera = [0.7374, -0.2389, -0.0551, -0.5435, 1.3162, 0.2519, -0.1006, 0.1795, 0.6552]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6640, -0.1847, -0.0503, -0.5238, 1.3010, 0.2474, -0.0993, 0.1673, 0.6527]
1+
xyz_to_camera = [0.6640, -0.1847, -0.0503, -0.5238, 1.3010, 0.2474, -0.0993, 0.1673, 0.6527]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.7662, -0.2686, -0.0660, -0.5240, 1.2965, 0.2530, -0.0796, 0.1508, 0.6167]
1+
xyz_to_camera = [0.7662, -0.2686, -0.0660, -0.5240, 1.2965, 0.2530, -0.0796, 0.1508, 0.6167]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.8200, -0.2976, -0.0719, -0.4296, 1.2053, 0.2532, -0.0429, 0.1282, 0.5774]
1+
xyz_to_camera = [0.8200, -0.2976, -0.0719, -0.4296, 1.2053, 0.2532, -0.0429, 0.1282, 0.5774]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5838, -0.1430, -0.0246, -0.3497, 1.1477, 0.2297, -0.0748, 0.1885, 0.5778]
1+
xyz_to_camera = [0.5838, -0.1430, -0.0246, -0.3497, 1.1477, 0.2297, -0.0748, 0.1885, 0.5778]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6389, -0.1703, -0.0378, -0.4562, 1.2265, 0.2587, -0.0670, 0.1489, 0.6550]
1+
xyz_to_camera = [0.6389, -0.1703, -0.0378, -0.4562, 1.2265, 0.2587, -0.0670, 0.1489, 0.6550]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6389, -0.1703, -0.0378, -0.4562, 1.2265, 0.2587, -0.0670, 0.1489, 0.6550]
1+
xyz_to_camera = [0.6389, -0.1703, -0.0378, -0.4562, 1.2265, 0.2587, -0.0670, 0.1489, 0.6550]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.9811, -0.3908, -0.0752, -0.3704, 1.1577, 0.2417, -0.0073, 0.0950, 0.5980]
1+
xyz_to_camera = [0.9811, -0.3908, -0.0752, -0.3704, 1.1577, 0.2417, -0.0073, 0.0950, 0.5980]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6549, -0.1550, -0.0436, -0.4880, 1.2435, 0.2753, -0.0854, 0.1868, 0.6976]
1+
xyz_to_camera = [0.6549, -0.1550, -0.0436, -0.4880, 1.2435, 0.2753, -0.0854, 0.1868, 0.6976]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6129, -0.1545, -0.0418, -0.4930, 1.2490, 0.2743, -0.0977, 0.1693, 0.6615]
1+
xyz_to_camera = [0.6129, -0.1545, -0.0418, -0.4930, 1.2490, 0.2743, -0.0977, 0.1693, 0.6615]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6129, -0.1545, -0.0418, -0.4930, 1.2490, 0.2743, -0.0977, 0.1693, 0.6615]
1+
xyz_to_camera = [0.6129, -0.1545, -0.0418, -0.4930, 1.2490, 0.2743, -0.0977, 0.1693, 0.6615]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6129, -0.1545, -0.0418, -0.4930, 1.2490, 0.2743, -0.0977, 0.1693, 0.6615]
1+
xyz_to_camera = [0.6129, -0.1545, -0.0418, -0.4930, 1.2490, 0.2743, -0.0977, 0.1693, 0.6615]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.5491, -0.1192, -0.0363, -0.4951, 1.2342, 0.2948, -0.0911, 0.1722, 0.7192]
1+
xyz_to_camera = [0.5491, -0.1192, -0.0363, -0.4951, 1.2342, 0.2948, -0.0911, 0.1722, 0.7192]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.8280, -0.2987, -0.0703, -0.3531, 1.1645, 0.2133, -0.0550, 0.1542, 0.5312]
1+
xyz_to_camera = [0.8280, -0.2987, -0.0703, -0.3531, 1.1645, 0.2133, -0.0550, 0.1542, 0.5312]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.8280, -0.2987, -0.0703, -0.3531, 1.1645, 0.2133, -0.0550, 0.1542, 0.5312]
1+
xyz_to_camera = [0.8280, -0.2987, -0.0703, -0.3531, 1.1645, 0.2133, -0.0550, 0.1542, 0.5312]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6912, -0.2127, -0.0469, -0.4470, 1.2175, 0.2587, -0.0398, 0.1478, 0.6492]
1+
xyz_to_camera = [0.6912, -0.2127, -0.0469, -0.4470, 1.2175, 0.2587, -0.0398, 0.1478, 0.6492]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
camera_to_xyz = [0.6355, -0.2067, -0.0490, -0.3653, 1.1542, 0.2400, -0.0406, 0.1258, 0.5506]
1+
xyz_to_camera = [0.6355, -0.2067, -0.0490, -0.3653, 1.1542, 0.2400, -0.0406, 0.1258, 0.5506]

libraries/raw-rs/src/decoder/arw1.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ pub fn decode_a100<R: Read + Seek>(ifd: Ifd, file: &mut TiffRead<R>) -> RawImage
2828
black: SubtractBlack::None,
2929
transform: Transform::Horizontal,
3030
camera_model: None,
31-
camera_white_balance_multiplier: None,
32-
white_balance_multiplier: None,
31+
camera_white_balance: None,
32+
white_balance: None,
3333
camera_to_rgb: None,
34-
rgb_to_camera: None,
3534
}
3635
}
3736

libraries/raw-rs/src/decoder/arw2.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ pub fn decode<R: Read + Seek>(ifd: Ifd, file: &mut TiffRead<R>) -> RawImage {
5252
black: SubtractBlack::CfaGrid([512, 512, 512, 512]), // TODO: Find the correct way to do this
5353
transform: Transform::Horizontal,
5454
camera_model: None,
55-
camera_white_balance_multiplier: ifd.white_balance_levels.map(|arr| arr.map(|x| x as f64)),
56-
white_balance_multiplier: None,
55+
camera_white_balance: ifd.white_balance_levels.map(|arr| arr.map(|x| x as f64)),
56+
white_balance: None,
5757
camera_to_rgb: None,
58-
rgb_to_camera: None,
5958
}
6059
}
6160

libraries/raw-rs/src/decoder/uncompressed.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ pub fn decode<R: Read + Seek>(ifd: Ifd, file: &mut TiffRead<R>) -> RawImage {
6060
black: SubtractBlack::CfaGrid(ifd.black_level),
6161
transform: Transform::Horizontal,
6262
camera_model: None,
63-
camera_white_balance_multiplier: ifd.white_balance_levels.map(|arr| arr.map(|x| x as f64)),
64-
white_balance_multiplier: None,
63+
camera_white_balance: ifd.white_balance_levels.map(|arr| arr.map(|x| x as f64)),
64+
white_balance: None,
6565
camera_to_rgb: None,
66-
rgb_to_camera: None,
6766
}
6867
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{Image, RawImage};
1+
use crate::{Pixel, RawImage};
22

33
fn average(data: &[u16], indexes: impl Iterator<Item = i64>) -> u16 {
44
let mut sum = 0;
@@ -13,62 +13,69 @@ fn average(data: &[u16], indexes: impl Iterator<Item = i64>) -> u16 {
1313
(sum / count) as u16
1414
}
1515

16-
pub fn linear_demosaic(raw_image: RawImage) -> Image<u16> {
17-
match raw_image.cfa_pattern {
18-
[0, 1, 1, 2] => linear_demosaic_rggb(raw_image),
19-
_ => todo!(),
16+
impl RawImage {
17+
pub fn linear_demosaic_iter(&self) -> impl Iterator<Item = Pixel> + use<'_> {
18+
match self.cfa_pattern {
19+
[0, 1, 1, 2] => self.linear_demosaic_rggb_iter(),
20+
_ => todo!(),
21+
}
2022
}
21-
}
2223

23-
fn linear_demosaic_rggb(raw_image: RawImage) -> Image<u16> {
24-
let mut image = vec![0; raw_image.width * raw_image.height * 3];
25-
let width = raw_image.width as i64;
26-
let height = raw_image.height as i64;
24+
fn linear_demosaic_rggb_iter(&self) -> impl Iterator<Item = Pixel> + use<'_> {
25+
let width = self.width as i64;
26+
let height = self.height as i64;
2727

28-
for row in 0..height {
29-
let row_by_width = row * width;
28+
(0..height).flat_map(move |row| {
29+
let row_by_width = row * width;
3030

31-
for col in 0..width {
32-
let pixel_index = row_by_width + col;
31+
(0..width).map(move |column| {
32+
let pixel_index = row_by_width + column;
3333

34-
let vertical_indexes = [pixel_index + width, pixel_index - width];
35-
let horizontal_indexes = [pixel_index + 1, pixel_index - 1];
36-
let cross_indexes = [pixel_index + width, pixel_index - width, pixel_index + 1, pixel_index - 1];
37-
let diagonal_indexes = [pixel_index + width + 1, pixel_index - width + 1, pixel_index + width - 1, pixel_index - width - 1];
34+
let vertical_indexes = [pixel_index + width, pixel_index - width];
35+
let horizontal_indexes = [pixel_index + 1, pixel_index - 1];
36+
let cross_indexes = [pixel_index + width, pixel_index - width, pixel_index + 1, pixel_index - 1];
37+
let diagonal_indexes = [pixel_index + width + 1, pixel_index - width + 1, pixel_index + width - 1, pixel_index - width - 1];
3838

39-
let pixel_index = pixel_index as usize;
40-
match (row % 2 == 0, col % 2 == 0) {
41-
(true, true) => {
42-
image[3 * pixel_index] = raw_image.data[pixel_index];
43-
image[3 * pixel_index + 1] = average(&raw_image.data, cross_indexes.into_iter());
44-
image[3 * pixel_index + 2] = average(&raw_image.data, diagonal_indexes.into_iter());
45-
}
46-
(true, false) => {
47-
image[3 * pixel_index] = average(&raw_image.data, horizontal_indexes.into_iter());
48-
image[3 * pixel_index + 1] = raw_image.data[pixel_index];
49-
image[3 * pixel_index + 2] = average(&raw_image.data, vertical_indexes.into_iter());
50-
}
51-
(false, true) => {
52-
image[3 * pixel_index] = average(&raw_image.data, vertical_indexes.into_iter());
53-
image[3 * pixel_index + 1] = raw_image.data[pixel_index];
54-
image[3 * pixel_index + 2] = average(&raw_image.data, horizontal_indexes.into_iter());
39+
let pixel_index = pixel_index as usize;
40+
match (row % 2 == 0, column % 2 == 0) {
41+
(true, true) => Pixel {
42+
values: [
43+
self.data[pixel_index],
44+
average(&self.data, cross_indexes.into_iter()),
45+
average(&self.data, diagonal_indexes.into_iter()),
46+
],
47+
row: row as usize,
48+
column: column as usize,
49+
},
50+
(true, false) => Pixel {
51+
values: [
52+
average(&self.data, horizontal_indexes.into_iter()),
53+
self.data[pixel_index],
54+
average(&self.data, vertical_indexes.into_iter()),
55+
],
56+
row: row as usize,
57+
column: column as usize,
58+
},
59+
(false, true) => Pixel {
60+
values: [
61+
average(&self.data, vertical_indexes.into_iter()),
62+
self.data[pixel_index],
63+
average(&self.data, horizontal_indexes.into_iter()),
64+
],
65+
row: row as usize,
66+
column: column as usize,
67+
},
68+
(false, false) => Pixel {
69+
values: [
70+
average(&self.data, diagonal_indexes.into_iter()),
71+
average(&self.data, cross_indexes.into_iter()),
72+
self.data[pixel_index],
73+
],
74+
row: row as usize,
75+
column: column as usize,
76+
},
5577
}
56-
(false, false) => {
57-
image[3 * pixel_index] = average(&raw_image.data, diagonal_indexes.into_iter());
58-
image[3 * pixel_index + 1] = average(&raw_image.data, cross_indexes.into_iter());
59-
image[3 * pixel_index + 2] = raw_image.data[pixel_index];
60-
}
61-
}
62-
}
63-
}
64-
65-
Image {
66-
channels: 3,
67-
data: image,
68-
width: raw_image.width,
69-
height: raw_image.height,
70-
transform: raw_image.transform,
71-
rgb_to_camera: raw_image.rgb_to_camera,
72-
histogram: None,
78+
})
79+
})
7380
}
7481
}

0 commit comments

Comments
 (0)