Commit Graph
3506 Commits
Author SHA1 Message Date
aiongg 78e70ab8f8 Merge PR #2545: Issue #136: applying the GPU setting never waits for the device on the UI thread 2026-10-31 02:10:21 +00:00
aiongg 5062acc601 Merge PR #2421: fix(windows): add opt-in DirectComposition workaround for VRR flicker
apps/lightcraft/src/main.rs: kept main's split; hunks ported (clear_color, compose_window, with_transparent); test moved to tests.rs
crates/ui-egui/src/panels/settings.rs: deleted on main; checkbox ported to dialogs/settings/performance.rs
crates/ui-egui/src/state.rs: compose_window field and default ported to state/settings.rs
crates/ui-egui/locales/*.json: main's file plus the new key
docs/gaps.md, docs/parity-checklist.md: main's header and rows plus the PR's additions; duplicated header line and blank lines dropped
2026-10-31 02:10:21 +00:00
aiongg 866ed3846c Merge PR #3385: Never crash: a mask id at the u32 limit doesn't overflow the next mask's id
# Conflicts:
#	docs/whats-new.md
2026-10-31 02:09:14 +00:00
aiongg ac36428e6d Merge PR #3384: LR-MASK-OBJECTS: a SAM 3 checkpoint in Meta's original format is named as such, not as an unsupported dtype (#3378)
# Conflicts:
#	docs/parity-checklist.md
#	docs/whats-new.md
2026-10-31 02:09:05 +00:00
aiongg 9b748af445 Merge PR #3379: LR-MASK-COLORRANGE: a colour-range mask keeps at most 64 samples however it is loaded (#2556)
# Conflicts:
#	docs/parity-checklist.md
#	docs/whats-new.md
2026-10-31 02:08:39 +00:00
aiongg 856b3c46fc Merge PR #3323: LR-MASK-PINS: Object and Describe masks show a pin that selects them (#3049)
# Conflicts:
#	docs/whats-new.md
2026-10-31 02:08:24 +00:00
aiongg 737c6867f0 Integration: #3298 put the noisy_scene doc comment back on noisy_scene 2026-10-31 02:08:13 +00:00
aiongg 9e732c2233 Merge PR #3298: Issue #3272: AI masks are enlarged along the photo's edges, no outline under a raised Exposure
# Conflicts:
#	docs/gaps.md
#	docs/parity-checklist.md
2026-10-31 02:08:02 +00:00
aiongg 30bbbc7570 Integration: #3182 keep the Colour Range regression comment on its own test 2026-10-31 02:07:51 +00:00
aiongg a7fcefdaa3 Merge PR #3182: Disarm color picking when adding mask components 2026-10-31 02:07:42 +00:00
aiongg 27c4692dcd Merge PR #2639: LR-MASK-BRUSH: with the mask overlay hidden, the stroke being painted no longer tints the photo (#2549)
crates/ui-egui/src/panels/detail.rs: kept main's split; hunk ported to panels/detail/masks.rs
docs/parity-checklist.md: header and LR-MASK-BRUSH row carry both sides
2026-10-31 02:07:39 +00:00
aiongg 1c1730eec3 Merge PR #2246: Reference app catalog import: turn masks into the photo's upright frame 2026-10-31 02:06:53 +00:00
aiongg 01c0b1e274 Merge PR #1654: Bound interpolation for extreme brush segments
# Conflicts:
#	docs/gaps.md
#	docs/parity-checklist.md
2026-10-31 02:06:52 +00:00
Brandon Thomas c7d7d3c0fd Merge PR #2540 (maintainer follow-up) 2026-10-30 15:26:31 -04:00
Brandon ThomasandClaude Opus 5.5 831d724b87 Reject .cube data lines that start with nan or inf
A data line such as `nan 0 0` starts with a letter and was skipped as an
unknown keyword, so a file with enough other entries still parsed.
(CodeRabbit review on #2540.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:26:29 -04:00
Brandon Thomas b854bbb94e Merge PR #2835 2026-10-30 15:24:59 -04:00
Brandon Thomas ac4a98bc2d Merge PR #3147 2026-10-30 15:24:59 -04:00
Brandon Thomas cfdf63c6e4 Merge PR #2917
# Conflicts:
#	docs/parity-checklist.md
#	docs/whats-new.md
2026-10-30 15:24:59 -04:00
Brandon Thomas 13711ace2b Merge PR #2155 2026-10-30 15:24:41 -04:00
Brandon Thomas c1fb95dfc0 Merge PR #3225 2026-10-30 15:24:30 -04:00
Brandon Thomas 273e9078de Merge PR #2969 2026-10-30 15:24:30 -04:00
Brandon Thomas 5693a3aeaa Merge PR #2540 2026-10-30 15:24:30 -04:00
Brandon Thomas bdb146be43 Merge PR #2833 2026-10-30 15:24:30 -04:00
Brandon Thomas ef83f30327 Merge PR #2834 2026-10-30 15:24:30 -04:00
Brandon Thomas 19eb08dc25 Merge PR #2909 2026-10-30 15:24:30 -04:00
Brandon Thomas b7c52c5032 Merge PR #2918 2026-10-30 15:24:30 -04:00
Brandon Thomas 181a580579 Merge PR #3366 2026-10-30 15:24:30 -04:00
Brandon Thomas 9140e8cd38 Merge PR #3267 2026-10-30 15:24:30 -04:00
Bruno-Alumn 5bcdc439f6 Build the used mask ids once in next_mask_id's fallback
Scanning every mask for every candidate id made a dense run of ids
quadratic. Collect them into a set first.
2026-10-30 15:21:57 +01:00
Bruno-Alumn bc12ec8e40 Never crash: a mask id at the u32 limit doesn't overflow the next mask's id
Mask ids come unchecked from develop.merge, sidecars (lc:settings) and
pastes. With a mask id of u32::MAX, next_mask_id() and Preset::apply
added 1 to it: debug builds panicked, release builds wrapped to 0, so
the second new mask got the same id as the first.

next_mask_id() now falls back to the lowest id no mask uses when the
highest is at the limit, and Preset::apply takes each preset mask's id
from it instead of counting on its own, so mask.add, mask.brushStroke,
mask.duplicate and presets with masks all get unused ids.
2026-10-30 13:31:01 +01:00
Bruno-Alumn cfbd109534 LR-MASK-OBJECTS: a SAM 3 checkpoint in Meta's original format is named as such, not as an unsupported dtype (#3378)
The sam3.safetensors on community mirrors (AEmotionStudio/sam3,
1038lab/sam3) is a conversion of Meta's original sam3.pt: its tensors
keep Meta's names, and its RoPE tables are C64. Renamed to
model.safetensors, it failed to load with "unsupported dtype
Some("C64")", which read like a LightCraft limitation.

Weights::open now lists a tensor of another dtype instead of failing
the whole file; reading it fails with the dtype error (LightCraft
computes RoPE itself and never reads those tables). Sam3::load_on then
checks the format: when the backbone's first tensor in Hugging Face
naming is missing and the file has Meta's detector.backbone. or
tracker. tensors, the error says it is Meta's original checkpoint and
that model.safetensors from facebook/sam3 in the Hugging Face format
is needed. docs/ai-masks.md says so for installing by hand.
2026-10-30 13:25:37 +01:00
Bruno-Alumn 06e2ec43ba LR-MASK-COLORRANGE: a colour-range mask keeps at most 64 samples however it is loaded (#2556)
Render cost is pixels x samples (CPU and GPU), and only mask.add / mask.update capped the list, so a
sidecar's lc:settings, a preset, develop.merge, render --settings or a catalog / history load could
carry thousands and stall a render or lose the GPU device. MAX_COLOR_RANGE_SAMPLES moves to
lightcraft-develop and ColorRange::samples deserializes through a capped visitor (the first 64 in
order, the rest skipped as IgnoredAny); the CPU and GPU renders also take at most 64 for settings
built in code.
2026-10-30 12:03:03 +01:00
Max MittelstädtandGPT-6-Luna b25808686d Reject mismatched XML closing tags
Found while testing crates/lensdb/src/xml.rs:77

Co-Authored-By: GPT-6-Luna <noreply@openai.com>
2026-10-30 06:10:13 +00:00
Dylan M. Taylor 445dd3106e Update prompt shows the app icon and accent color instead of a letter (#3362)
UPDATE_APP (native builds; craft-update is a native-only dependency) carries our 128 px icon and accent (#f2a516, its colour in ArtCraft Launcher). The updater, the self-update
helper and craft-update's startup prompt all get them through crate::UPDATE_APP; the
prompt draws the icon, the accent and "by ArtCraft" (craft-update's default developer).

craft-update is pinned to storytold/craft-libs main at 1065653e7 (#434).
Clippy fixes for Rust 1.99 in untouched code (same logic):
- crates/engine/src/cmd/export.rs
- crates/ui-egui/src/dialogs/rules_editor/rules_move.rs
- crates/ui-egui/src/panels/detail.rs
2026-10-30 01:27:49 -04:00
Bruno-Alumn cb841a3fe1 LR-MASK-PINS: with the Object tool on, a click on the selected mask's own pin adds no Object click (#3049) 2026-10-30 02:13:07 +01:00
Marco Arnulfo cf35cd1694 Lightroom catalog import: check the catalog XMP's radials on a photo already in the library (part of #1806)
The test's stored image and LightCraft's size of the photo were both 20 × 10, so
fitting radials to the photo's size instead of the stored image went unnoticed.
The photo is now already in the library at its shown 10 × 20, as a vertical shot
is.
2026-10-29 23:56:13 +01:00
Marco Arnulfo 491fe2869a Lightroom catalog import: turn the catalog XMP's masks into the photo's frame too (part of #1806)
The catalog's XMP is merged before the develop row, and its masks were taken as
they are, on the stored image: when the row has no masks of its own to replace
them, they stayed a quarter turn off on a vertical shot. They now go through the
same frame as the row's. A radial is fitted to the stored image before it is
turned, so its radii swap with the stored aspect and not the sidecar default.
2026-10-29 23:42:16 +01:00
Marco Arnulfo e5667d4e6f Lightroom catalog import: turn masks with the rotation a photo already in the library keeps (part of #1806)
Updating a photo already in the library keeps its Rotate Left / Right and Flip in
LightCraft, which LightCraft draws masks after, but the masks went through the
catalog's orientation only: an upright photo turned right in LightCraft got an
unturned gradient. They now go through the catalog's orientation and then the
photo's own.
2026-10-29 23:34:31 +01:00
Marco Arnulfo 307ec1a053 Lightroom catalog import: size radial masks with the stored image's aspect (part of #1806) 2026-10-29 23:14:32 +01:00
Marco Arnulfo b3f569a824 Lightroom catalog import: turn masks into the photo's upright frame (part of #1806) 2026-10-29 23:14:23 +01:00
Bruno-Alumn 7174891939 LR-MASK-PINS: with the Object tool on, a click on another mask's pin selects it (#3049) 2026-10-29 23:05:20 +01:00
Bruno-Alumn 63b7d0766e LR-MASK-PINS: Object and Describe masks show a pin that selects them (#3049)
With Show Pins on, Object and Describe masks had no pin on the photo, so they could only be picked in the Masking panel. An Object component's pin now sits at its first click and a Describe component's in the middle of what its segmentation selected. Clicking the pin selects the mask; dragging it changes nothing and adds no History step. Subject, Sky, Background, People, Landscape and the range masks still have no pin.
2026-10-29 15:04:47 +01:00
eliets2 67f53390fe masks: adapt the long-segment test to endpoint-only hostile segments
A hostile segment now lays only its end point, so five of them no longer
fill the stroke budget. The test asserts the endpoint-only count directly
and proves that a stroke which has spent its count takes no more through
push_dabs_counted, which tracks the budget across buffers.
2026-10-29 14:18:39 +02:00
eliets2 bf8b5e3584 LR-MASK-BRUSH: skip the interpolation of extreme brush segments
push_dabs clamped the number of intermediate dabs of one brush segment to 1,000,000, so a
finite but extreme segment (a point 10,000,000 px away) still allocated a million dabs. A
segment that would need more than that many now keeps only its endpoints; ordinary
spacing and the segment's end point are unchanged.

Adds oversized_brush_segments_skip_intermediate_dabs, which checks both the extreme case
(2 dabs) and an ordinary feathered-brush segment (21 dabs, end point kept, spacing kept).
The docs record the fix under gap 24 and LR-MASK-BRUSH; the parity status stays partial.
2026-10-29 13:57:51 +02:00
Brain WangandClaude Opus 5.5 f14d166fdf Issue #3272: AI masks are enlarged along the photo's edges, no outline under a raised Exposure
An Object / Describe mask is stored as a model's logit grid (288² over the whole photo,
~20 px cells on a 24 MP export) and was enlarged by bilinear sampling alone, so its edge
spilled 1–2 px onto the background; raising the mask's Exposure turned that strip into a
bright outline in previews and exports (CPU and GPU: the GPU renderer evaluates these
shapes with the same CPU `shape_alpha`).

`sample_seg` now guided-filters the sampled logits by the photo's log luminance where the
grid is coarser than the output: the fast (subsampled) guided filter, a window of 1.5 grid
cells, so a preview and an export put the edge in the same place. Filtering logits, not
coverage, lets the confident side win (the spill goes to ≈ 0, not to a mean of ≈ 0.1).
Pixels whose window is all inside or all outside, and edges the photo has no contrast
across, keep the plain sample exactly. Refine Edges still runs afterwards on the combined
mask and finds the edges in place: no second halo, no tightening.

One implementation: `guided_cross` (Refine Edges, Auto Mask) and the new
`guided_cross_fast` share `guided_coeffs`; the subsampled form uses
`local::guided_fast_step` and a box `resize`, like `local::guided_fast`. `guided_cross`'s
output is unchanged.

Existing AI masks become 1–2 px tighter at a subject's edges, on every process; their
inside, outside and contrast-less edges are unchanged. This lands in place under the
bug-fix rule of docs/process-versions.md (output that is in neither the photo nor the
edit), noted there.

Cost per AI selection (M2 Pro, 12 cores; one shape_alpha, before → after):
24 MP 25.7 → 48.2 ms, heap peak 96.5 → 108.8 MB; 60 MP 64.1 → 109.9 ms, 239.9 → 256.7 MB;
2.7 MP preview 3.1 → 10.6 ms, 11.2 → 26.5 MB.

Tests (a dark disc on a light background, its mask on a 32² grid): ≈ 0 one and two px
outside and ≈ 1 inside, all around (1 px outside was 0.66), bit-identical away from the
edge; with Refine Edges 50 / 100 (was 0.29 outside) and the edge within 1 px of the
unrefined one; the same edge position at 256, 512 and 1024 px; a Prompt mask's window
matches the whole render.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 11:13:04 +08:00
radialmonsterandClaude Opus 5.5 20c1f3c057 raw: test the grey JPEG XL restore through decode
The existing synthetic lossy RGB fixture tiles are re-declared grey by a
header edit (colour space RGB to Grey, dropping the 6-bit primaries field
a grey encoding does not carry, per the ColourEncoding bundle). Their XYB
frame data is unchanged, so they decode as one grey plane whose rendered
channels differ. The test checks decode against the gradient's BT.2100
luminance in the linear and sRGB curves.

Refs #275

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ti8KemZbjE2ZgHgV1q1BM
2026-10-28 13:44:42 -04:00
radialmonsterandClaude Opus 5.5 953c4ee5fc raw: decode lossy single-plane (grey) JPEG XL tiles in LinearRaw DNGs
Lightroom Classic's HDR and panorama merges of monochrome raws store a
one-plane LinearRaw image as lossy (XYB) JPEG XL tiles whose codestream
declares a grey colour encoding (16-bit float with a linear curve, or
16-bit integer with the sRGB curve). Those were refused as "lossy JPEG XL
tile with a single colour plane", so the files opened preview-only.

A lossy grey tile is still coded as three XYB channels. It is now
restored like the RGB case: jxl-oxide renders linear sRGB (never the
declared encoding, which would clip), the single plane is the luminance
(CIE Y, D65) of that, then the declared transfer curve is applied.
One plane must be declared grey and three RGB; HDR curves, other white
points and intensity targets above 255 stay unsupported.

RENDER_CACHE_VERSION 70 -> 71: files that showed their embedded preview
before render from raw data now, under the same content key.

Refs #275

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ti8KemZbjE2ZgHgV1q1BM
2026-10-28 13:44:42 -04:00
Max MittelstädtandGPT-6-Luna 7ab2575505 Reject ZIP entries with inconsistent decoded sizes
Found while testing crates/geocode/src/unzip.rs:64

Co-Authored-By: GPT-6-Luna <noreply@openai.com>
2026-10-28 16:41:59 +00:00
Dylan M. Taylor 307ecb981d fix(ui-egui): keep the Export dialog's original spacing before the preset row 2026-10-28 04:06:29 +00:00
Dylan M. Taylor 6e54232557 test: factor long UI and MCP scenarios into helpers 2026-10-28 03:25:18 +00:00