Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

Merge PR #1304: RW2: decode tiled format 8 (DC-S1RM2 high-resolution mode) (#1276)

aiongg12c096669ab7
diff --cc crates/raw/src/vendor/rw2.rs
index 7ebee5916,d7e872253..4acd53a02
--- a/crates/raw/src/vendor/rw2.rs
+++ b/crates/raw/src/vendor/rw2.rs
@@@ -145,9 -150,11 +150,9 @@@ const TILE_ROWS: u16 = 0x0043
const DISTORTION_INFO: u16 = 0x0119;
/// Fixed-point one of the distortion coefficients and zoom.
const DISTORTION_ONE: f64 = 32768.0;
-/// Output radii sampled to fit the inverse mapping.
-const DISTORTION_SAMPLES: usize = 64;
/// Largest error of the fitted inverse (relative to the half diagonal) accepted: real lenses fit within 1.2e-4.
const DISTORTION_MAX_FIT_ERROR: f64 = 1e-3;
- /// Most strips seen in a file is 3 (the 12008 × 8008 high-resolution mode).
+ /// Most strips seen in a file is 8 (the 16296 × 10856 high-resolution mode: 4 columns by 2 rows of tiles).
const MAX_STRIPS: usize = 64;
const CHUNK: usize = 0x4000;