Skip to content

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

Merge PR #612

Brandon Thomas987a572512d6
diff --cc crates/pipeline/src/finish.rs
index 6971527fb,04db51464..1831126cc
--- a/crates/pipeline/src/finish.rs
+++ b/crates/pipeline/src/finish.rs
@@@ -254,24 -260,26 +254,41 @@@ impl FinishParams
view: frame.view.map_or([0.0, 0.0, w as f32, h as f32], |v| [v.x as f32, v.y as f32, v.full_w as f32, v.full_h as f32]),
}
}
+
+ /// Render into a display's primaries (sRGB curve) instead of the output space, soft proof
+ /// included (see [`crate::DisplaySpace`]).
+ pub fn for_display(&mut self, d: &crate::DisplaySpace, proof: Option<crate::Proof>) {
+ self.to_out = d.from_working;
+ self.out_luma = d.luma;
+ self.out_trc = OutputTrc::Srgb;
+ self.proof = proof.map(|pr| pr.params_display(d));
+ }
}
+/// The base tone map (scene → display luminance, with Contrast, Whites and Blacks) of `s`'s
+/// rendering process. This is where a new tone model branches: a retuned default tone curve (issue
+/// #146) is a new [`Process`] with its own arm here, and V1's arm stays as it is, so photos edited
+/// under V1 keep their look (`docs/process-versions.md`). CPU and GPU both take it from here.
+pub fn base_tone(s: &DevelopSettings, info: &SourceInfo) -> ToneMap {
+ let l = &s.light;
+ match s.process.process() {
+ Process::V1 => match info.camera_tone.as_ref().filter(|_| info.raw) {
+ Some(curve) => ToneMap::camera(curve, l.contrast, l.whites, l.blacks),
+ None if info.raw => ToneMap::new(l.contrast, l.whites, l.blacks),
+ None => ToneMap::display(l.contrast, l.whites, l.blacks),
+ },
+ }
+}
+
- pub(crate) fn finish(p: &Prepared, s: &DevelopSettings, frame: &Frame, info: &SourceInfo, space: OutputSpace, proof: Option<crate::Proof>) -> Rgba8 {
+ pub(crate) fn finish(
+ p: &Prepared,
+ s: &DevelopSettings,
+ frame: &Frame,
+ info: &SourceInfo,
+ space: OutputSpace,
+ display: Option<&crate::DisplaySpace>,
+ proof: Option<crate::Proof>,
+ ) -> Rgba8 {
let (w, h) = (p.img.width, p.img.height);
let mut fp = FinishParams::new(s, frame, info, w, h, p.px_per_long, p.air, space);
fp.proof = proof.map(|pr| pr.params(space));
diff --cc crates/ui-egui/src/lib.rs
index aad48ee3a,7a8f20679..bfeb198e2
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@@ -137,12 -115,10 +137,14 @@@ pub struct Services
pub pick_preset_files: Option<PickFiles>,
/// Open dialog for a GPS track log (`.gpx`; Photo ▸ Auto-Tag from Tracklog…).
pub pick_tracklog: Option<PickFiles>,
+ /// Open dialog for a monitor ICC profile (`.icc` / `.icm`; Settings ▸ Display; desktop only).
+ pub pick_display_profile: Option<PickFiles>,
/// Save dialog for an exported `.lcpreset` file.
pub save_preset_file: Option<SaveFile>,
+ /// Open dialog for a keyword list file (`.txt`, Photo Supreme's `.utf8`; File ▸ Import Keywords…).
+ pub pick_keyword_list: Option<PickFiles>,
+ /// Save dialog for an exported keyword list (File ▸ Export Keywords…).
+ pub save_keyword_list: Option<SaveFile>,
/// Open dialog for point-curve preset files (`.lccurve`).
pub pick_curve_preset_files: Option<PickFiles>,
/// Save dialog for an exported `.lccurve` file.
diff --cc docs/parity.md
index c91d6ad4a,d573ea7bc..81e6acf25
--- a/docs/parity.md
+++ b/docs/parity.md
@@@ -42,9 -42,9 +42,9 @@@ and prints the summary; `cargo xtask pa
| S. Export (EXP) | 15 | 1 | 2 | 0 | 7/7 (100%) | 7/7 (100%) |
| T. Share (SHARE) | 0 | 0 | 0 | 4 | — | — |
| U. Map & location (MAP) | 0 | 1 | 1 | 0 | — | 0/1 (0%) |
- | V. Preferences (PREF) | 6 | 1 | 2 | 2 | 1/1 (100%) | 4/4 (100%) |
+ | V. Preferences (PREF) | 7 | 1 | 2 | 2 | 1/1 (100%) | 5/5 (100%) |
| W. Cloud & AI infrastructure (CLOUD / AI) | 1 | 0 | 1 | 2 | — | — |
-| X. Cross-cutting behaviours (BEHAV) | 18 | 5 | 1 | 1 | 8/8 (100%) | 6/8 (75%) |
+| X. Cross-cutting behaviours (BEHAV) | 18 | 6 | 1 | 1 | 8/8 (100%) | 6/9 (67%) |
| Y. Menus | 82 | 0 | 4 | 8 | 47/47 (100%) | 23/23 (100%) |
| Z. Keyboard shortcuts (desktop) | 75 | 3 | 3 | 1 | 49/52 (94%) | 23/24 (96%) |
| Lightroom Classic extras | 32 | 11 | 39 | 9 | — | 22/24 (92%) |
diff --cc docs/whats-new.md
index e36bad15d,2d69c8d45..f9169615d
--- a/docs/whats-new.md
+++ b/docs/whats-new.md
@@@ -2,108 -2,12 +2,114 @@@
## October 2026
+### Smart album rules
+- The rule editor's field menu is grouped: Rating, Pick Flag, Color Label and Any Searchable Text at the top, then
+ submenus for Source, File, Date, Keywords & People, Description, Camera Info, Location, Size, Develop and Assisted
+ Culling.
+- New fields: Keyword Count ("2 or more", "exactly 2"…), People and People Count (named faces), Shutter Speed (written
+ as 1/250), File Extension, Video Duration, Copy Name, In a Stack, Alt Text, City, State / Province, Country, Long
+ Edge, Short Edge, Aspect Ratio (landscape / portrait / square), Cropped and Treatment (in color / black & white).
+ Size rules measure the photo as shown: Megapixels now counts the cropped photo, like Long Edge, Short Edge and
+ Aspect Ratio (a 24 MP photo cropped to a square is 16 MP).
+- Choice values read as words in every language: "Public Domain", "Picked", "Black & White" rather than ids like
+ `publicDomain` (rules and agents keep using the ids; `album.ruleFields` adds `choiceLabels`).
+- Rule values are checked: a rating of 9, a date like 2026-13 or "banana", a "between" whose dates are the wrong
+ way round, "in the last 0 days", a colour label that doesn't exist, "contains" with nothing to look for, an
+ album that is gone, or an empty group is reported with its rule ("rule 2.1: no rating 0–5 is 9")
+ instead of quietly matching nothing or everything. New date rules start at the current year.
+- A smart album can include or exclude another smart album: "Keywords contain travel" and "Album isn't Excluded Photos"
+ leaves out whatever Excluded Photos matches, as its rules change. The album picker shows your albums as in the sidebar
+ (folders open on click) or finds them as you type part of a name or folder (↑ / ↓ and Enter to pick); albums that
+ can't be picked, such as one that would make an album include itself, are greyed with the reason. Esc with a dropdown or calendar open in a dialog
+ closes just that.
+- Date rules have a calendar button: pick a day, a month or a whole year (Year / Month / Day), in your language; the
+ two dates of a "between" can't be picked out of order; Esc closes just the calendar. It picks dates, not times (a
+ time is typed, and picking a day replaces one). Typing still works, and "2026-10-01 10:00" (a space for the
+ T) now matches.
+- Rule problems are shown in your language and name the field the way the menu does ("Title: needs something to look
+ for").
+- A smart album whose rules no longer check (an album they test was deleted) is marked ⚠ in the sidebar; its tooltip
+ says what to fix, and `albums.list` reports `problems`.
+- Editing a smart album's name and rules is one step: both or neither, and one undo takes both back
+ (`album.setRules` takes `name`).
+- The rule editor marks each rule that needs fixing right under it and keeps OK disabled until they are fixed. An
+ Album rule is "is" or "isn't" an album, picked with the album picker.
+- Yes/no fields (Has Edits, Cropped, Has GPS…) read Yes / No instead of true / false. A rule sent as `"false"` now
+ means no (it used to count as yes), and a value that is neither yes nor no is refused.
+- Any Searchable Text also finds the state / province, alt text, people and a virtual copy's name.
+
+### Keyword lists
+- File ▸ Import Keywords… and Export Keywords… read and write keyword list files as Lightroom Classic does (a keyword
+ a line, a tab per level, synonyms in braces, keywords left out of export in brackets). Capture One, darktable, Adobe
+ Bridge and Photo Supreme (its Formatted Vocabulary File) use the same files, so keyword lists move between them and
+ LightCraft. Importing adds the keywords you don't have, in one undo step; a file it can't read says which line, or
+ to save it as UTF-8. Exporting warns about keywords Capture One won't import, and names any keyword the format can't
+ hold (such as a name in brackets), which it leaves out so the file always reads back.
+
+### Keyword sets
+- Keyword Set ▸ Edit Set… edits a set's nine keywords in place, one field per ⌥ key, and renames it (or saves the edits as a new
+ set). An empty field leaves its key empty instead of moving the keywords after it; editing Recent Keywords and naming
+ them saves a new set.
+
+### Keywording box
+- The chips at the top of the Keywords panel are the keywords of every selected photo, not only the active one's; a
+ keyword only some of them have is marked with an asterisk (hover: how many). Only the × removes a keyword, from
+ every selected photo; a chip's menu acts on the selection (add to all, remove, show photos, edit) and no longer
+ deletes a keyword from the whole library.
+- Switch to & Containing to see the keywords with the keywords containing them, or to Will Export to see what
+ exported files will carry for the selection.
+- The keyword set's buttons and the suggestions follow the selection too; the typing boxes get the Cut / Copy / Paste
+ menu, and Return in the painter's box starts painting.
+
+### Keyword List
+- The Keywords panel ends with a Keyword List, as in Lightroom Classic: every keyword with its photo count, those no
+ photo has yet too. Filter it, tick a keyword to give it to the selected photos (a dash: only some have it), or click
+ the arrow to see its photos.
+- Create keywords with + (inside the one you picked, with synonyms, and given to the selection if you like), edit one
+ by double-clicking it, delete one with − after a confirmation. Right-click for more: create inside, Put New Keywords
+ Inside This Keyword, Purge Unused Keywords.
+- Drag a keyword onto another to nest it, or onto the list's title to bring it back to the top level; photos dragged
+ from the grid onto a keyword get it.
+- Right-click ▸ Put New Keywords Inside This Keyword: new keywords, made with + or typed in the box above, go inside
+ it. The list is there with no photo selected too, to set up keywords first.
+- Keyword tag options decide what exported files carry: Include on Export, Export Containing Keywords, Export
+ Synonyms. Exports now write keyword names to `dc:subject` and their paths to `lr:hierarchicalSubject`, and keywords
+ imported from files (or read from sidecars) keep the hierarchy `lr:hierarchicalSubject` gives them.
+
+### Text fields
+- Right-click Search Photos, a slider's typed value, the Info panel's fields, the name field of New Album, Rename
+ Album, New Smart Album, Rename Keyword, Merge Keywords and similar dialogs, or the name field under unnamed faces for
+ Cut, Copy, Paste and Select All. Esc in them gives back the text from before you started typing (in the Info panel it
+ no longer saves it). Return in those dialogs now confirms them, and their name opens selected. More fields will
+ follow.
+- On Windows and Linux, Ctrl+C outside a text field copies edit settings and Ctrl+V pastes them (⇧Ctrl+V: Paste
+ Selected Settings). Ctrl+V only reaches LightCraft while the system clipboard holds text; otherwise use Edit ▸ Paste Edit
+ Settings.
+
+### Synchronize Folder
+- Right-click a folder (or a disk other than the startup disk) in the sidebar's Folders section ▸ Synchronize
+ Folder…. The folder and the folders inside it are scanned in the background for photos added on disk, photos whose
+ file is gone, photos whose file was renamed or moved within the folder, and XMP sidecars changed by other apps; then
+ choose what to do: import the new photos and relink the moved ones (the defaults), move the missing ones to Recently
+ Deleted, read the metadata updates. A folder on a disk that isn't connected is reported as such. Synchronizing
+ runs in the background with a progress window and Cancel; everything it does is one undo step, and no file on disk
+ is touched. Agents use `folder.scanChanges` and `folder.synchronize`.
+
+### Folder colour labels
+- Right-click a folder (or a disk other than the startup disk) in the sidebar's Folders section ▸ Set Color Label ▸ a colour or None. The row
+ shows the label's dot before its photo count. Agents use `folder.label` (`path`, `label`); `library.folders`
+ reports each row's `label`.
+- A label follows its folder when it is renamed or moved in LightCraft, together with the labels of the folders
+ inside it; undo and redo carry them back and forth.
+- The catalog format is now version 4 (`Catalog.folder_records`, `Op::SetFolderRecord`). Once this version has
+ opened a library, older versions refuse it, as with every format change.
+
+ ### Monitor profiles
+ - Settings ▸ Display ▸ Choose Profile… shows photos through your monitor's ICC profile (matrix/TRC or LUT-based), so
+ colours are right on wide-gamut and calibrated displays instead of oversaturated. The Detail view renders straight
+ into the display's own gamut; thumbnails and other previews are converted to it. Histograms, the preview caches
+ and exports don't change. Agents use `app.displayProfile`. See [display profiles](display-profiles.md).
+
### Masking
- Drag anywhere inside the selected radial gradient's ellipse to move it, including rotated
ellipses and radial components in compound masks. Edge and rotation handles keep their existing