diff options
author | cc <cc@localhost> | 2025-08-20 19:19:39 -0700 |
---|---|---|
committer | cc <cc@localhost> | 2025-08-20 19:19:59 -0700 |
commit | 238a3e31a8fb0eb24de278b9286b9b6caef1c66b (patch) | |
tree | 624d557e1a5d69bca869e7ad12ba906b879cf831 /src/tiff.rs | |
parent | 7490dbae2c2c2f3427cc5a702ce248ffae88ce08 (diff) |
Fixed subtle shift error
Diffstat (limited to 'src/tiff.rs')
-rw-r--r-- | src/tiff.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tiff.rs b/src/tiff.rs index 34430ab..a1d19eb 100644 --- a/src/tiff.rs +++ b/src/tiff.rs @@ -152,7 +152,8 @@ pub fn as_standard_format(tiff_file_name: &str) -> Option<Vec<u32>> { for y in 0..height { for c in 0..channels { let data: u8 = tiff_data[c + channels * (x + width * y)]; - let data: u32 = (data << (8 * c)) as u32; + let data: u32 = data as u32; + let data = data << (8 * c); standard_buffer[x + width*y] += data; } } |