* LR-EXP-WATERMARK: decomposed Korean and Vietnamese export text draws whole (#3480)
Export text (contact-sheet captions, watermarks, slideshow overlays, print
page text) laid each char out as its own glyph. macOS often stores Korean
file names in NFD, so a caption for 제주도.jpg drew as loose jamo, and NFD
Vietnamese letters lost their stacked marks (#3277).
TextLayout::new now composes the text to NFC first (unicode-normalization,
MIT OR Apache-2.0). Every Hangul syllable and Vietnamese letter has a
composed form; sequences without one draw as before.
* LR-EXP-WATERMARK: CJK compatibility ideographs keep their code points in export text (#3480)
NFC maps each CJK compatibility ideograph (U+F900-U+FAFF, U+2F800-U+2FA1F)
to its unified form, so a name spelled with 塚 (U+FA10) would draw as 塚
(U+585A). Compose the text around them and keep those characters as they
are.
* LR-EXP-WATERMARK: export text already in NFC stays as it is (#3480)
Typing `animal > dog` or `dog < animal` in the Add keyword box now gives
`animal|dog`, as Enter Keywords does, and the offers under the box show
that keyword. A name as written that a keyword of the library already
holds as whole levels of its path is still read as written, and is still
offered while it is being typed.
A name typed as `animal > dog` or `dog < animal` in the Enter Keywords
box now becomes `animal|dog`, as `Places|Lisbon` does, instead of a
keyword named with the angle bracket. A keyword the selection has whose
own name holds `>` or `<`, and a name in double quotes, are read as
written. A marked keyword, and one whose name holds a comma, can be
written with `>` or `<` too.
Tests cover a plain list, a hierarchy, a mixed selection (the box shows
a keyword only some photos have with an asterisk, keeps it on those
photos, and takes it off only when it is deleted from the text) and one
undo and redo step for an edit of three photos.
Conflicts only in the docs' "Last updated" header lines (main's #3503 added its entries at the front too): main's
line with this branch's entry kept in front. Cargo.lock: lightcraft-wincolor follows the workspace version to 0.18.0
(main's release bump).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvoftKWm1wYSXdzRBwvFR3
A navigation link with ?bench opened the first photo of the library in
browser storage and committed Exposure edits to it, finishing at 0 instead
of the photo's own value. ?bench now implies ?store=memory and loads the
generated demo photos, so the benchmark cannot edit stored photos.
When LightCraft's appearance differs from Windows' (its dark default on a light Windows), the first theme egui
sends the just-shown, focused window changed the title's colour but not the caption's: white on a light caption,
which looks blank, until focus moved. The same command sent once the window is up repaints the caption, so the
UI phase sends it again the first frame the window has focus (Windows only). With a test, which fails without the
send, and a What's New entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvoftKWm1wYSXdzRBwvFR3
* CRW-LIB: decode Canon CRW through the shared craft-crw crate
LightCraft decodes Canon CRW (the CIFF raws of the EOS D30, D60, 10D, 300D and the
PowerShot G1/G6) through craft-libs' `craft-crw`, the clean-room decoder derived and
verified on the `clean-room-crw-format-decode` branch and moved there with its frozen
tables and derivation record. `crates/raw/src/vendor/crw.rs` is now the adapter: it maps
the crate's header and samples onto `RawImage` (CFA, levels, active area, orientation,
as-shot white balance, the make/model/time records a CRW keeps instead of Exif) and
converts the capture time through chrono. The dependency is a local path
(`../craft-libs/crates/crw`) until the craft-libs branch merges; then it becomes a git
revision.
Everything LightCraft-side from that branch comes along unchanged: `probe_bytes` fills
metadata gaps from the decoder's records so CRW imports name their camera; the EOS D60
bundled camera profile and its chart-measured dual-illuminant matrices (`chart_table.rs`,
`spectral::Camera` carries its illuminant pair) give the D60 a Kelvin white-balance scale;
CRW joins the JPEG-fitted starting look, the catalog's raw formats and `lightcraft-cli
calibrate`; `RENDER_CACHE_VERSION` 71; the CC0 CRW corpus entries for `cargo xtask corpus`;
coverage, parity, gaps, raw-parity, target-app-parity and ROADMAP updates. The G5 stays
preview-only (the crate refuses it with the reason) and the robustness test keeps its CRW
sample.
What does not come along: the decoder, its tables and `crw_oracle.rs` (now craft-crw's
digest-pinned sample test) and the derivation record, which lives in craft-libs
`crates/crw/clean-room/`. `clean-room/crw/` here keeps only the EOS D60 chart-calibration
document and its capture list, with a README pointing at the record.
Gates: fmt, clippy -D warnings (raw all targets; engine, catalog, cli), lightcraft-raw tests
(475 + 134, the corpus files decoding through the adapter), catalog tests, engine lib tests
(1,300 pass; the two failures, `tests_import::recursive_discovery_…` and
`originals::tests::write_targets_pin_absent_paths_…`, are in files unchanged from main),
`cargo xtask parity`, `assets`, `layers`, `coverage.py --check`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* no message
* no message
* Update documentation after moving code to craft-libs
* Review coment fixes
* CRW: pin craft-crw f3b62ec, a truncated entropy stream is Corrupt
craft-libs #472 makes craft_crw::decode refuse a stream that ends more than
Limits::max_stream_end_fill (64 samples, one block) before the frame does,
instead of filling the rest with predictor values and returning success.
The adapter already maps craft_crw::Error::Corrupt to RawError::Corrupt;
a regression test proves a truncated CRW now fails at this boundary (it
decoded as a flat frame on the old pin) while its header still reads.
Only craft-crw moves; craft-ui/docpath/update/window stay on c5a1cbf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Code review comment fix
* Add some tests
---------
Co-authored-by: Robert Woldberg <314159+rwoldberg@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
- Gpu::grain_tables returns the resident buffer it copied from as an Arc that the render keeps
until it submits: replacing the tables on another thread no longer hands the buffer back to
the pool while a recorded copy from it is unsubmitted (regression test).
- The drag test uses a tile cache of its own, so other V3 tests can't evict its stand-in.
- small_render_matches_the_downscaled_large_render compares the grain pixel by pixel (measured
0.003 of 255 levels apart), not only its strength.
- GPU equivalence covers V1 and V2 grain again.
- docs/grain.md: the drag benchmark command sets FRAMES=100; the rotated-frame footprint is an
axis-aligned square (documented, also in crystal.rs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`grain_drag_bench` (lightcraft-gpu example): GPU draft renders of a 2.5 MP
preview while Amount or Size is dragged, ms per frame. It doesn't depend on
the grain model, so it runs unchanged on other branches. docs/grain.md gets
its results on the Ryzen 5 7545U / Radeon 740M for main, #1060 and this
model, and the whole-render grain cost of main and #1060 there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on a Ryzen 5 7545U with a Radeon 740M (RADV), where grain cost what
the M2 Max hid:
- The tables stay on the GPU between renders (Gpu::grain_tables) and are
copied into the finish kernel's aux buffer on the device, instead of being
appended to aux and uploaded (12 MB) on every render. Amount drag, 2.5 MP
preview: 16.9 -> 11-15 ms a frame (no grain: 8 ms).
- A draft render (a drag) doesn't wait for a tile it hasn't got: the last tile
of the seed stands in while the new one is drawn in the background, on a
pool of half the cores; the full render when the drag ends waits for the
exact tile. Size drag: 62-66 -> 13-14 ms a frame. wasm drafts still wait.
- Stamps draw each row as a 64-bit mask, a fixed number of rows per layer,
rows outside the band landing in scratch rows around it: no branch per row.
Tiles 10-20 % faster at every setting, bit-identical.
Tests: GPU grain patterns in turn (same, new size, new roughness, new seed,
back) match the CPU; a drag takes the last tile while the next is drawn, then
the exact one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grain under the new process V3 is drawn from a simulated emulsion of crystal
layers, after Aurélien Pierre's crystallographic grain model (implemented from
the article's description). It fades out towards black and white as on a print,
is applied symmetrically in the display-encoded domain (no shadow darkening, no
grey specks in blown highlights), and matches Lightroom Classic's strength and
grain width at mid grey.
The emulsion is drawn once per Size / Roughness / seed on two periodic tiles in
frame coordinates and kept as summed-area tables, so each output pixel takes
the exact mean of the emulsion under its footprint: a preview is the export's
grain box-downscaled. CPU and GPU read the same tables (the GPU from the finish
kernel's aux buffer). V1 and V2 keep their value-noise grain exactly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the same exact-score known-crop preference as best_lens in the built-in fixed-lens fallback. Preserve higher-score priority and cover both profile orders through the public lookup API.
Validated with 33 lensdb and 5 engine lens-profile tests, plus full cargo xtask ci (8/8, Rust 1.95.0, Apple M5 Max Metal and WASM). The new tie regression fails against the previously published selector. No workflows or lockfile changes.
Co-authored-by: Codex <noreply@openai.com>
data-host="page" on the canvas turns it on. The bridge gets a Transport (Parent or Page) with one send: in page mode the same messages travel as non-bubbling CustomEvents on the canvas, and the page sends lightcraft:open and lightcraft:cmd the same way. Parent mode is unchanged.
Upstream split the files this branch touched into modules: the .zip filter moves to
apps/lightcraft/src/session.rs and crates/ui-egui/src/menus/run.rs, the inspect/import specs to
crates/engine/src/cmd/library/specs.rs, the backup tests to crates/engine/src/lightroom_catalog/tests.rs;
the collection-key logic auto-merged into upstream's new stage_collections. Docs: both sides kept,
#2592's entries dated 2026-11-01.
As in Lightroom Classic, a ⌘/Ctrl-click on a tile in Survey deselects that
photo (library.select, mode toggle), as the hover × does; a plain click still
only makes it active, and the last photo stays so the survey never empties.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge upstream main at 496524ced5 without rewriting published history. Preserve current upstream fixes and retain only the independent feature change in the resulting PR diff.
Co-authored-by: Codex <noreply@openai.com>
Mask coordinates lived on the corrected frame, so a Transform, Upright or lens-correction change
moved the photo under them and the masked look stayed behind, offset from the person it was drawn
on (4.3 px on a 240 px render under Vertical 25 + Rotate 4: about 100 px at 6000 px). Rotate Left /
Right turned the crop but not the masks.
A mask's coordinates are now on the photo before the warp (Mask::on_photo, catalog format 10):
the CPU render, the GPU render, Auto Mask brush windows and the on-photo tools map them through
the warp (Frame::for_mask, Warp::from_source). Rotate Left / Right turns masks with the photo
(mask_space::turn). The AI models see the photo without lens corrections, Upright, Transform,
crop or flips, so stored Object / Prompt selections stay on their content and changing those
doesn't ask the model again. Older masks (no on_photo) render where they were and move onto the
photo, without moving, at their next edit (mask_space::attach).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>