LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #1543
Brandon Thomas418f6255be3a
diff --cc crates/engine/src/export.rsindex e04fe6f44,e0649b65d..403cb71f6--- a/crates/engine/src/export.rs+++ b/crates/engine/src/export.rs@@@ -131,9 -135,11 +135,12 @@@ impl ResizeResizeMode::Percent => v / 100.0,};let k = if self.dont_enlarge { k.min(1.0) } else { k };+ // an enlargement stops at 512 megapixels (Lightroom's ceiling too): 20000 typed for 2000+ // with Don't Enlarge off asked for gigapixels, more memory than a computer has+ let k = k.min((MAX_ENLARGED_PIXELS / (w * h)).sqrt().max(1.0));- // at least one pixel, at most the encoders' 65535 limit- k.clamp(1.0 / short, 65_535.0 / long)+ // at least one pixel, at most the encoders' 65535 limit; the limit wins for a photo more+ // than 65535 times as long as it is short (where `clamp` would panic: min above max)+ k.max(1.0 / short).min(65_535.0 / long)}/// Output size for a `w × h` (cropped, full-resolution) photo.diff --cc docs/parity-checklist.mdindex 30031725a,5b787de58..eb6e53f18--- a/docs/parity-checklist.md+++ b/docs/parity-checklist.md@@@ -1,11 -1,6 +1,12 @@@# Lightroom parity checklist+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-13 · **Change:** minor (KEYC-SELECTONLYACTIVE: Select Only Active Photo, ⌘⇧D; LR-MERGE-HDR: merges of raws without colour matrices keep their colour (#965); rapid slider entry; LR-PROF-CAMERACOLOR: tone curve from black-and-white camera JPEGs; LR-VIEW-ZOOM, LR-VIEW-COMPARE: Compare and Reference zoom windows; LR-IMP-FORMATS, LR-IMP-CAMERA-COVERAGE: EOS R5 Mark II CR3 decodes; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; filesystem history retry/Undo/Redo evidence; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-13 · **Change:** minor (LR-BEHAV-AUTOSAVE: damaged snapshots are repaired on open; LR-MERGE-HDR: merges of raws without colour matrices keep their colour (#965); rapid slider entry; LR-PROF-CAMERACOLOR: tone curve from black-and-white camera JPEGs; LR-VIEW-ZOOM, LR-VIEW-COMPARE: Compare and Reference zoom windows; LR-IMP-FORMATS, LR-IMP-CAMERA-COVERAGE: EOS R5 Mark II CR3 decodes; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; filesystem history retry/Undo/Redo evidence; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-13 · **Change:** minor (LR-EDIT-OPTICS-PROFILE: Nikon Z 6II / Z f in-file distortion correction; LR-MERGE-HDR: merges of raws without colour matrices keep their colour (#965); rapid slider entry; LR-PROF-CAMERACOLOR: tone curve from black-and-white camera JPEGs; LR-VIEW-ZOOM, LR-VIEW-COMPARE: Compare and Reference zoom windows; LR-IMP-FORMATS, LR-IMP-CAMERA-COVERAGE: EOS R5 Mark II CR3 decodes; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; filesystem history retry/Undo/Redo evidence; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (rapid slider entry; LR-PROF-CAMERACOLOR: tone curve from black-and-white camera JPEGs; LR-VIEW-ZOOM, LR-VIEW-COMPARE: Compare and Reference zoom windows; LR-IMP-FORMATS, LR-IMP-CAMERA-COVERAGE: EOS R5 Mark II CR3 decodes; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; filesystem history retry/Undo/Redo evidence; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; Model folder/error/retry) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-13 · **Change:** minor (LRC-LIB-CATALOG-IMPORT: catalogs whose tables are all in the WAL open; LR-MERGE-HDR: merges of raws without colour matrices keep their colour (#965); rapid slider entry; LR-PROF-CAMERACOLOR: tone curve from black-and-white camera JPEGs; LR-VIEW-ZOOM, LR-VIEW-COMPARE: Compare and Reference zoom windows; LR-IMP-FORMATS, LR-IMP-CAMERA-COVERAGE: EOS R5 Mark II CR3 decodes; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; filesystem history retry/Undo/Redo evidence; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-14 · **Change:** minor (LR-MERGE-HDR: merges of raws without colour matrices keep their colour (#965); rapid slider entry; LR-PROF-CAMERACOLOR: tone curve from black-and-white camera JPEGs; LR-VIEW-ZOOM, LR-VIEW-COMPARE: Compare and Reference zoom windows; LR-IMP-FORMATS, LR-IMP-CAMERA-COVERAGE: EOS R5 Mark II CR3 decodes; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; filesystem history retry/Undo/Redo evidence; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6+ > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-13 · **Change:** minor (LR-EXP-DIM: enlargements stop at 512 MP and must fit in memory; LR-MERGE-HDR: merges of raws without colour matrices keep their colour (#965); rapid slider entry; LR-PROF-CAMERACOLOR: tone curve from black-and-white camera JPEGs; LR-VIEW-ZOOM, LR-VIEW-COMPARE: Compare and Reference zoom windows; LR-IMP-FORMATS, LR-IMP-CAMERA-COVERAGE: EOS R5 Mark II CR3 decodes; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md; filesystem history retry/Undo/Redo evidence; renamed from `parity.md`; Top gaps moved to gaps.md, shortcut notes to ui-parity.md) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6The measured, row-by-row checklist: one row per Lightroom feature, menu item and shortcut, what wehave and what is missing. It answers *does the feature exist?* (feature breadth). Whether it is good@@@ -797,10 -789,7 +798,11 @@@ Latin stays upright. Advanced Japanese| Date | Change | Summary ||---|---|---|+| 2026-10-13 | patch | LR-VIEW-COMPARE, LRC-LIB-COMPARE: ⌘/Ctrl- and Shift-clicks on the filmstrip in Compare change the selection as in the grid; the two photos shown stay selected and the active photo is unchanged (#187); statuses unchanged |+| 2026-10-13 | minor | KEYC-SELECTONLYACTIVE: Edit → Select Only Active Photo (⌘⇧D) lands as a new row; status 🟡 (headless-tested, native macOS menu path unverified) |+| 2026-10-13 | patch | LRC-LIB-CATALOG-IMPORT: a catalog whose tables are all still in its `-wal` file (main file schema format 0) opens instead of failing as an unsupported schema format; status unchanged |+| 2026-10-14 | patch | LR-REM-HEAL, LR-REM-CLONE: zero-feather edges preserve exact-radius pixels; zero-opacity regression covers all spot modes and image corners. Statuses and feature counts unchanged. |+ | 2026-10-13 | patch | LR-EXP-DIM: an enlarged export stops at 512 megapixels and is refused when it needs more memory than the computer has, instead of aborting the app; status unchanged || 2026-10-11 | minor | LR-MERGE-HDR: HDR and panorama merges of raws without colour matrices (CR2, NEF, ARW…) write the colour they open with as DNG tags (issue #965); status unchanged || 2026-10-12 | minor | LR-META-XMP: Read Metadata from File no longer auto-writes the sidecar it has just read, which added `lc:settings` and hid another app's later `crs:` edits (#934); status unchanged (✅) || 2026-10-12 | patch | LR-IMP-CAMERA-COVERAGE: CR2 white level from the active area, not the saturated masked rows above it (issue #1272); status unchanged (🟡) |diff --cc docs/whats-new.mdindex bc70ba56c,f265ae827..cff4decfd--- a/docs/whats-new.md+++ b/docs/whats-new.md@@@ -1,110 -1,12 +1,115 @@@# What's new in LightCraft+## 2026-10-14++### Hard-edged Heal and Clone spots+- A spot with Feather at 0 no longer draws black pixels exactly on its radius. This also fixes spots at 0% Opacity+ changing pixels along their edge. The hard edge now leaves pixels on the radius unchanged.++## 2026-10-13++### HDR merges keep the lens correction+- An HDR made with Photo ▸ Photo Merge ▸ HDR now keeps the lens correction the photos carry (Sony's, Panasonic's+ and Leica's, and the one some DNGs carry, e.g. from drones): Optics ▸ Enable Lens Corrections straightens it as it+ does the photos it was made from. HDRs merged before this don't have it; merge them again.++### Portable mode+- A file named `portable.txt` next to the LightCraft program makes it keep its settings, logs and downloaded+ models in a `LightCraftData` folder beside it instead of the per-user settings folder (issue #1200), as+ PhotoCraft does. If that folder can't be written, the usual folder is used and the log says why.++### Reliability+- A photo whose Defringe amount was stored far past the sliders' 20 (in a damaged catalog or sidecar) no longer+ crashes LightCraft each time it renders: the amount acts as 20.++### Reliability+- Importing a preset zip that unpacks to far more than any preset (a "zip bomb") is refused with a message naming+ the file, instead of asking for gigabytes of memory, which could end LightCraft.++### Reliability+- A crop of no size (from an agent or a sidecar) no longer gives the Detail view a photo of no size to lay out+ (its width over its height was 0 / 0, which stopped debug builds); it shows as a single pixel's colour.++### Reliability+- A crop a hair wide (or of no size), set by an agent or read from a sidecar, no longer crashes or hangs the+ render with Clarity, Dehaze, Texture or Highlights / Shadows on: their blurs are held to the picture's size.+- A crop of no size with healing spots or masks no longer crashes the render: samples outside the picture read its+ edge.++### Reliability+- A library whose catalog file was damaged (or edited by hand) in a way that still reads no longer crashes+ LightCraft when it shows a stack, or hangs it when a folder is moved: on opening, records are put back under+ their own ids, stacks keep only photos that exist (at least two), folders inside themselves move to the top,+ and new photos never reuse an id in use. What was repaired is written to the log.++### Nikon lens corrections+- Raws from the Nikon Z 6II and Z f now open with the camera's own distortion correction, as Lightroom applies a+ built-in profile: straight lines near the edges stay straight and the framing matches the camera's JPEG. It works+ with Z lenses and with F-mount lenses on the FTZ adapter, follows the in-body stabilisation's shift of the optical+ centre, and can be turned off under Lens Corrections. Vignetting correction from the file comes later.++### Thumbnail cache stays in its folder+- The thumbnail cache no longer follows a shard folder (`thumbs/ab/`) that is a symlink or junction to somewhere+ else (issue #1504): trimming or clearing the cache can't delete files outside it, and thumbnails are never read+ from or written through such a link.## 2026-10-13+### Large libraries: Synchronize Folder, import and sidecars start sooner+- Opening Synchronize Folder, an import review or an import no longer makes a table of every photo in the library+ before it looks at the first file. In a library of 3.5 million photos that held the window for about 6 s before+ a Synchronize scan began (now under 1 s), 2.6 s before an import review (now 0.05 s) and 1.7 s before an import+ (now 0.05 s). The scan looks up only the files it finds and the contents it reads, on its own thread.+- Writing one photo's XMP sidecar (Save Metadata to File, or automatically after an edit) no longer works out who+ owns every shared sidecar name in the library: 2.4 s a write in that library, now under 1 s.+- Nothing else changes: the same files are found new, already there, moved or missing, and sidecars get the same+ names.++### Faces load faster in the People view+- Faces on unedited raws are cut from the camera's preview inside the file instead of developing the raw (issue+ #1440): a Sony α1 face reads 8 MB instead of 70 MB, an A7S III face about 1 MB instead of 24 MB, several times+ faster on an external hard disk. A face whose preview is too small, and any edited photo, is still developed from+ the raw, so it keeps its look.+- Raws whose preview is in Adobe RGB (Sony α1 among others) no longer read the whole file for their grid thumbnail:+ only the header and the preview are read, as for other raws.+- Faces are kept in the thumbnail cache at a few fixed sizes, so moving the thumbnail slider no longer renders them+ all again.++### Reliability+- A raw file whose black level is stored as "not a number" (or infinity), or a floating-point DNG with such+ samples, no longer crashes LightCraft at 1:1 or on export: the bad values read as black.++### Reliability+- Exporting a photo more than 65,535 times as long as it is wide (a one-pixel strip), or opening the Export dialog's+ watermark preview for it, no longer crashes LightCraft; the export is capped at the encoders' 65,535 pixels.++### Reliability+- Dragging a Tone Curve point that sits very close to its neighbours (two clicks side by side, or a curve from a+ sidecar, a preset or an agent) no longer crashes LightCraft; the point stays between them. Curve points sent to+ `develop.curve` are kept in order, and a sidecar curve with a "NaN" or "inf" point is ignored.++### Reliability+- A demo photo whose stored size was damaged (a width of 4294967295) is rendered at its own size instead of+ one that overflows.++### DNG camera identity+- DNG export and Convert to DNG no longer duplicate the camera make when the model already+ contains it: `Canon EOS R6` stays `Canon EOS R6`, rather than `Canon Canon EOS R6` (the camera+ identity subissue in #840). The separate Make and Model tags keep their original values.+ This does not change colour matrices, camera calibration or RAW noise rendering.+### Building from source+- The English and Simplified Chinese build guides now describe command-local job and release+ profile overrides for memory-constrained builders (issue #1196), including why packaging+ recipes can override inherited settings. Default release profiles and application behavior+ are unchanged; the guidance does not guarantee a build will fit every 16 GB machine.+### Lightroom catalog import+- A Lightroom Classic catalog whose changes are all still in its `.lrcat-wal` file (a new catalog Lightroom has+ open and hasn't written back yet) imports instead of failing with "unsupported SQLite schema format".++ ### Reliability+ - An export enlarged far past the photo's size (20000 typed for 2000 with Don't Enlarge off) no longer ends+ LightCraft: an enlargement stops at 512 megapixels, as in Lightroom, and one that needs more memory than the+ computer has is refused with the size it would take, before it starts.+### Slider drags on large raws- Dragging a slider no longer re-renders the edited photo's filmstrip thumbnail on every frame; it follows once youlet go. On a 64 MP raw the first of those renders decoded the whole file again, which held up the loupe's