Commit Graph
8150 Commits
Author SHA1 Message Date
David Mann 0a17fe371a Merge PR #5405: feat(transform): show distort and skew cursor indicators when holding Ctrl/Cmd 2026-10-27 14:55:53 +01:00
760b9d1cc8 Integration: distort/skew pointers only where the drag distorts or skews (#5405)
Cmd armed the new Distort and Skew pointers in every transform mode, while the
drag did something else: in Rotate mode a Cmd-drag on a corner or edge rotates
but showed the dart or skew arrows; a Skew-mode corner with Cmd showed the dart
but slides along an edge; Distort mode with Cmd drew skew arrows on edges it
refuses. Cmd also hid the curved rotate arrow just outside a corner (the Alias
commit pointer showed) although a Cmd-drag there still rotates.

One helper, handle_indicator, now answers "what does this drag do" with the
same rules as the drag (drag_mods, mode_mods, apply_mode_drag), and both the
cursor and the drawn pointer use it. The pointer is drawn from the canvas's
cursor branch, so a guide, pan or zoom cursor over a handle no longer gets a
second pointer on top, and cursor() no longer hides the pointer while the box
is being applied (the overlay draws nothing then). During a drag the rotate
arrow shows only while the drag rotates (also a Rotate-mode handle drag), not
when a scaling corner strays past another corner. The warp split guide reads
sticky keys like the cursor does.

Co-authored-by: Catur Sura <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:52:45 +01:00
e3b2854838 Integration: font menu fix-ups after merging main (#6526)
- Character section: a style picked under a family's ">" with type layers
  selected set the layers but not the style for new type (the options bar
  did both). Pick "Inter > Thin" in Properties > Character: new type stayed
  Regular.
- Faux bold: a pointed tip moved r/sin(half its angle) along its bisector,
  uncapped (3.9 r at 30 degrees, an A apex grew a spike), and tips sharper
  than about 20 degrees did not move at all. Every tip now moves at most
  2r, continuously; inner corners (the crotch of a V) keep their exact
  miter.
- Faux bold: each point searched past runs of coincident points for its
  neighbours, O(n^2); a contour of 50 000 copies of one point took ~8 s per
  glyph. Neighbours now come from one O(n) pass over the runs.
- prefs.reset {"path":"type"} and Preferences > Type > Reset Section wiped
  the favourite fonts; they are kept now (type.favoriteFonts by name, or
  Reset All, still clear them).
- An expanded family whose own row scrolled out of view lost its style
  rows, so the list below jumped up.
- Show Similar Fonts re-sorted around each font an arrow step applied, so
  Down went back and forth between two fonts; the list now compares with
  the font current when the filter was turned on (or the menu opened).
- Docs: an uninstalled favourite is kept but not listed; FAUX_BOLD_RADIUS
  and the raster budget describe the thickened outline; the unused
  "Recent font list" rows are gone; docs/scorecard.md regenerated (the
  favourite fonts are one more setting).

Co-authored-by: D-monized <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:52:20 +01:00
9462fa130c Integration: Artboard from Layers dialog opens at the layers' size; refuse -0.4 (#9262)
The dialog remembered the last Width/Height: make a 1080x1350 board from one
layer, then open it for a 20x30 layer and press OK, and that layer got a
1080x1350 board too. It also opened at 0 and an empty Name. It now starts at
the selected layers' size and the next "Artboard N" every time, as in the
reference application. `{"height": -0.4}` rounded to 0 and kept the bounds;
negative sizes are now refused before rounding.

Co-authored-by: DuBearte <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:49:25 +01:00
Federico Olivares e173a9be17 Merge main into the integration batch
Main reorganised the source tree (command modules under engine/src/cmd, tools and dialogs under ui-egui/src, large files split into modules, inline test modules moved to their own files). This branch's changes to the moved and split files are ported to their new locations.
2026-10-27 10:44:16 -03:00
David Mann e0d06d3fc4 Merge PR #3779: paint.stroke: fill: true fills the enclosed region (#3659) 2026-10-27 14:42:54 +01:00
David Mann c26e31ab52 Merge PR #3609: fix(app): add missing supported file formats to Save As file picker (#3400) 2026-10-27 14:42:51 +01:00
5a6473113e Integration: paint.stroke fill keeps picked CMYK inks and pads to the feather's reach (#3779)
fill_region called fill_cmds::blend_color_mask without the picked-inks
parameter main added, so the PR no longer compiled; it now passes the
brush's picked CMYK inks, as Edit > Fill and Edit > Stroke do, so a
colour picked as CMYK 100/0/0/0 fills a CMYK document with those inks
(where it covers fully; partial coverage blends through RGB, as there).

The soft fill's working bounds were padded by ceil(sigma)+2, but the
feather reaches ceil(3 sigma): a 40 px square filled with size 40,
hardness 0 ended in a hard step from ~0.1 to 0 at 1 sigma + 2 px. The pad
now comes from selection::feather_reach.

Tests through paint.stroke: fill_soft_edge_has_no_step,
fill_paints_a_cmyk_pick_with_the_picked_inks,
fill_works_on_cmyk_and_16_and_32_bit.

Co-authored-by: scott <[email protected]>
Co-authored-by: echelon <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:40:45 +01:00
dotCooCoo 7e4aa1f5cf Preserve print settings when the cached printer list is empty 2026-10-27 06:38:33 -07:00
48b42979c8 Integration: Netpbm Save As row leads with .pnm, Open lists .pnm/.dib, save test (#3609)
Picking Netpbm for a bare name (Untitled) took the row's first
extension, .pbm, though the codec writes P6/P7/PF from the image, never
a 1-bit PBM: an RGB document saved as x.pbm holding P6 data. The row now
starts with .pnm. File › Open didn't list .pnm or the new .dib alias, so
a file Save As had just written was hidden in the Open dialog; both are
now in All Formats and their own type. The test checks every new type
and alias is offered, the Netpbm row's first extension, that Open lists
every extension Save As writes, and what Save As writes to .pnm (P6) and
.hdr (#?RADIANCE), as asked in review.

Co-authored-by: buivanvu94 <[email protected]>
Co-authored-by: tanish2k09 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:38:26 +01:00
David Mann f66744c76e Merge origin/main into pr-5405-fixup
Main moved crates/ui-egui/src/transform_tool.rs to tools/transform_tool/ and split it
into submodules; the PR's cursor, overlay and test changes are ported to pointer.rs,
draw.rs and tests.rs unchanged (distort_refused becomes pub(super) for them).
2026-10-27 14:36:00 +01:00
David Mann f3e422f7ae Merge remote-tracking branch 'origin/main' into pr-3609-fixup
# Conflicts:
#	apps/photocraft/src/services.rs
2026-10-27 14:29:13 +01:00
David Mann 77f7914271 Merge PR #9455: raw: develop the default rendering band by band, without the f32 RGB frame 2026-10-27 14:28:29 +01:00
David Mann 19d0be04b1 Merge branch 'main' into pr-3779-fixup
# Conflicts:
#	crates/engine/src/cmd.rs
2026-10-27 14:27:41 +01:00
David Mann 3a689f217c Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/file_cmds.rs
#	crates/engine/src/retouch_cmds.rs
#	crates/engine/src/vector_cmds.rs
#	crates/io/src/psd_export.rs
#	crates/io/src/psd_import.rs
#	crates/io/src/smart_map.rs
#	crates/psd/src/layer.rs
#	crates/raster/src/lib.rs
#	crates/ui-egui/src/camera_raw_ui.rs
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/filter_dialog.rs
#	crates/ui-egui/src/gpu_canvas.rs
#	crates/ui-egui/src/panels.rs
#	crates/ui-egui/src/retouch_ui.rs
#	crates/ui-egui/src/transform_tool.rs
#	crates/ui-egui/src/vector_ui.rs
#	docs/gaps.md
2026-10-27 14:26:26 +01:00
0b09eb43a5 Integration: per-band AHD balancing, memory-capped fused bands (#9455)
`for_bands_grouped` always split the bands into `min(workers, jobs)` static
chunks, so on the default develop (jobs == workers) a worker held up on the
shared pool kept a fixed share of the bands waiting, where main's
`chunks_mut_limited` runs one rayon task per band. Now, when every worker may
hold a scratch, each band is its own task and borrows a scratch from a pool
(`par::chunks_mut_pooled`, at most one per worker, dropped as soon as no
waiting band can use it); the grouping stays for memory-limited jobs.

The fused bilinear/MHC, X-Trans and LinearRaw paths ran one band per worker
with no memory cap: a 262144 x 455 Bayer frame with bilinear needed 2.92 GB
at 15+ workers and failed with LimitExceeded under the default 2 GiB.
`working_memory` now caps those bands like AHD's and the fused paths use the
returned jobs. The fused LinearRaw and X-Trans band buffers are `band.min(h)`
rows, as charged (CodeRabbit, develop.rs:414).

Tests: a_slow_band_does_not_hold_up_the_bands_after_it and
fused_bands_at_once_are_capped_by_the_memory_limit fail without the fix;
for_bands_keeps_at_most_jobs_scratches_alive, chunks_mut_pooled_makes_one_state_per_worker_at_most,
multi-band and short X-Trans/LinearRaw fused-vs-full cases.

Co-authored-by: Valentin Klein <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:24:57 +01:00
David Mann 55a0ba21d9 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/atn_cmds.rs
2026-10-27 14:24:33 +01:00
cefd60d10f Integration: drop the selection after a shared transform; don't snap to its layers (#8623)
With several layers selected and a marquee active, Free Transform in the
reference application moves the whole layers and drops the selection.
`edit.transform {"layers"}` moved the layers but left the marching ants
where they were. It now clears the selection in the same edit, so one undo
restores both. The live preview keeps showing the selection.

Snapping a shared box excluded only the active layer, so the box snapped
to the original edges of the other selected layers, which move with it.
Its edge starts on theirs, so a 2 px drag snapped straight back. It now
excludes every layer of the shared session.

Co-authored-by: eiketre <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:22:59 +01:00
David Mann 8b703ae20f Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/canvas_tool_menu.rs
#	crates/ui-egui/src/vector_ui.rs
2026-10-27 14:22:26 +01:00
David Mann dc45a83c88 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/automation/src/rpc.rs
#	crates/automation/src/workspace.rs
2026-10-27 14:20:28 +01:00
dotCooCoo 655a81fc92 Merge main and accept SVG clipboard text after long XML preambles 2026-10-27 06:20:02 -07:00
David Mann 854cea1e12 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/web_cmds.rs
#	crates/ui-egui/src/prefs_ui.rs
2026-10-27 14:19:38 +01:00
David Mann 3e15ea9eb9 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/compose/src/adjust.rs
#	crates/gpu/src/plan.rs
#	crates/io/src/adjust_map.rs
2026-10-27 14:19:34 +01:00
David Mann ac071b7cac Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/automation/src/workspace.rs
2026-10-27 14:19:02 +01:00
David Mann a95536f711 Merge remote-tracking branch 'origin/main' into fix/xml-nesting-cap 2026-10-27 14:17:47 +01:00
David Mann d9dfe34db8 Merge remote-tracking branch 'origin/main' into fix/svg-subimage-depth 2026-10-27 14:17:34 +01:00
David Mann 2363c475c0 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/compose/src/lib.rs
#	crates/gpu/src/plan.rs
2026-10-27 14:17:25 +01:00
David Mann 77d410ca88 Merge remote-tracking branch 'origin/main' into fix/psd-size-encoded 2026-10-27 14:16:43 +01:00
David Mann f010d8b6a1 Merge remote-tracking branch 'origin/main' into fix/plugin-empty-code-section 2026-10-27 14:16:34 +01:00
David Mann e7f810a406 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/channel_cmds.rs
#	crates/engine/src/edit_cmds.rs
2026-10-27 14:16:23 +01:00
David Mann 718636e55e Merge remote-tracking branch 'origin/main' into fix/history-options 2026-10-27 14:16:11 +01:00
David Mann 79db3ba60d Merge remote-tracking branch 'origin/main' into fix/crop-x-ratio-keeps-size 2026-10-27 14:15:55 +01:00
David Mann 80a2fdef92 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/io/src/smart_map.rs
2026-10-27 14:15:23 +01:00
David Mann f3a46ec2b1 Merge remote-tracking branch 'origin/main' into fix/color-wheel-short-panel 2026-10-27 14:14:37 +01:00
David Mann 18494f8afd Merge remote-tracking branch 'origin/main' into fix/cmyk-clip-vivid-light-group 2026-10-27 14:14:29 +01:00
David Mann 356c766d5b Merge remote-tracking branch 'origin/main' into fix/9034-autosave-discard 2026-10-27 14:14:13 +01:00
David Mann 9043f65a08 Merge remote-tracking branch 'origin/main' into fix/5692-tsl-off-blend 2026-10-27 14:14:05 +01:00
David Mann 89489082cc Merge PR #8923: fix(ui): Remove Tool trail tints all a stroke removes; brush trails follow hardness (#8916) 2026-10-27 14:01:28 +01:00
David Mann 8534e877dc Merge PR #9450: raw: AHD demosaic with reused planar scratch, about 1.6x fewer instructions 2026-10-27 13:58:31 +01:00
ac9b374fab Integration: Remove trail shows thin strokes on big documents (#8923)
The trail mask is at most 1024 px on its long side, so on a big document
one mask pixel stands for k x k document pixels, and the Remove trail
sampled only each block's centre. A thin stroke that fell between the
centres (2 px on 6000x4000, k = 6; 4 px on 12000x8000, k = 12) showed no
tint at all, though every pixel it touched is removed. In reach mode a
mask pixel now takes the largest coverage of its whole block, clipped to
the document. Blocks no coverage tile reaches are skipped
(StrokeRenderer::touches), so releasing a whole stroke on a 30000x20000
document restamps in 0.22 s instead of 23 s.

Also pins the waiting strokes' kept tint where a later stroke restamps
its rectangle off its own path (fails with the base max removed).

Co-authored-by: Hartmut Nörenberg <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:57:20 +01:00
Khawar Zamman Wani cc6837355b perf(paint): accumulate serial dabs in place with packed tile keys 2026-10-27 18:26:47 +05:30
David Mann 281f8e95f5 Merge PR #8704: fix(codecs): check header dimensions against the file size before allocating 2026-10-27 13:52:36 +01:00
David Mann c14a707d2a Merge PR #6583: PSD/PSB open without reading the whole file: channel data read as decoded, in bands into tiles (#5106)
Merged at the fix-up commit before its main merge (362947695d); the
conflicts with the batch are resolved here: psd_import.rs keeps both
sides' tests, tiff_layers.rs takes ImageData::new.
2026-10-27 13:50:37 +01:00
c65b7d93d6 Integration: file-size bound fits DWA EXR, RLE BMP and GIF screens (#8704)
The new plausibility check refused valid files that main opens:
- EXR DWAA/DWAB parts: they go past 2^16:1 (a flat 8192x4320 DWAB frame
  with 12 alpha-scheme mattes is 29,948 bytes, 75,629:1; run-length
  channels zlib-packed on top reach about 132,000:1). DWA parts now get
  2^18:1, so a header of a few hundred bytes can ask for about 100 MB,
  not gigabytes.
- BMP RLE8/RLE4: end-of-line, end-of-bitmap and delta escapes leave pixels
  unwritten, so no ratio bounds a valid file (an EOB-only 4000x4000 RLE8 is
  1,080 bytes). Skipped like HDR.
- GIF: the decoder's size is the logical screen, which needs no data (a
  4000x4000 screen with a 1x1 frame is 35 bytes). The first frame must be
  backed, and the screen only past 256 MiB, so a 35-byte GIF still can't
  declare a 30000x30000 screen.
The declared-size products saturate: a Radiance header of 2^31 x 2^31
read without limits overflowed u64 in debug builds.

Co-authored-by: FinnNk <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:46:11 +01:00
Khawar Zamman Wani 47df5dedea perf(paint): cache round-tip geometry per dab 2026-10-27 18:10:05 +05:30
362947695d Integration: a source read error in the layer records fails the open (#6583)
The lazy parse took any error from read_layer_info on a Layr/Lr16/Lr32
global block as a damaged block and dropped the layers. A failed read of
the source (PsdError::Read: a dropped network share, a file rewritten
while it opens) then let a 16/32-bit layered file open silently from its
merged image, with no damage warning, and a save replaced its layers.
A read error now fails the parse, as reading the whole file would.

The new test fails each read of a clean parse once, in turn, and checks
the parse either fails with the read error or matches from_bytes; with
the fix reverted, read 20 of the Lr16 sample drops the layers silently.

Found by CodeRabbit's review of the PR.

Co-authored-by: ptrinh <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:28:32 +01:00
041aac9ecb Integration: folder batches skip raws that open only as the preview (#9097)
Listing every photocraft_raw extension also picked up CR3, ORF, RAF, RW2,
SRF and SR2. The raw decoder can't read CR3, compressed ORF and RAF, or RW2
raw formats other than 3, 4 and 5 yet; import then falls back to the
embedded JPEG preview with only a warning, so a folder batch would process
the thumbnail silently. The folder list now takes the raws whose usual files
decode (DNG, CR2, NEF, NRW, ARW, PEF), and the test pins both sides.

Port of the reviewed fix-up 202ce9c2a (davidmann4/photocraft pr-9097-fixup)
to this batch's file layout: same changed lines, in file_cmds.rs instead of
main's later file_cmds/paths.rs split.

Co-authored-by: .CooCoo <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:28:27 +01:00
David Mann f35e2307de Merge PR #9097: Batch: folder sources take every format PhotoCraft opens 2026-10-27 13:27:35 +01:00
Jeremy 6599f6dbd2 docs(installer): say that silent installs are per-user and when the scope page appears 2026-10-27 12:26:56 +00:00
Jeremy e51f604ea4 docs(installer): note that the 32-bit all-users folder is Program Files (x86); tidy wording 2026-10-27 12:25:20 +00:00