diff --git a/crates/engine/src/camera_preview.rs b/crates/engine/src/camera_preview.rs index e14b1bd65d6..1cd3615e75b 100644 --- a/crates/engine/src/camera_preview.rs +++ b/crates/engine/src/camera_preview.rs @@ -23,7 +23,8 @@ use lightcraft_raw::{RawFormat, RawImage, color::CameraTransform, profile::HsvTa /// /// 1: the fit as of #499's follow-up; 2: Sony DRO (tone curve lowered to Sony's curve without DRO) /// and the ILCE-7CR profile (#528, #583, #568, #616). -pub const LOOK_VERSION: u32 = 2; +/// 3: measured camera colour can refine an otherwise tone-only partial look. +pub const LOOK_VERSION: u32 = 3; #[derive(Clone, Debug)] pub(crate) struct CameraLook { @@ -105,7 +106,7 @@ pub(crate) fn fit_preview(raw: &RawImage, bytes: &[u8], transform: &CameraTransf // try its colour first and fit tone/chroma per photo (picture styles vary). let profile = raw.metadata.model.as_deref().and_then(crate::camera_profiles::get); let colour = profile.as_ref().and_then(|p| Some((p.matrix().mul(&transform.matrix.inverse()?), p.hue_sat.clone()))); - let look = fit_look(&sensor, &reference, &clipped, colour)?; + let look = fit_look_with_fallback(&sensor, &reference, &clipped, colour, || spectral_correction(raw, transform))?; // Sony's Dynamic Range Optimizer (on by default) brightens the camera JPEG's darker regions, // not the raw: keep the colour fitted to the JPEG, take the tone curve without DRO. let dro = lightcraft_raw::embedded_preview_dynamic_range_optimized(bytes) == Some(true); @@ -127,6 +128,11 @@ pub(crate) fn fit_preview(raw: &RawImage, bytes: &[u8], transform: &CameraTransf /// the render's highlight reconstruction. const SENSOR_CLIP: f32 = 0.99; +#[cfg(test)] +fn fit_look(sensor: &Rgb32f, reference: &Rgb32f, clipped: &[bool], colour: Option<(Mat3, Option)>) -> Option { + fit_look_with_fallback(sensor, reference, clipped, colour, || None) +} + /// The photo's look, refitted without the proxy pixels whose sensor values are clipped. /// /// A clipped raw pixel no longer records the scene's colour: with one channel held at the clip @@ -145,14 +151,20 @@ const SENSOR_CLIP: f32 = 0.99; /// replace a look fitted away from edges). A photo that had no look gets one when the search /// without the clipped pixels finds it, and otherwise the [`fit_partial`] look when that is clearly /// closer to the camera JPEG than the neutral fallback. -fn fit_look(sensor: &Rgb32f, reference: &Rgb32f, clipped: &[bool], colour: Option<(Mat3, Option)>) -> Option { +fn fit_look_with_fallback( + sensor: &Rgb32f, + reference: &Rgb32f, + clipped: &[bool], + colour: Option<(Mat3, Option)>, + fallback: impl FnOnce() -> Option, +) -> Option { let unclipped = without_clipped(sensor, clipped); let Some((look, attempt)) = search_ordered(sensor, reference, colour.clone(), TONE_FITS) else { - return unclipped - .as_ref() - .and_then(|u| search_ordered(u, reference, colour, TONE_FITS)) - .map(|(look, _)| look) - .or_else(|| fit_partial(unclipped.as_ref().unwrap_or(sensor), reference)); + return unclipped.as_ref().and_then(|u| search_ordered(u, reference, colour, TONE_FITS)).map(|(look, _)| look).or_else(|| { + let sensor = unclipped.as_ref().unwrap_or(sensor); + let partial = fit_partial(sensor, reference)?; + Some(refine_tone_only(sensor, reference, partial, fallback)) + }); }; let Some(unclipped) = unclipped else { return Some(look) }; let refit = fit_attempt(&unclipped, reference, &colour, attempt); @@ -162,6 +174,62 @@ fn fit_look(sensor: &Rgb32f, reference: &Rgb32f, clipped: &[bool], colour: Optio Some(refit.unwrap_or(look)) } +/// A measured camera transform expressed as a correction of the existing proxy's working RGB. +/// Keep the decoder's as-shot balance and exposure; this supplies colour, never a Sony/Adobe look. +fn spectral_correction(raw: &RawImage, transform: &CameraTransform) -> Option { + let camera = lightcraft_raw::spectral::find(raw.metadata.make.as_deref(), raw.metadata.model.as_deref()?)?; + let mut color = raw.color.clone(); + if !camera.fill(&mut color) || transform.wb.iter().any(|v| !v.is_finite() || *v <= 0.0) { + return None; + } + let neutral = transform.wb.map(|v| 1.0 / f64::from(v)); + let white = color.as_shot_white_xy.unwrap_or_else(|| lightcraft_raw::color::neutral_to_xy(&color, neutral)); + let measured = lightcraft_raw::color::camera_transform_of(&color, white); + let ratio = std::array::from_fn::<_, 3, _>(|i| f64::from(measured.wb[i] / transform.wb[i])); + let [r, g, b] = ratio; + let matrix = measured.matrix.mul(&Mat3::diag(r, g, b)).mul(&transform.matrix.inverse()?); + matrix.0.iter().flatten().all(|v| v.is_finite()).then_some(matrix) +} + +/// A dull scene cannot determine colour. Try measured colour only after an accepted tone-only +/// partial fit, refitting tone/chroma from scratch. Full fits and partial learned matrices keep +/// their exact result. Keep the old partial unless the new look improves held-out encoded error +/// without increasing linear error; the normal full-fit gates also still apply. +fn refine_tone_only(sensor: &Rgb32f, reference: &Rgb32f, partial: CameraLook, fallback: impl FnOnce() -> Option) -> CameraLook { + if partial.matrix != Mat3::IDENTITY || partial.hue_sat.is_some() { + return partial; + } + let Some(matrix) = fallback() else { return partial }; + let Some((candidate, _)) = search_ordered(sensor, reference, Some((matrix, None)), TONE_FITS) else { return partial }; + let Some((pairs, _)) = collect_pairs(sensor, reference, 0.005, None) else { return partial }; + let error = |look: &CameraLook| { + let tone = ToneMap::camera(&look.tone, 0.0, 0.0, 0.0); + let mut linear = 0.0; + let mut encoded = 0.0; + for (x, target) in pairs.iter().step_by(3) { + let predicted = displayed(look.matrix.apply(*x), &tone); + for (a, b) in predicted.into_iter().zip(target) { + linear += (a - b).powi(2); + encoded += (a.max(0.0).powf(1.0 / 2.2) - b.max(0.0).powf(1.0 / 2.2)).powi(2); + } + } + (linear, encoded) + }; + let (before, before_encoded) = error(&partial); + let (after, after_encoded) = error(&candidate); + if lightcraft_pipeline::profiling() { + eprintln!("[profile] measured candidate linear {before:.6} -> {after:.6}, encoded {before_encoded:.6} -> {after_encoded:.6}"); + } + if after.is_finite() && after_encoded.is_finite() && after <= before && after_encoded < before_encoded { + if lightcraft_pipeline::profiling() { + eprintln!("[profile] camera look: measured colour refines tone-only partial ({before_encoded:.5} -> {after_encoded:.5})"); + } + candidate + } else { + partial + } +} + /// `sensor` with its clipped pixels set to NaN (left out of every training pair), or `None` when /// none is clipped. fn without_clipped(sensor: &Rgb32f, clipped: &[bool]) -> Option { @@ -1190,6 +1258,10 @@ mod tests { let y = luminance_2020(p); *dst = p.map(|v| v * (1.0 - (-2.5 * y).exp()) / y); } + let clipped = vec![false; sensor.data.len()]; + let full = fit_look(&sensor, &reference, &clipped, None).unwrap(); + let preserved = fit_look_with_fallback(&sensor, &reference, &clipped, None, || panic!("full fit must not consult fallback")).unwrap(); + assert_eq!((preserved.matrix, preserved.tone, preserved.hue_sat), (full.matrix, full.tone, full.hue_sat)); let original = sensor.clone(); let fit = fit_pairs(&sensor, &reference).unwrap(); assert_eq!(sensor.data, original.data); @@ -2314,4 +2386,60 @@ mod tests { reference.data.iter_mut().zip(&sensor.data).for_each(|(r, s)| *r = [0.8 * luminance_2020(*s).sqrt(); 3]); assert!(fit_look(&sensor, &reference, &none, None).is_none(), "monochrome JPEG"); } + #[test] + fn measured_colour_refits_tone_only_partial_and_rejects_a_worse_model() { + let mut sensor = Rgb32f::new(96, 64); + for (i, p) in sensor.data.iter_mut().enumerate() { + let y = 0.01 + (i % 37) as f32 * 0.004; + let tint = 1.0 + (i % 5) as f32 * 0.008; + *p = [y * tint, y, y * (2.0 - tint)]; + } + let measured = Mat3([[1.8, -0.8, 0.0], [-0.15, 1.15, 0.0], [0.0, -0.7, 1.7]]); + let mut reference = sensor.clone(); + reference.map_in_place(|p| { + let p = measured.apply(p.map(f64::from)); + let y = luma(p); + p.map(|v| (v * (1.0 - (-12.0 * y).exp()) / y) as f32) + }); + let clipped = vec![false; sensor.data.len()]; + let partial = fit_look(&sensor, &reference, &clipped, None).expect("dull scene keeps a tone-only fit"); + assert_eq!(partial.matrix, Mat3::IDENTITY); + let refined = fit_look_with_fallback(&sensor, &reference, &clipped, None, || Some(measured)).unwrap(); + assert_eq!(refined.matrix, measured, "known colour supplies what the scene cannot learn"); + assert_ne!(refined.tone, partial.tone, "refit tone for the new transform"); + let wrong = Mat3([[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [1.0, 0.0, 0.0]]); + let rejected = fit_look_with_fallback(&sensor, &reference, &clipped, None, || Some(wrong)).unwrap(); + assert_eq!((rejected.matrix, rejected.tone), (partial.matrix, partial.tone)); + let missing = fit_look_with_fallback(&sensor, &reference, &clipped, None, || None).unwrap(); + assert_eq!((missing.matrix, missing.tone), (partial.matrix, partial.tone)); + } + + #[test] + fn existing_learned_colour_does_not_consult_measured_fallback() { + let sensor = Rgb32f::new(1, 1); + let mut learned = dro_test_look(&std::array::from_fn(|i| 0.006 * 1.13f32.powi(i as i32)), &|x| x.sqrt()); + learned.matrix = Mat3([[1.1, -0.1, 0.0], [0.0, 1.0, 0.0], [0.0, -0.1, 1.1]]); + let kept = refine_tone_only(&sensor, &sensor, learned.clone(), || panic!("learned colour must remain unchanged")); + assert_eq!((kept.matrix, kept.tone), (learned.matrix, learned.tone)); + } + + #[test] + fn spectral_correction_is_finite_and_preserves_the_decoder_balance() { + let mut raw = raw_of(RawFormat::Arw, "SONY", "ILCE-7RM4A", Default::default()); + raw.wb_multipliers = Some([2.5, 1.0, 1.6]); + let before = raw.color.clone(); + let transform = lightcraft_raw::color::camera_transform(&raw, lightcraft_raw::color::as_shot_white_xy(&raw)); + let correction = spectral_correction(&raw, &transform).unwrap(); + let neutral = correction.apply(transform.matrix.apply([1.0; 3])); + assert!((neutral[0] - neutral[1]).abs() < 1e-4 && (neutral[1] - neutral[2]).abs() < 1e-4, "{neutral:?}"); + assert_eq!(raw.color, before, "do not mutate the source colour while evaluating a candidate"); + let mut invalid = transform; + invalid.wb[0] = f32::NAN; + assert!(spectral_correction(&raw, &invalid).is_none()); + raw.color.color_matrix[0] = Some(Mat3::IDENTITY); + assert!(spectral_correction(&raw, &transform).is_none(), "never replace file-supplied matrices"); + raw.color = before; + raw.metadata.model = Some("unknown camera".to_owned()); + assert!(spectral_correction(&raw, &transform).is_none()); + } } diff --git a/crates/engine/src/media.rs b/crates/engine/src/media.rs index 6d5b548f1fb..d863060ec9f 100644 --- a/crates/engine/src/media.rs +++ b/crates/engine/src/media.rs @@ -62,7 +62,7 @@ impl SettingsHashes { } /// Bump when the pipeline's output changes, to invalidate cached thumbnails. -pub const RENDER_CACHE_VERSION: u64 = 42; +pub const RENDER_CACHE_VERSION: u64 = 43; /// 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 --git a/docs/camera-preview-colour.md b/docs/camera-preview-colour.md index e933c64f716..d1843550a11 100644 --- a/docs/camera-preview-colour.md +++ b/docs/camera-preview-colour.md @@ -119,14 +119,27 @@ A raw starts from the first of these that is available (`camera_preview::startin 4. the model's spectral matrices, with LightCraft's default tone curve and no JPEG fit; 5. the neutral fallback. -The spectral matrices only replace the neutral fallback: a photo whose JPEG fit is accepted (with or without a -profile) renders exactly as before, and a covered model takes its spectral matrices only when that fit fails the -gates or the file has no usable JPEG. White balance stays relative to the as-shot look for every raw without matrices -of its own, as before, so the catalog's `Photo::relative_wb` and the controls are unchanged. `lightcraft-cli -calibrate` still pools the uncorrected camera colour of covered models, so a profile can be fitted for them. - -No colour-difference measurement of the spectral matrices against the camera JPEG, or against the file-local fit, -is recorded here yet. Whether they should come before the file-local fit for these models is open until one is. +Accepted full JPEG fits and partial fits with a learned colour matrix keep their exact result. A partial +look with an identity matrix and no hue/saturation table can now try the model's measured spectral colour. +The correction is expressed in the existing sensor proxy's working space, keeping the decoder's as-shot balance +and exposure. Tone and chroma are fitted again for that matrix; the old tone is never reused under a different +matrix. The candidate must pass the normal full-fit gates, reduce held-out gamma-encoded squared error and not +increase linear squared error relative to the accepted partial look. Otherwise that partial look is kept. +Clipped sensor samples remain excluded. Missing spectral coverage and file-supplied matrices are unchanged. + +This addresses the partial-fit interaction reported in issue #535. On 64 private ILCE-7RM4A photos, the 63 full +fits are byte-identical. The remaining lion frame changes from identity colour to the measured model: against +Sony Imaging Edge Edit with DRO off, aligned central-crop CIE76 changes from 2.62 to 2.20, mean chroma ratio from +0.416 to 0.726, and mean lightness difference from -0.35 to -0.29 L*. Against the embedded JPEG, CIE76 instead +changes from 1.72 to 1.83; proxy squared error and full-image perceptual error are different measurements, and +Sony Edit and the camera JPEG are different references. This is one affected private scene, not proof of +accuracy across the 52 supported models or Lightroom parity. No private media or fitted profile is bundled. + +When no JPEG look is accepted, spectral matrices still use the default tone as before. White balance stays +relative to the as-shot look for every raw without matrices of its own, so the catalog's `Photo::relative_wb` +and the controls are unchanged. `lightcraft-cli calibrate` still pools the uncorrected camera colour of covered +models. Look version 3 and render cache version 43 refresh cached results; this is a camera-colour source change, +not a change to develop-setting interpretation (`docs/process-versions.md`). ## Smart previews and the look version diff --git a/docs/parity.md b/docs/parity.md index d0bdc35c204..1e271ac919c 100644 --- a/docs/parity.md +++ b/docs/parity.md @@ -299,7 +299,7 @@ under the UI command that wraps it (a no-op error); the UI command now wins. | LR-PROF-ADOBE | Standard raw looks (own equivalents) | P0 | ✅ | `crates/engine/src/presets.rs` (`PROFILES`), `crates/pipeline/src/profiles.rs` | six own looks: Color, Neutral, Vivid, Landscape, Portrait, Monochrome | | LR-PROF-ADAPTIVE | Adaptive profiles | P2 | ⬜ | | | | LR-PROF-CAMERA | Camera-matching looks | P2 | ⬜ | | | -| LR-PROF-CAMERACOLOR | Camera colour calibration (own) | P0 | 🟡 | `crates/raw/src/color.rs`, `crates/raw/src/profile.rs`, `crates/raw/src/gaintable.rs`, `crates/engine/src/camera_preview.rs` | DNG files use the colour matrices and the camera-profile look they carry (`ProfileHueSatMap`, `ProfileLookTable`, `ProfileToneCurve`, read from the file at run time per DNG spec ch. 6 — Lightroom-converted DNGs rendered flat and muted without them, issue #138). A DNG's `ProfileGainTableMap` / `ProfileGainTableMap2` (Apple ProRAW's local tone map; both versions, DNG 1.7 precedence, the file's byte order with a big-endian fallback) is read and written back by DNG export and not rendered by default, as Lightroom Classic renders ProRAW without it (measured on one CC0 iPhone 12 Pro ProRAW); the Profile option "Camera local tone mapping" (`profile.camera_local_tone`, per photo, off by default, `crates/pipeline/src/local_tone.rs`) renders it as the camera does, per output pixel in the scene-linear stage (CPU, also under the GPU path); Sony ARW, Nikon NEF, Panasonic RW2, Fujifilm RAF, Canon CR3 and CR2, Pentax PEF, Samsung SRW and Olympus ORF get a guarded file-local fit to their own embedded JPEG — chromaticity matrix + hue/saturation/value table + tone and chroma curves, relative WB — or, with a bundled or local per-model profile pooled from many photos (`lightcraft-cli calibrate`, ARW, NEF and RAF so far, `crates/engine/src/camera_profiles.rs`), the profile's colour and only their own tone/chroma curves (on 29 held-out ILCE-7M4 photos mean ΔE vs the camera JPEG 3.54 → 3.10; bundled ILCE-7CR from 125 photos: 26 held-out 4.07 → 3.29, and every one of the 131 photos accepted, 8 of which fell back to neutral without it), kept with smart previews (see docs/camera-preview-colour.md); Sony ARWs shot with DRO on (maker note `0xb025`, on by default) keep that colour but their tone curve is lowered to Sony's curve without DRO, whose lifted shadows are in the camera JPEG only (issue #244: 8 ILCE-7CR photos +6.4 → +0.8 L* from Lightroom's default, median ΔE 7.5 → 3.3); 52 models without a profile whose JPEG fit fails (or that have no usable JPEG) start from DNG-style matrices fitted to their measured spectral sensitivities instead of the neutral fallback (`crates/raw/src/spectral.rs`, rawtoaces-data v1.1.0, Apache-2.0, aliases included; not yet measured against the camera JPEG); ARW: on 10 public raw.pixls.us samples from 8 bodies 7 fits were accepted, mean ΔE vs the camera JPEG 17–26 → 3–10; NEF: 13 of 13 decodable samples (D750, D780, D850, D7500, Z 50 and local D7500 shots) accepted, ΔE 13–46 → 3–8 (issue #150); RW2 / RWL: 140 of 174 public samples accepted, from 93 of the 114 bodies with a preview, median ΔE 5.0 with matching lightness (13 of the 14 corpus files with a preview: ΔE 9.6–27 → 2.8–8.9; most rejections are compacts and kit zooms whose camera JPEG is distortion-corrected); a fit that fails the gates on all pixels is retried away from edges, where a lens-corrected camera JPEG still lines up (issue #232: the six distortion-corrected public ILCE-7RM2 samples ΔE 16.6–16.9 → 3.7–3.8, the corpus GX80 19.1 → 7.9); RAF: bundled X-H2S/X-T4 profiles from 201/545 photos; on 150 withheld files mean ΔE improves slightly over per-file fitting (X-H2S 1.70 → 1.62, X-T4 2.43 → 2.34); 23 of 24 references from 13 bodies accepted, including the dark X-H2S samples (8.74 → 2.25); ORF: the 3 decodable corpus files (E-1, E-400, XZ-2) accepted (`docs/camera-preview-colour.md`); this is not measured camera calibration; other raws and rejected fits use a neutral fallback (camera RGB ≈ linear sRGB, `matrix_is_fallback`) with as-shot white balance, so colours are muted and not accurate. Needs our own per-camera calibration: matrices the files carry themselves (e.g. Olympus `ColorMatrix`), fitting each camera to its own embedded JPEG, then chart shots. Adobe matrices / DCPs are never used. Biggest image-quality gap today | +| LR-PROF-CAMERACOLOR | Camera colour calibration (own) | P0 | 🟡 | `crates/raw/src/color.rs`, `crates/raw/src/profile.rs`, `crates/raw/src/gaintable.rs`, `crates/engine/src/camera_preview.rs` | DNG files use the colour matrices and the camera-profile look they carry (`ProfileHueSatMap`, `ProfileLookTable`, `ProfileToneCurve`, read from the file at run time per DNG spec ch. 6 — Lightroom-converted DNGs rendered flat and muted without them, issue #138). A DNG's `ProfileGainTableMap` / `ProfileGainTableMap2` (Apple ProRAW's local tone map; both versions, DNG 1.7 precedence, the file's byte order with a big-endian fallback) is read and written back by DNG export and not rendered by default, as Lightroom Classic renders ProRAW without it (measured on one CC0 iPhone 12 Pro ProRAW); the Profile option "Camera local tone mapping" (`profile.camera_local_tone`, per photo, off by default, `crates/pipeline/src/local_tone.rs`) renders it as the camera does, per output pixel in the scene-linear stage (CPU, also under the GPU path); Sony ARW, Nikon NEF, Panasonic RW2, Fujifilm RAF, Canon CR3 and CR2, Pentax PEF, Samsung SRW and Olympus ORF get a guarded file-local fit to their own embedded JPEG — chromaticity matrix + hue/saturation/value table + tone and chroma curves, relative WB — or, with a bundled or local per-model profile pooled from many photos (`lightcraft-cli calibrate`, ARW, NEF and RAF so far, `crates/engine/src/camera_profiles.rs`), the profile's colour and only their own tone/chroma curves (on 29 held-out ILCE-7M4 photos mean ΔE vs the camera JPEG 3.54 → 3.10; bundled ILCE-7CR from 125 photos: 26 held-out 4.07 → 3.29, and every one of the 131 photos accepted, 8 of which fell back to neutral without it), kept with smart previews (see docs/camera-preview-colour.md); Sony ARWs shot with DRO on (maker note `0xb025`, on by default) keep that colour but their tone curve is lowered to Sony's curve without DRO, whose lifted shadows are in the camera JPEG only (issue #244: 8 ILCE-7CR photos +6.4 → +0.8 L* from Lightroom's default, median ΔE 7.5 → 3.3); Tone-only partial fits can use measured spectral colour after refitting tone/chroma and passing both the normal fit gates and a held-out comparison with the partial look (issue #535); successful full fits are unchanged. 52 models without a profile whose JPEG fit fails (or that have no usable JPEG) start from DNG-style matrices fitted to their measured spectral sensitivities instead of the neutral fallback (`crates/raw/src/spectral.rs`, rawtoaces-data v1.1.0, Apache-2.0, aliases included; not yet measured against the camera JPEG); ARW: on 10 public raw.pixls.us samples from 8 bodies 7 fits were accepted, mean ΔE vs the camera JPEG 17–26 → 3–10; NEF: 13 of 13 decodable samples (D750, D780, D850, D7500, Z 50 and local D7500 shots) accepted, ΔE 13–46 → 3–8 (issue #150); RW2 / RWL: 140 of 174 public samples accepted, from 93 of the 114 bodies with a preview, median ΔE 5.0 with matching lightness (13 of the 14 corpus files with a preview: ΔE 9.6–27 → 2.8–8.9; most rejections are compacts and kit zooms whose camera JPEG is distortion-corrected); a fit that fails the gates on all pixels is retried away from edges, where a lens-corrected camera JPEG still lines up (issue #232: the six distortion-corrected public ILCE-7RM2 samples ΔE 16.6–16.9 → 3.7–3.8, the corpus GX80 19.1 → 7.9); RAF: bundled X-H2S/X-T4 profiles from 201/545 photos; on 150 withheld files mean ΔE improves slightly over per-file fitting (X-H2S 1.70 → 1.62, X-T4 2.43 → 2.34); 23 of 24 references from 13 bodies accepted, including the dark X-H2S samples (8.74 → 2.25); ORF: the 3 decodable corpus files (E-1, E-400, XZ-2) accepted (`docs/camera-preview-colour.md`); this is not measured camera calibration; other raws and rejected fits use a neutral fallback (camera RGB ≈ linear sRGB, `matrix_is_fallback`) with as-shot white balance, so colours are muted and not accurate. Needs our own per-camera calibration: matrices the files carry themselves (e.g. Olympus `ColorMatrix`), fitting each camera to its own embedded JPEG, then chart shots. Adobe matrices / DCPs are never used. Biggest image-quality gap today | | LR-PROF-CREATIVE | Creative profiles (own) | P2 | ✅ | `cmd:develop.profile`, `crates/pipeline/src/profiles.rs` | 16 own looks in Film / Cinematic / Muted / B&W (tone + point-curve fades, colour grading, mixer / B&W mix); scale with `ctl:profile.amount`; sliders untouched | | LR-PROF-LEGACY | Legacy profiles | P2 | ⬜ | | | | LR-PROF-NONRAW | Profiles for non-raw files | P0 | ✅ | `cmd:develop.profile` | same looks apply to JPEG/TIFF | diff --git a/docs/whats-new.md b/docs/whats-new.md index fb1fd316559..5f6b77cffc4 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,12 @@ ## October 2026 +### Colour in partial camera looks +- When a photo's JPEG fit can supply tone but cannot learn a colour matrix, LightCraft can try the camera's + existing measured spectral colour and refit tone and chroma. It keeps the partial look unless the candidate + passes the fit gates and improves held-out error. Successful full fits are unchanged (issue #535). + + ### Activity stack - Long-running tasks show in one place, top left under the top bar, as in Lightroom Classic (issue #345): imports and folder scans, exports (and the contact sheet PDF), Synchronize Folder, Build / Smart Previews, Lightroom catalog import, Photo Merge, model downloads, the face scan,