Commit Graph
3164 Commits
Author SHA1 Message Date
Michael Anderson 337f02b4dc Never crash: Fix export size panic for very long strips
Apply the 1 px and 65535 px bounds in turn instead of clamping between bounds that can cross.
2026-10-13 10:45:34 -05:00
Michael Anderson 3624a50423 Never crash: Refuse raw data with two samples per pixel (#1511)
The demosaic read past each pixel. DNG decode and validation refuse it now.
2026-10-13 10:45:29 -05:00
Michael Anderson cef6f2d4b8 Never crash: Fix demosaic panic on a NaN black level
Read non-finite DNG black levels as 0 and map non-finite normalized samples to black.
2026-10-13 10:45:18 -05:00
Michael Anderson d5cba8b3dc xtask parity: Fail when docs/gaps.md lists a gap more than once
Also remove the duplicate rows for gaps 10, 22 and 23.
2026-10-13 10:45:11 -05:00
PiMinusMax d60fd328db Before/After button: Show Original (\) does not light it (fixes #1497)
The bottom bar's Before/After (Y) button was lit for every mode but Off,
so holding or toggling \ (Show Original) lit it too, and a click then
opened the side-by-side layout: one lit button for two different views.
It now stands only for the Before/After layouts.
2026-10-13 17:45:07 +02:00
Michael Anderson 65dbba9ecd LRC-LIB-CATALOG-IMPORT: Open catalogs whose tables are all still in the WAL
Accept schema format 0 in the main header and check page 1 again after the WAL overlay.
2026-10-13 10:45:06 -05:00
Michael Anderson b62b51378e Never crash: Fix i32 overflow in the NEF and PEF Huffman predictors (#1515)
Use checked adds and return a corrupt data error instead of panicking.
2026-10-13 10:45:00 -05:00
Michael Anderson e9d36451e6 Never crash: Fix overflow in mask.move with a huge delta
Saturate index + delta so any delta just moves the mask to the top or bottom.
2026-10-13 10:44:46 -05:00
PiMinusMax d64a1ecc93 LR-PROF-CAMERACOLOR: bundled Sony ILCA-99M2 camera profile
Fitted with `lightcraft-cli calibrate` to 144 usable ILCA-99M2 ARWs (of
150, seven shooting days, Standard creative style, DRO Auto) and their
in-camera JPEGs; aggregate colour statistics only.

On 30 withheld photos (profile fitted to the other 120) mean dE76 against
the camera JPEG goes 5.11 -> 4.87; 25 of 30 improve, the worst
regression is 0.24. All 150 photos stay accepted. The public raw.pixls.us
ILCA-99M2 file, not used for fitting, stays accepted (5.57 -> 5.73).

A corpus test checks that this public sample's fit keeps exactly the
built-in profile's matrix and table; the ILCE-7CR test now shares its
body. LOOK_VERSION 5 -> 6, as the profile changes the fit of this model.
2026-10-13 17:33:23 +02:00
Jason Baldwin bc9d8a21b5 Merge slideshow-templates into slideshow-export (origin/main: batches 32–33) 2026-10-13 17:03:26 +02:00
Jason Baldwin d747c9e0f6 Merge slideshow-titles into slideshow-templates (origin/main: batches 32–33) 2026-10-13 17:01:24 +02:00
Jason Baldwin f30e4af838 Merge slideshow-overlays into slideshow-titles (origin/main: batches 32–33) 2026-10-13 16:59:34 +02:00
Jason Baldwin ba9262a4a0 Merge slideshow-composer into slideshow-overlays (origin/main: batches 32–33) 2026-10-13 16:57:38 +02:00
Jason Baldwin a021ad2c56 Merge slideshow-playback into slideshow-composer (origin/main: batches 32–33) 2026-10-13 16:55:11 +02:00
Nathaniel LedfordandClaude Opus 5.5 2783e5de9b PERF-IMPORT: a scan, an import and a sidecar write no longer make a table of the whole library first
Setting up Synchronize Folder, an import review or an import made a table
of every photo in the library on the session's thread before the first
file was looked at, and naming one photo's sidecar worked out who owns
every shared sidecar name in the library. In a library of 3.5 million
photos (`scan_setup_bench`, release, a folder of 500): 5.8 s before a
Synchronize scan, 2.6 s before an import review, 1.7 s before an import,
2.4 s for each sidecar written.

- A scan keeps the library as it is (photos are shared, not copied) and
  looks up the files it finds (`library_files`) and the contents it probes
  (`library_hashes`) on its own thread.
- An import looks the library up with its first files
  (`ImportJob::look_up_library`), from the library and the options as they
  were when it was set up.
- The owners of shared sidecar names are worked out for the photos asked
  about (`StemOwners::among`): all five callers name only those photos.
- Synchronize Folder names its photos' sidecars in the scan, after it has
  seen that the folder is there.

Now 0.9 s, 0.05 s, 0.05 s and under 1 s. What is found, and how sidecars
are named, is unchanged: the tests hold the owners against the table of
the whole library as it was made before, and the key made without
allocating against the key, for every string of up to six of the
characters that decide it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:52:56 -04:00
Jason Baldwin 09ea6a3f77 Merge origin/main into slideshow-playback (painted toast from batch 33, kept at the top during a slideshow; both Slot variants; tracker rows) 2026-10-13 16:52:50 +02:00
MarekSpodBiedry 3946688f49 Reject RAW TIFFs with missing or undecodable image chunks (#1513) 2026-10-13 16:38:39 +02:00
MarekSpodBiedry d77d1a4650 MCP: do not resend a request whose reply was lost, report an unknown outcome (#1526) 2026-10-13 16:37:38 +02:00
MarekSpodBiedry 82da463f56 Refuse Open/New Library while an import is running (#1509) 2026-10-13 16:37:30 +02:00
MarekSpodBiedry 935fabeb18 Preview disk cache: ignore symlinked shard directories (#1504) 2026-10-13 16:36:39 +02:00
MarekSpodBiedry f865aa28c3 Reject a LeakyRelu alpha that is not a single float instead of reading it as 0 (#1530) 2026-10-13 16:36:37 +02:00
MarekSpodBiedry 8e26ba6c94 Check the SAM weight shape against the header before reading the tensor (#1529) 2026-10-13 16:36:24 +02:00
MarekSpodBiedry 51ce34d78c Reserve the name with an exclusive create when hard links are unavailable (#1503) 2026-10-13 16:36:09 +02:00
MarekSpodBiedry 4a91a1c218 Fetch: refuse a redirect from https to http (#1531) 2026-10-13 16:35:28 +02:00
MarekSpodBiedry 7d29dfac58 Recheck file contents before deleting a moved original (#1500) 2026-10-13 16:35:21 +02:00
MarekSpodBiedry df914dca41 Reject PEF streams that end before the pixels do instead of decoding zero padding (#1514) 2026-10-13 16:35:19 +02:00
notdezziandZCode 54321e6175 Packaging: confirm a successful uninstall with the completion dialog (fixes #892)
The MSI never included WiX's ExitDialog: the Publish events point at it, but only
a DialogRef pulls the UI extension's fragment (with its on-exit=success show) into
the package, so every successful run ended silently. Reference it, and note that
the shared completion page is the uninstall confirmation; packaging-lint now fails
when the reference is lost again.

🤖 Generated with [ZCode](https://zcode.ai)

Co-Authored-By: ZCode <noreply@zcode.ai>
2026-10-13 16:15:46 +02:00
LosminekandClaude Opus 5.5 95cde76917 Merge upstream/main into cs-ui
Conflict in panels/dialogs.rs: keep upstream's PQ/HLG HDR curve choice
and route both labels through i18n::tr. Czech for the new strings:
8 catalog entries (import, missing files, GPU notice, mask overlays),
3 format strings (other editor, identical copies) and the HLG label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:12:20 +02:00
Jason Baldwin fdad5a4ad4 LR-VIEW-FOCUSPOINT: read focus points for photos already in the library, header-only in the background (#1480)
Photos imported before focus points were read got one only through Reload from Disk, which
hashes whole files on the UI thread. Now:

- lightcraft_meta::focus::read_header reads only what the decoder looks at: IFD0 (Make,
  Model), the Exif IFD, the maker note's IFD and the focus tags' values (a JPEG: its segments
  up to the Exif one), walked round by round and decoded with the whole-file code from a
  buffer of the file's length holding just those ranges. Bounded rounds, bytes (2 MB) and
  size (1 GB). One 32 KB read per α1 / A7S III ARW; on 109 real files (83 with a point)
  it gives the whole-file read's point for every one.
- A background job (crates/engine/src/focus_scan.rs) reads photos with no point from a
  supported body (by the stored camera; nothing else is opened), ARW or JPEG, one at a
  time in path order, with a "Reading focus points" activity row (Cancel::Flag). The UI's
  per-frame focus.pump gives it the face scan's pace (paused while dragging or typing) and
  starts it once per library opening. Commits every 200 photos or 3 s as system ops (no
  undo step, no sidecar write), only meta.focus, only on photos that still have none at the
  same path. "Looked, none" goes to focus-scanned.bin beside the library, headed by the
  decoder's tag so a decoder knowing more bodies starts afresh; unreadable files are retried
  at the next opening.
- photo.readFocusPoints {ids?, wait?} (Photo > Read Focus Points) runs it on demand.

Measured cold on a 5400 rpm USB drive: 200 α1 / A7S III ARWs in 1.9 s (~100 photos/s,
32 KB each), so 58,796 raws take about 10 minutes instead of re-reading 2.25 TB.
2026-10-13 16:06:06 +02:00
Navid Zaman Khan d5826e2386 fix(develop): reject malformed settings groups 2026-10-13 19:47:05 +06:00
squareSphere29andCursor 6e20f82360 LR-LIB-STACK: deleting a stacked photo drops it from the stack so i/n badges update (fixes #1493)
Soft-delete and remove-folder now unstack in the same undo step as Recently Deleted, so leftover members show 1/2 not 3/3. Restore-from-trash does not restack.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 21:02:42 +08:00
eliets2 c38bf96ef9 Docs: Select Only Active Photo in the shortcut list and the parity checklist
Add the Cmd+Shift+D row to the library shortcut table with a short note on
what it does and where it can be rebound, add a checklist row for it with
status partial (covered by headless key tests; the native macOS menu path
is not verified), and update the checklist's Last updated line, revision
history and the summary counts that this one row changes.
2026-10-13 15:42:56 +03:00
Fabio LussiandClaude Opus 5.5 e665aff1b3 docs: re-verify against 0.7.1
- All pages checked against the v0.7.1 tag and its release assets;
  verified: bumped to 0.7.1.
- Install: 32-bit Windows (x86) installer and portable build; pre-0.6
  upgrades keep their install folder.
- Import: Recently Deleted photos are restored by default; progress shows
  in the activity stack.
- Edit: HDR button next to B&W.
- Export: JPEG XL Effort and Progressive, lossy JPEG XL colour space
  note, Add to Apple Photos on macOS.
- Lightroom import: activity stack progress and stopping with its X.
- Raw troubleshooting: Adobe RGB fix now released, monochrome picture
  style tone, EOS R5 Mark II C-RAW decodes, Leica DNG and dark scenes
  still open; drop "import again" (duplicates are skipped).
- docs/user/CLAUDE.md is a regular file instead of a symlink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:34:54 +02:00
dev-null-undefinedandClaude 14e0d12813 LR-IMP-PREVIEW-READ: stand-ins and raw thumbnails decode the smallest embedded JPEG that covers them
`embedded_preview_srgb` (the loupe stand-in and the grid thumbnail of an unedited raw) decoded the
largest embedded JPEG whatever the size asked for: a 512 px thumbnail of a Sony A7R VI ARW decoded
its 9984 x 6656 JPEG (5.6 MB) although the file holds a 1616 x 1080 one (0.3 MB).

`lightcraft_raw::embedded_preview_covering(bytes, min_edge)` returns the smallest of a TIFF-based
raw's JPEGs whose long edge is at least `min_edge` and that is a copy of the largest one: aspect
ratio within 1 % (not a letterboxed thumbnail of another shape) and the same number of components
(not the grey semantic masks of an iPhone ProRAW DNG); else the largest, as `embedded_preview`.
The colour-space handling stays in `decode_raw_preview` (a `covering` argument); an unsupported
raw's editing source and the camera-look fit keep the largest JPEG, so a source never depends on
its size level.

On 120 raws of every make in the corpus at 256 / 512 / 1600 px: wherever the largest JPEG is still
chosen the output is identical byte for byte; where a smaller one is (Sony, Nikon, Panasonic,
Adobe DNG) orientation matches, the size is equal or 1-2 px off, mean difference <= 4.7 / 255.

- Rebased onto #1020: its plan route (`preview_window` -> `planned_preview`) now takes the box size and picks
  with `embedded_preview_covering` too, so a TIFF raw read through the sparse plan gets the whole file's JPEG.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 14:33:52 +02:00
nevicia2010-hub f86459db58 LR-MASK: fix range handle drags and color sampling settings 2026-10-13 14:29:16 +02:00
eliets2 fb47e4a185 Tests for Select Only Active Photo
Cover the chord in the photo grid, the square grid and the detail view
(selection narrowed, active photo kept, last edit undo step untouched), a
focused text field keeping the key, rebinding and unbinding in the keymap,
and the command refusing to run without an active photo.
2026-10-13 15:17:01 +03:00
eliets2 6f5e1f876e Edit: add Select Only Active Photo (Cmd+Shift+D)
A new library command narrows the selection to the active photo and keeps
that photo active. It is bound to Cmd+Shift+D (Ctrl+Shift+D on Windows and
Linux), listed in the Edit menu and the keyboard shortcut editor, and
disabled while there is no active photo. The binding does not collide with
any existing binding or alias.
2026-10-13 15:17:01 +03:00
eliets2 939d422ff6 Docs: grid navigation keys, Cmd+O and Shift+H
Describe the new keys in the library shortcuts page, update the rows they
touch in the parity checklist and the UI parity page, and stop listing F6
and F7 as missing in the small-shortcuts gap now that they are bound.
2026-10-13 15:16:51 +03:00
eliets2 68e9d61aa6 Tests for the grid navigation keys, Cmd+O and Shift+H
Cover Home/End and Shift+Left/Right in both grids (ends of the view, the
loupe, the user's own binding winning), Cmd+O asking for a folder once,
Shift+H toggling the HDR view, and the new keys staying out of the way
while a text field has the keyboard, while the full-screen preview covers
the grid, and while a dialog is open.
2026-10-13 15:16:51 +03:00
eliets2 4dfd78a8a8 Library grids: Home/End and Shift+Left/Right selection keys; Cmd+O and Shift+H
In Photo Grid and Square Grid, Home and End make the first or last photo of
the view the active, selected one, and Shift+Left / Shift+Right add the
previous or next photo of the view to the selection. These keys wait while
the full-screen preview covers the grid, in every other view, while a text
field or a dialog has the keyboard, and when the user gave the key to a
command. They are listed under Fixed keys in the keyboard shortcuts dialog.

Open Library now has Cmd+O and Visualize HDR has Shift+H (Cmd+Shift+H stays
the Histogram).
2026-10-13 15:16:46 +03:00
Matthew James SivakandClaude Opus 5.5 eeb2ca2f6a LR-EDIT-SECTION-SOLO: register section.calibration, refuse unknown sections
Calibration's header runs section.calibration, now a registered command (no menu
item); section.<id> refuses an id the Edit panel hasn't got instead of closing
the real sections for a phantom one. "Solo Mode" sits with the other So… keys
in the catalogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:13:48 +02:00
Matthew James SivakandClaude Opus 5.5 12015179ea LR-EDIT-SECTION-SOLO: section.<id> {solo?} and header clicks run the command
Option-click goes through section.<id> {solo: true}, so agents can open just one
section; view.soloSections and section.* refuse flags that are not true / false
(bool_param); toggle_section reuses solo_section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:13:48 +02:00
Matthew James SivakandClaude Opus 5.5 d8f62a29b2 LR-EDIT-SECTION-SOLO: Solo Mode for Edit sections
Window > Edit Sections > Solo Mode (view.soloSections {on?}) and a right-click on
any section header turn it on: opening one section closes the others. Option-click
on a header opens just that section once. Kept with the UI state (singlePanel).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:13:48 +02:00
Matthew James SivakandClaude Opus 5.5 6a66860ea9 LR-VIEW-ZOOM: hidden-window test drags twice so it catches a missing frame-time bound (#330)
One slow drag only makes the pair suspect, so a single hidden-window
drag passed even without the FRAME_MS_KNOWN upper bound. Two such drags
followed by a full-size third fail (0.6) when the bound is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:11:27 +02:00
Matthew James SivakandClaude Opus 5.5 4d240cf616 LR-EDIT-EFFECTS-DEHAZE: raster::morph square min / max filters, Image::transpose
Split out of #1286 (Dehaze V3) so it can be reviewed and land on its own.
`min_filter` / `max_filter` are separable van Herk / Gil-Werman filters:
three comparisons per pixel per pass whatever the radius, edges clamped,
NaNs skipped like f32::min, a short buffer or empty plane returned
unchanged. `Image::transpose` (row-parallel) does the column pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:10:21 +02:00
HossamvsandCursor 8d6070e224 LR-LIB-PEOPLE: rename a person across the library (#1444)
People cards and the person page had no way to rename every face of one person as one undo step.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 15:00:24 +03:00
Matthew James SivakandClaude Opus 5.5 8d91abe603 LR-VIEW-ZOOM: a slow drag verdict needs two strikes and expires (#330)
A busy moment (another app, a backup) could make a slider draft small for
the rest of the session. DragScale keeps timing in wall-clock time, what the
user waits for, but now:

- a (photo, control) pair is slow only after two drags in a row over 20 ms
  (1.25x the 16 ms budget); the first makes it suspect, and a drag within
  20 ms forgets the verdict;
- a slow verdict lasts 30 s, then a drag tries full size again; a slow
  retry doubles the wait, up to 240 s (after WebRTC's CPU overuse detector:
  40 s ramp-up delay, doubled after a failed up-switch, capped at 240 s).

The time comes from egui's input clock, which the web build has too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:33:38 +02:00
dev-null-undefinedandClaude 8c64c467f5 LR-EDIT-OPTICS-PROFILE: Sony lateral CA planes off by default (the demosaic already hides most of it)
Verified on 54 ILCE-7RM6 photos, the CA planes made the render worse: our
demosaic already hides about 70 % of the lens CA (the render shows 0.29x
the raw-CFA CA) while the post-demosaic warp moves R and B by 0.84x the
table, so the corner R/G and B/G CA went from rms 0.032 / max 0.125 px
(off) to 0.052 / 0.219 px (on) at 1440 px; only the 16-35 mm improved.

warp_opcode takes a lateral_ca flag; lens_opcodes passes false, so a Sony
ARW gets the one-plane distortion warp. The CA conversion stays live and
tested (FF and APS-C examples, both lossless corpus files' tables). The
follow-up is to warp the CFA colour planes before demosaic. The doc,
tracker (docs/parity-checklist.md), docs/gaps.md, docs/raw-parity.md and
whats-new say distortion applied, CA parsed and off
by default, vignetting not applied; the one-plane default costs 24 -> 45 ms
in the sample stage at 1920 px (three planes: 112 ms).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 13:19:44 +02:00
Jason Baldwin ac84cd31ee LR-VIEW-FOCUSPOINT: show the camera's focus point (Sony) and zoom to it (#1480)
Read the autofocus point from Sony maker notes (FocusLocation 0x2027, FocusFrameSize
0x2037, FocusMode 0x201b, AFAreaModeSetting 0x201c, AFTracking 0x2021 and the area mode
used from the enciphered 0x9402 block), for the ILCE-1 and ILCE-7SM3, whose layout was
checked against ExifTool's output on 333 real ARWs. Manual focus, centre-only Multi
reports and unchecked bodies give no point. The box is stored on the upright photo as
Meta.focus (omitted when unknown; no catalog format change), filled at import and by
Reload from Disk.

View > Show Focus Point (Alt+F) draws it in Detail, Compare and Survey through rotation
and crop; View > Zoom to Focus Point (on by default) makes Toggle Zoom centre on it; the
Info panel shows "AF-C · Wide · Animal Eye Tracking". photo.inspect returns meta.focus.
2026-10-13 13:14:24 +02:00
neronek22 bba2fe0bda Merge pull request #1 from witkowski01/polish-fixes
i18n(pl): plural forms, the messages main gained, and paintable menu arrows
2026-10-13 13:09:45 +02:00