LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #953
Claudee1016acc0f03
diff --cc apps/lightcraft/src/main.rsindex 288cb095f,a24bec62b..42435e39b--- a/apps/lightcraft/src/main.rs+++ b/apps/lightcraft/src/main.rs@@@ -443,30 -422,10 +444,10 @@@ fn services(cc: &eframe::CreationContex.map(|p| p.to_string_lossy().to_string())})),pick_folder: Some(Box::new(|| {- rfd::FileDialog::new().set_title(lightcraft_ui_egui::i18n::tr("Open Library")).pick_folder().map(|p| p.to_string_lossy().to_string())+ file_dialog().set_title(lightcraft_ui_egui::i18n::tr("Open Library")).pick_folder().map(|p| p.to_string_lossy().to_string())})),- open_with: Some(Box::new(|path: &str, app: &str| {- // spawned, never waited for: the editor runs alongside- let app = app.trim();- let mut c = if cfg!(target_os = "macos") {- let mut c = std::process::Command::new("open");- if !app.is_empty() {- c.args(["-a", app]);- }- c- } else if app.is_empty() {- if cfg!(target_os = "windows") {- let mut c = std::process::Command::new("cmd");- c.args(["/C", "start", ""]);- c- } else {- std::process::Command::new("xdg-open")- }- } else {- std::process::Command::new(app)- };- c.arg(path).spawn().map(|_| ()).map_err(|e| e.to_string())- })),+ open_with: Some(Box::new(editors::open_with)),+ check_editor: Some(Box::new(editors::check)),open_url: Some(Box::new(|url: &str| {if !url.starts_with("https://") {return Err("only https links are opened".into());diff --cc crates/codecs/src/lib.rsindex 79763ca2e,744b386a2..bd573248c--- a/crates/codecs/src/lib.rs+++ b/crates/codecs/src/lib.rs@@@ -38,7 -37,7 +38,7 @@@ mod webppub use encode::{ChromaSubsampling, EncodeImage, EncodeMeta, HDR_REFERENCE_WHITE_NITS, Samples, TiffCompression, encode_avif, encode_avif_pq, encode_jpeg,- encode_png, encode_png_pq, encode_tiff, encode_webp_lossless,- encode_png, encode_psd, encode_tiff, encode_webp_lossless,++ encode_png, encode_png_pq, encode_psd, encode_tiff, encode_webp_lossless,};pub use sniff::{Format, sniff};pub use space::{NamedSpace, SourceSpace, SpaceOrigin, Trc};diff --cc crates/engine/src/export.rsindex ebfaf92ef,6ee07f641..fdfbf5509--- a/crates/engine/src/export.rs+++ b/crates/engine/src/export.rs@@@ -1366,9 -1291,9 +1374,10 @@@ pub fn encode_deep(img: &DeepImage, o:DeepSamples::F32(v) => EncodeImage::new(w, h, 3, Samples::F32(v)),};let r = match (o.format, &img.samples) {+ (ExportFormat::Png, DeepSamples::F32(v)) if img.space == OutputSpace::Rec2020 => lightcraft_codecs::encode_png_pq(w, h, v, &meta),(ExportFormat::Png, _) => encode::encode_png(&e, &meta),(ExportFormat::Tiff, _) => encode::encode_tiff(&e, o.tiff_compression, &meta),+ (ExportFormat::Psd, _) => encode::encode_psd(&e, &meta),(ExportFormat::Avif, DeepSamples::F32(v)) if img.space == OutputSpace::Rec2020 => {lightcraft_codecs::encode_avif_pq(w, h, v, o.quality, 8, &meta)}diff --cc docs/parity-checklist.mdindex ff41676e9,3011a1a8d..7c345055d--- a/docs/parity-checklist.md+++ b/docs/parity-checklist.md@@@ -382,8 -381,8 +382,8 @@@ differences and missing bindings are i| Id | Feature | Tier | Status | Evidence | Missing / notes ||---|---|---|---|---|---|-| LR-EXP-DIALOG | Export dialog | P0 | ✅ | `cmd:dialog.export`, `cmd:app.export` (`preset`), `cmd:export.presets`, `cmd:export.savePreset`, `cmd:export.deletePreset`, `crates/ui-egui/src/panels/dialogs.rs`, `crates/engine/src/export.rs` | batch export; built-in presets (JPEG Small 2048 px / Large full size, Original + Settings, DNG) and saved user presets (library prefs) load into the dialog; deleting a user preset is command-only |+| LR-EXP-DIALOG | Export dialog | P0 | ✅ | `cmd:dialog.export`, `cmd:app.export` (`preset`), `cmd:export.presets`, `cmd:export.savePreset`, `cmd:export.deletePreset`, `crates/ui-egui/src/panels/dialogs.rs`, `crates/engine/src/export.rs` | batch export; built-in presets (JPEG Small 2048 px / Large full size, Original + Settings, DNG) and saved user presets (library prefs) load into the dialog; deleting a user preset is command-only; on a short window the options scroll and Cancel / OK stay visible (LR-BEHAV-DIALOGS, issue #781) |- | LR-EXP-TYPE | File types | P0 | ✅ | `cmd:app.export` (`format`), `crates/engine/src/export.rs` (`ExportFormat`), `crates/engine/src/tests_export.rs` | JPEG, PNG, TIFF, WebP, AVIF, DNG (raw photos: lossless re-encode with the edits in the embedded XMP), Original (+ XMP sidecar). No JXL encoder; non-raw → DNG not supported |+ | LR-EXP-TYPE | File types | P0 | ✅ | `cmd:app.export` (`format`), `crates/engine/src/export.rs` (`ExportFormat`), `crates/engine/src/tests_export.rs` | JPEG, PNG, TIFF, PSD (flat, 8/16-bit, no layers: `crates/codecs/src/psd.rs`), WebP, AVIF, DNG (raw photos: lossless re-encode with the edits in the embedded XMP), Original (+ XMP sidecar). No JXL encoder; non-raw → DNG not supported || LR-EXP-DIM | Output size | P0 | ✅ | `cmd:app.export` (`longEdge`, `shortEdge`, `width`, `height`, `megapixels`, `percent`, `dontEnlarge`, `ppi`), `crates/engine/src/export.rs` (`Resize`), `crates/ui-egui/src/panels/dialogs.rs` | full size = the cropped native size (no longer upscaled); W × H fits either orientation; ppi written to JFIF / pHYs / TIFF tags || LR-EXP-QUALITY | JPEG quality | P0 | ✅ | `cmd:app.export` (`quality`, `limitKb`) | || LR-EXP-BITDEPTH | Bit depth | P1 | ✅ | `cmd:app.export` (`bitDepth`), `crates/pipeline/src/output.rs` (`OutputDepth`), `crates/engine/src/export.rs` | 16-bit PNG/TIFF rendered at 16 bits (TIFF defaults to 16), 32-bit float linear TIFF with a linear profile, 10-bit AVIF; high-bit-depth renders run on the CPU |diff --cc docs/whats-new.mdindex 6291ae308,b1b154371..95b298ba0--- a/docs/whats-new.md+++ b/docs/whats-new.md@@@ -2,34 -2,18 +2,44 @@@## 2026-10-11+### Open Library knows a Lightroom catalog+- Choosing a Lightroom Classic catalog folder in File → Open Library… (or one of its `Previews.lrdata` /+ `.lrcat-data` folders, or the `.lrcat`) no longer makes an empty LightCraft library inside it (issue #891). The+ library open now stays, and LightCraft says "This is a Lightroom catalog, not a LightCraft library" and offers+ **Import Lightroom Catalog…** with that catalog, or Cancel. `lightcraft-cli --library` refuses those folders too.++### Canon EOS R5 Mark II+- Canon EOS R5 Mark II C-RAW files that opened as "preview only" (more than half of them, depending on the+ scene) now develop from their sensor data with every editing tool, like the camera's other raws. Photos+ imported earlier switch over with Photo ▸ Reload from Disk.++### Switching libraries+- File ▸ New Library… asks for a name, then where to put it, and opens the new library (issue #902).+- File ▸ Open Recent Library lists the last 8 libraries; ones that are gone (moved, drive disconnected) are greyed+ out. Clear Recent Libraries empties the list.+- The open library's name shows under My Photos at the top of the left panel and in the window title.+- `lightcraft-cli --library` given a library's own file (`catalog.snap`) opens its folder instead of failing with+ "File exists".+- Agents use `app.newLibrary {path, name}`, `app.recentLibraries` and `app.clearRecentLibraries`.++ ### Edit in PhotoCraft+ - Right-click a photo ▸ Edit In ▸ Edit in PhotoCraft (or Photo ▸ Edit In, ⇧⌘E) renders a copy with your edits, stacks it+ with the original and opens it in PhotoCraft. LightCraft finds PhotoCraft where its installer put it (Windows,+ macOS, Linux packages, AppImage, Flatpak), and says so if it isn't installed, before making a copy.+ - The copy is a 16-bit PSD by default, which PhotoCraft saves straight back to with File ▸ Save; when you come back to+ LightCraft the copy shows what you saved.+ - Settings ▸ General ▸ External Editing: the format (PSD or TIFF), colour space and bit depth for PhotoCraft and for+ the other editor (Edit in Other Editor, now ⌥⌘E), and where PhotoCraft is if you use a portable copy.+ - Export can write PSD too (flat, 8- or 16-bit).+## 2026-10-10+### Dialogs fit the window+- A dialog taller than the window no longer runs off it (issue #781): on a 1366×768 screen the Export dialog's title+ and its Cancel / OK buttons were off screen, so it couldn't be confirmed. Now its options scroll and the title and+ buttons stay visible. Long lists in dialogs (What's New, All Metadata, Keyboard Shortcuts) get shorter to fit.+ Dialogs that fit look as before.+### Activity stack- Long-running tasks show in one place, top left under the top bar, as in Lightroom Classic (issue #345): imports andfolder scans, exports (and the contact sheet PDF), Synchronize Folder, Build / Smart Previews, Lightroom catalog import, Photo Merge, model downloads, the face scan,