LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #633
Brandon Thomasf35663590fe4
diff --cc ROADMAP.mdindex 95257e5e6,bafde72ed..12b273a18--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -188,13 -182,9 +188,9 @@@ packed formats 2, 5 and 7, the 16-bit w118 bodies, `crates/raw/src/vendor/rw2.rs`), PEF (uncompressed and Huffman), ORF uncompressed (16-bit and 12-bit packed). Supported containers yield their embedded JPEG preview when present (including CR3). The engine uses it for RAW variants it cannot decode yet; HEVC-only CR3 previews are not decoded.Not decoded yet — preview only (no permissively licensed description; black-box analysis incomplete):- - **Nikon "lossy after split" NEF** (non-zero split row in maker note `0x0096`, e.g. some D3400/D5000/D5200/D5500/D5600- files): rows above the split decode with the regular lossy table; from the split row on a different code is used- that our black-box analysis has not recovered yet (none of the four regular tables fits, also not with byte- alignment or reset predictors at the split row). The other Nikon Huffman variants are decoded (`crates/raw/src/vendor/nefc.rs` documents the analysis).- **Olympus compressed ORF**, **Canon CR3 unverified CRX variants** (M11.1), **Canon sRAW/mRAW**.-**Camera colour matrices:** ARW, NEF, RW2, RAF, CR3, CR2, PEF and Samsung SRW files can use guarded, separate chromaticity and tone estimates from their own embedded JPEG (see `docs/camera-preview-colour.md`); this is a per-file camera-look estimate with relative WB, not measured calibration or absolute-Kelvin WB. Other non-DNG raws and rejected fits use the documented neutral fallback (camera RGB ≈ linear sRGB, flagged+**Camera colour matrices:** ARW, NEF, RW2, RAF, CR3, CR2, PEF, Samsung SRW and Olympus ORF files can use guarded, separate chromaticity and tone estimates from their own embedded JPEG (see `docs/camera-preview-colour.md`); this is a per-file camera-look estimate with relative WB, not measured calibration or absolute-Kelvin WB. Other non-DNG raws and rejected fits use the documented neutral fallback (camera RGB ≈ linear sRGB, flagged`matrix_is_fallback`) with the file's as-shot white-balance multipliers. Clean sources to evaluate next: manufacturermatrices stored in the files themselves (Olympus ImageProcessing `ColorMatrix`, Pentax equivalents; Panasonic RW2 files carry none) and ourown chart-based calibration (M11.4). Adobe matrices are never used.diff --cc crates/engine/src/media.rsindex 5dfc12eb9,9c09b5ec0..7ab005d43--- a/crates/engine/src/media.rs+++ b/crates/engine/src/media.rs@@@ -62,7 -62,7 +62,7 @@@ impl SettingsHashes}/// Bump when the pipeline's output changes, to invalidate cached thumbnails.- pub const RENDER_CACHE_VERSION: u64 = 32;-pub const RENDER_CACHE_VERSION: u64 = 28;++pub const RENDER_CACHE_VERSION: u64 = 33;/// Thumbnails render at one of these long edges (so window/cell size changes reuse the cache).pub const THUMB_SIZES: [usize; 4] = [128, 256, 384, 512];diff --cc crates/raw/src/vendor/nef.rsindex 5c56520b5,2385624c2..c7b99e937--- a/crates/raw/src/vendor/nef.rs+++ b/crates/raw/src/vendor/nef.rs@@@ -3,10 -3,8 +3,10 @@@//! Sources: TIFF 6.0 (the raw image is a standard CFA SubIFD), Laurent Clévy's NEF structure notes (prose: IFD//! layout, SubIFDs, maker note header) and the ExifTool Nikon tag-name documentation (`0x000c` WB_RBLevels,//! `0x003d` BlackLevel, `0x0096` NEFLinearizationTable). The Huffman-compressed data (compression 34713) is decoded- //! by [`super::nefc`], which documents its clean-room sources; files it can't decode yet ("lossy after split")- //! are reported as [`RawError::Unsupported`] and their embedded previews still work. So are High Efficiency NEFs+ //! by [`super::nefc`], which documents its clean-room sources; "lossy after split" files are decoded when their strip follows the-//! rule documented there; files it can't decode are reported as [`RawError::Unsupported`] and their embedded previews still work.++//! rule documented there; files it can't decode are reported as [`RawError::Unsupported`] and their embedded previews still work. So are High Efficiency NEFs+//! (HE / HE★, Z 8, Z 9, Z 6III, Z f): they keep compression 34713 but carry a wavelet codestream that starts with+//! the JPEG XS markers SOC + CAP (ISO/IEC 21122-1, `FF10 FF50`) and have no `0x0096` table (issue #193).use super::{nefc, white_from_data};use crate::tiffraw::{Packing, read_image};