Commit Graph
3891 Commits
Author SHA1 Message Date
Trevor BrownandClaude Fable 5.1 d1779bd1a1 Menus: Combine Shapes, Open Recent, Arrange and Proof Setup items carry the reference's names (#11399)
Seven menu items now read as the reference application names them, in the catalogue rows, the Open Recent item and the engine command labels. Command ids and history step names are unchanged. The translation files get the new English keys, carrying over the existing translations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 07:56:03 -05:00
dotCooCoo f120908767 Merge main into feat/equalize-entire-image 2026-11-05 04:48:33 -08:00
David Mann 4e0d487568 Merge remote-tracking branch 'origin/main' into integration-batch-17
# Conflicts:
#	docs/gaps.md
2026-11-05 13:21:45 +01:00
David MannandClaude Opus 5.5 42e92cb512 Address review: Batch stops, rename targets, Shape Blur memory, sampler releases
- A direct Batch in a script or a CLI command list stops it when it is cancelled,
  cannot write its error log, or ran out of script steps; per-file errors alone
  still continue (CodeRabbit, outside-diff findings on automate_cmds.rs and
  photocraft-cli document.rs).
- Recorded Save steps count against the script's step budget, and a Batch whose
  files failed with the budget spent carries scriptLimitError, so Browse reports
  the failure instead of ok: true (yoriswind).
- actions.rename rewrites a named Batch, nested Play or Conditional call only if
  it resolved to the renamed action before the rename; a Batch with explicit
  steps is left alone (yoriswind: two same-named actions in different sets).
- Shape Blur's run admission counts each worker's f64 prefix sums and, for a
  custom shape, the kernel mask kept for the run plus its worst-case coverage
  runs (yoriswind).
- Every sampler that takes the primary release (Color Picker, Curves/Levels and
  Properties eyedroppers, Curves Cmd-click, Color Range) ends a transform handle
  drag and a Move drag begun before it, not only the Color Picker (#11210 review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:20:01 +01:00
Hamza 3ecb46c026 Polygonal Lasso: name its History step and snap Shift diagonals to the shorter offset
select.lasso takes an optional polygonal flag that names the step
"Polygonal Lasso" (Lasso stays the default), and commit_polygon sends
it, so closing by the start point, Enter or a double-click all record
"Polygonal Lasso".

A Shift diagonal now keeps the shorter of the two offsets on both axes
with their signs (100,100 -> Shift-click 200,170 lands on 170,170, as
in Photoshop) instead of keeping the segment's length. Horizontal and
vertical snaps, and which direction a click snaps to, are unchanged.
The rubber band uses the same helper.

Fixes #11393
2026-11-05 17:13:30 +05:00
David MannandClaude Opus 5.5 a5cb392646 transform: follow the selection the box opened with; frame the Background in the controls
- A box now records the Layers panel's selection when it opens and is applied when that
  selection changes. Comparing the layers it moves with the selection's targets closed a box
  over a linked layer at once (main's #11217 adds the link group to the box), and missed a
  group's child leaving the selection (CodeRabbit).
- Move > Show Transform Controls frames the Background among several selected layers, and a
  handle press shows "Could not transform because the layer is locked." and changes nothing,
  as measured in #11101. The Background alone still gets no box.
- The new alert is translated in every catalog that has the Free Transform one.
- Stale comments and edit.transform's params doc no longer say the Background is left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 13:07:12 +01:00
mroxsoandhighperfocused 50d485ce76 test(engine): pin the #6958 exposure fixtures in File Info camera data (#6983)
Main fixed the exposure formatting itself in be9f0c250, so what is left
here is the regression coverage the report asked for, asserted through a
real EXIF block: the two reported values (0.031714 s -> 1/32 s,
0.0215 s -> 1/47 s), a reciprocal that rounds to a whole denominator
(1/3 s), and the three-significant-digit decimal fallback for a time too
far from any whole denominator (0.2731 s -> 0.273 s).

Fixes #6958

Co-authored-by: highperfocused <highperfocused@pm.me>
2026-11-05 13:05:38 +01:00
David Mann 9e9b31c6ed Merge main into fix-transform-several-selection-rules (main e3ecd73569) 2026-11-05 12:51:36 +01:00
David Mann f162c19e81 Merge remote-tracking branch 'origin/main' into integration-batch-17
# Conflicts:
#	crates/ui-egui/src/control/dispatch.rs
#	crates/ui-egui/src/control/params.rs
2026-11-05 12:44:02 +01:00
Khawar Zamman Wani e3ecd73569 feat(frame): rework the Frame tool's selection, handles and placement (#8920)
Thanks @wanikhawar — merging the Frame Tool rework.

Summary: Frame Tool selection/handles/placement now distinguish frame vs image (border / click / double-click and Layers thumbnails), with independent transforms, shape variants, Properties/options-bar stroke and fit commands, Convert to Frame, CLI/MCP `layer.frame.*` commands, native `.pcraft` persistence, and PSD export via editable groups + `pcFr` metadata (not Photoshop's native frame type). Tests cover selection, transforms, fitting, locks/hostile geometry, and native/PSD round-trips.
2026-11-05 12:39:02 +01:00
Khawar Zamman Wani 7ba589e01c MCP headless: waited commands run as jobs, with progress and cancel (#8129) (#8132)
Thanks @wanikhawar — merging.

**Summary:** In headless MCP, waited `command_run` / batch steps run job-capable commands as engine jobs (lock released while polling), with progress notifications and cancel/abandon on request drop. Fixes the “cancel does nothing / inspect blocks” behaviour for long filters. Cap of 16 background jobs; docs updated. Stack base for #8134.
2026-11-05 12:28:48 +01:00
Khawar Zamman Wani 41cb536813 perf(paint): cache sampled-tip mipmaps between strokes (#9617)
Thanks @wanikhawar — merging.

**Summary:** Sampled brush tip mip pyramids are reused across strokes and symmetry through a bounded LRU (64 entries / 256 MiB); Edit ▸ Purge All releases the cache. Bench + purge/render tests lock the behaviour.
2026-11-05 12:27:06 +01:00
Khawar Zamman Wani 66f1e8b8aa Selection: Grow and Similar match only selected colours, Grow starts from the frontier (#9673)
Thanks @wanikhawar — merging.

**Summary:** Grow and Similar now match selected colours via a BVH `ColorMatcher` (L∞ per channel) instead of one AABB that falsely included intermediate hues; only exact-zero alpha is the transparent wildcard. Contiguous Grow seeds from the selection frontier rather than every selected pixel. Tests + bench included.
2026-11-05 12:26:50 +01:00
Trevor BrownandClaude Fable 5.1 1b77721927 select.float: a blank or overlong stepName falls back to Move (#11383)
The new History step name for the dropped piece is trimmed and capped at 64 characters, so the control channel cannot plant an unbounded label; a test covers the fallback and the Duplicate name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 06:08:50 -05:00
Trevor BrownandClaude Fable 5.1 cd203aa531 Move tool: History names its steps Move, Nudge and Duplicate as the reference does (#11383)
An Alt+drag copy of a layer is now one step named "Move", arrow-key nudges of the selected layers are named "Nudge" (one per press, or one per bundled run), and an Alt+drag copy of selected pixels is named "Duplicate". Alt+arrow keeps "Duplicate + Move". The Bundle Arrow-Key Nudges preference and its default are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 05:59:44 -05:00
Trevor BrownandClaude Fable 5.1 6d486a4c29 Selection tools: dragging the outline records "Move Selection", as the reference does (#11390)
A drag inside the selection with the Rectangular Marquee, Elliptical Marquee or Lasso now records the History step "Move Selection" instead of "Transform Selection". select.transformSelection takes an optional stepName parameter that accepts only "Move Selection", and the canvas sends it from finish_selection_drag. Select > Transform Selection and arrow-key nudges keep their name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 05:59:21 -05:00
David MannandClaude Opus 5.5 16000b01ef Address CodeRabbit review: batch 17 findings
Engine: droplet dependency capture skips disabled steps; a nested Batch
that was cancelled or could not write its error log fails the caller;
runDroplet forwards overrideOpen; actions.rename follows named Batch
steps; Batch steps inside a script count against MAX_SCRIPT_STEPS;
output claims compare destination identity; Save and Close never
replaces a read-only source. ATN: Md must be a BlnM enumeration,
adjustment-layer names must round-trip, Calculations exports a missing
blending as Multiply, Apply Image refuses unnamed-layer transparency.
Filters: Shape Blur records its resolved geometry, reserves its kernel
memory first, and reports a preparation failure as an error, not a
cancel; Crop keeps an artboard preset when the size is unchanged and
fits the board on a turned crop.

Codecs/cms/algo: zero-axis FITS image HDUs are empty; a GIF walk that
breaks off before the trailer fails closed; two-value .3dl shaper rows
are applied; fragmented custom kernels are refused and their work polls
cancellation.

UI: Conditional branches play through panel playback; paused actions
refuse to resume after being replaced; Playback Options OK validates
its fields; transform double-click ignores a hidden pivot; path boxes
snap to a stationary selection; modal blocking uses the effective tool;
a picker-consumed release clears snap lines and ends a Move drag; the
Crop preset control shows Selection and checks only it; Crop box undo
restores frame_from_selection; Bosnian fill labels.

Tests: timing asserts moved to an ignored test, plus the review's
coverage nitpicks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:37:38 +01:00
Trevor BrownandClaude Fable 5.1 fa1814a076 Shortcuts: Ctrl+/ opens Layer › Lock Layers…, shown in the Layer menu and the Layers panel menu (#11397)
layer.lockLayers now defaults to Cmd+/ (Ctrl+/ off the Mac) in its engine spec and in the Layer menu row. The Layers panel menu's Lock Layers… row shows the command's current key, so a key changed in Edit › Keyboard Shortcuts shows up there. Plain / still toggles Lock Transparent Pixels.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-05 05:07:47 -05:00
yoriswind 1de6c9e2c5 Find active layer donors beyond a turned crop corner window 2026-11-05 01:29:48 -08:00
yoriswind 224dcdc936 Fix content-aware crop targets and history labels 2026-11-05 01:29:48 -08:00
midasdf b60b58af6c Merge remote-tracking branch 'origin/main' into pr
# Conflicts:
#	docs/target-app-parity.md
2026-11-05 18:00:44 +09:00
David Mann cf65810dda Merge remote-tracking branch 'origin/main' into integration-batch-17
# Conflicts:
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/id.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ko.tsv
#	crates/ui-egui/src/i18n/nl.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sr.tsv
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	docs/gaps.md
2026-11-05 09:03:28 +01:00
dotCooCoo 78d993ba11 Adjustments: Equalize refuses a null selectedAreaOnly
image.adjustments.equalize used the default for `selectedAreaOnly: null`.
It now returns an error for null as it does for every other non-boolean
value, and only an omitted value takes the default. Action export refuses
a step with a null selectedAreaOnly for the same reason.
2026-11-04 23:41:44 -08:00
dotCooCoo a55ef6d585 Merge main into feat/equalize-entire-image 2026-11-04 23:04:09 -08:00
d7d138b1e5 Art History Brush: Opacity on the options bar (#10263) (#10278)
* Art History Brush: Opacity on the options bar (#10263)

The Art History Brush's own brush opacity is shown in its options bar
(0-100%) and sent to paint.artHistoryBrush. It is kept per tool, saved
across launches, set by the 1-0 keys and restored to 100% by Reset Tool,
as the Clone Stamp's is. Tests cover the UI wiring, per-tool persistence,
Reset Tool and stroke output at 8/16/32-bit.

* Update crates/ui-egui/src/panels/options_bar.rs

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>

* Art History Brush starts at 100% opacity on first use

A tool picked for the first time takes the outgoing brush; the Art
History Brush now takes it at full opacity, as the issue's default asks,
so a 30% Brush no longer makes the first Art History stroke 30%. Other
tools keep inheriting opacity.

* Art History Brush: document Opacity in the command contract and carry it in tool presets

---------

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 07:15:57 +01:00
Khawar Zamman WaniandFredApps 316e00a97e Bound Photomerge memory and safely reject out-of-budget jobs (#7851) (#10463)
* Reduce Photomerge input and fill memory

* Bounded working-memory budgeting and safe allocation for Photomerge

* Photomerge memory: estimate warped sizes, no RAM ceiling, shared RAM detection

- Budget is half of physical RAM (at least 1 GiB) with no 8 GiB ceiling.
- The pre-flight estimate uses each image's warped extent and the band
  grid's exact bound (band_bytes_bound), at the levels seam_blend uses.
- Auto-Blend keeps its old batching with no single-band cap.
- multiband returns a Result instead of a blank image on failure.
- Physical-memory detection moves to photocraft_engine::memory; the GPU
  budgets reuse it, so PHOTOCRAFT_RAM_MB means the same in both.
- Document memoryBudget; restore comments; tests for the band cap and the
  budget precedence.

* Photomerge: lower the blend's peak and estimate it by phase

- The band build makes its binary coverage straight from the alpha and
  writes each Laplacian level in place, so a band holds two fewer planes.
- The weight sums are freed before the collapse, which adds each level
  in place and frees it as it goes.
- The estimate is the largest phase (warp, ROIs, bands, collapse, output,
  fill) rather than the sum of all of them, and the bands get what is
  left of the budget after the ROIs and accumulators.

Every output pixel is unchanged: each change drops a plane or does the
same elementwise operation in place.

* Fix Photomerge band budget validation and fallible pyramid allocation

* Keep reference pyramid test helpers infallible

* Photomerge: bound source loading with the memory budget

Resolve the budget before any source is read, and admit each flattened
source before its surface is allocated. The accounting charges the
retained surface, the same-canvas temporary the flatten writes while the
source document is alive, and a file import's encoded bytes, with
saturating math so an overflow cannot wrap under a finite budget. Merge
to HDR Pro passes no budget and keeps its previous behaviour.

Tests cover the exact retained-plus-temporary charge, a refused source,
the within/over-budget command paths, the post-load estimate path, and
the unbudgeted HDR loader.

* Photomerge: bound source reads and imports by the remaining budget

Read each source file with what is left of the budget as its limit, lower the importer's own PSD/TIFF preflight or the flat decoders' pixel allowance to the remainder after the retained sources and encoded bytes, and refuse formats with no pre-decode estimate. Charge the decoded document's actual pixels (every layer) plus the flatten's working and output surfaces before flattening. Merge to HDR Pro keeps its unbudgeted read-and-import path.

* Remove redundant TIFF decode options update

* Clean up Photomerge budget Clippy findings

* Accept early decoder admission in source budget regression

* Photomerge: report unreadable sources as file errors; never reserve past a read limit

- A budgeted Photomerge reported a missing or unreadable source file as
  'not enough memory'. Only a file over the remaining budget, or one memory
  cannot hold, is a memory error now; others are file errors, as without a budget.
- read_all_with reserved a whole read chunk before checking the caller's limit
  for a file that grew after it was statted. It now refuses first and caps the
  reservation at the limit.

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 06:23:56 +01:00
b152f4175e Move tool: auto-nest layers into the artboard they're dropped on (#10218) (#10512)
* Move tool: auto-nest layers into the artboard they're dropped on (#10218)

In Photoshop a layer dragged with the Move tool onto another artboard joins
that board, and one dragged onto the pasteboard leaves its board. PhotoCraft
had the Prevent Auto-Nesting lock but not the behaviour, so a layer dragged
onto another board stayed in its old board and was clipped away.

layer.translate takes an opt-in "nest" flag. With it, a moved layer whose
centre now lies on a different board joins that board on top of its stack,
and one moved off every board goes to the top level above the board it left,
in the same undo step. The Move tool's drag release sets it, which covers
Alt-drag copies; nudges, actions and scripts are unchanged. Boards,
the Background, empty layers, over-deep groups and layers locked with Prevent
Auto-Nesting stay where they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Auto-nesting: true, floored middle for the board under a layer

Review follow-up: board_under found the middle of a dropped layer by halving
each edge first, so a layer at 9..11 counted as centred at 9 and could join
(or stay in) the wrong one of two boards meeting at x = 10.

The middle now comes from one helper, layer_place::centre, shared with the
placement of new and pasted layers: the edges are added in i64 before halving
and the sum is floored, so -4..3 (middle -0.5) is left of a board starting at
x = 0, not on it. Adds regressions for both.

Co-Authored-By: Claude <noreply@anthropic.com>

* Document the auto-nesting rule and exclusions in layer.translate

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 06:18:46 +01:00
Khawar Zamman WaniandFredApps ad59d9962c Type: add OpenType Stylistic Sets submenu (Set 1–20) (#10304)
* Type: add OpenType Stylistic Sets submenu (Set 1–20)

Type > OpenType > Stylistic Sets toggles ss01–ss20 through new
type.openType.stylisticSets.setN commands on the usual formatting scope
(selected characters while editing, else the selected type layers).
The toggle direction and the menu checkmark follow the style at the
selection start. Updates TYPE-218-5 and G8.

Closes #10285

* Stylistic Sets: round-trip test through a full PSD; scorecard parity count

* Stylistic Sets: test PSD round trip on an opened file; record the new-document PSD gap

Documents made in PhotoCraft get no Txt2 block on PSD save, and the set
mask lives only there, so their sets are not saved to PSD yet. The engine
test keeps the .pcraft round trip, an io test covers the PSD round trip
of a file with type objects, and TYPE-218-5 and G8 record the gap.

* Stylistic Sets: share one tag table between the engine and the menu

The engine exports STYLISTIC_SET_TAGS; the Set 1–20 commands index it and
the menu checkmarks read it, so the 20 tags are listed once.

* Stylistic Sets: check malformed menu ids through the resolver, not the menu list

* Scorecard: TYPE-218-5 notes PSD save of stylistic sets in documents made here (#10308)

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-05 06:16:54 +01:00
b3ff05ecb7 Port #5212: format the Playback Options engine change
Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:13:12 +01:00
Khawar Zamman WaniandFredApps efbe97bd53 Fix imported gradient presets sharing selection names (#10521)
* Fix duplicate gradient preset names on import and restore

* Preserve addressable gradient names during duplicate migration

* Preserve gradient identities during import and restore

* Assert restored selected gradient retains its stops

* Pass replace in the duplicate gradient names test after #10640

Main now imports a re-imported .grd beside its group unless replace is set
(#10640). The test re-imports over the same group, so ask for that.

* Use the same replace default for gradient name allocation and group insertion

After #10640 the group insertion defaults replace to false, but the name
allocation still defaulted it to true, so a default re-import created a
sibling group with the same preset names. Resolve replace once and add a
regression for the default and explicit replace paths.

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 06:04:12 +01:00
eaa1b7c06e Port #5212: Playback Options in preferences and actions.setPlayback
Accelerated / Step by Step / Pause For (whole seconds 1..60) and Create a
single history state are saved in prefs.actions and set together through
actions.setPlayback, validated before any value is stored. Headless
actions.play keeps running the whole action at once.

Co-Authored-By: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 06:03:39 +01:00
2782636025 Fix-up #10788 + #10612: build the merged batch
#10788 adds a preserve_alpha argument to tga_image and makes
flat_transparency_and_channels fallible. The renderer export path the
batch already holds still called the old signatures; it now passes
opts.preserve_alpha and propagates the error like the CPU path.

Both PRs carried the same three tests (scoped source slots, droplet
Batch namespaces, droplet scoped variant limit); git kept both copies.
Keep one of each.

Co-Authored-By: yoriswind <yoriswind@yahoo.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 05:38:01 +01:00
David Mann 5385ebd95b Merge PR #10788: Support recorded dialog filters, Calculations and Batch naming
# Conflicts:
#	crates/engine/src/cmd/actions_cmds.rs
#	crates/engine/src/cmd/automate_cmds.rs
#	crates/engine/src/cmd/file_cmds.rs
#	crates/engine/src/cmd/file_cmds/batch_run.rs
#	crates/engine/src/cmd/file_cmds/tests.rs
#	crates/engine/tests/it/main.rs
#	crates/ui-egui/src/panels/actions.rs
2026-11-05 05:19:44 +01:00
David Mann 5b63b5ca52 Merge PR #10612: Run the selected action in Batch and Create Droplet 2026-11-05 04:58:29 +01:00
David Mann 5031d0f2b9 Merge remote-tracking branch 'origin/main' into integration-batch-17 2026-11-05 04:57:59 +01:00
362a307449 Port #8659: show Stop messages and continue called actions after a pause
A Stop step with its dialog toggle on now shows a Message window with
the recorded text and Continue (when the step allows it) and Stop,
keeping the steps already applied; with the toggle off it ends playback
silently, and Insert Stop turns the toggle on, as measured in the
reference application. Allow Continue is read from the paused playback,
not from the dialog's fields. Agents and headless playback keep the
engine's Stop semantics.

A pause inside a called action now carries its callers (at most 16):
confirming finishes the called action and then each caller after its
call, replayed inside the callers' playback frames so recursion checks
and the single history state still hold. A silent stop ends the callers
too. Fixes #8386.

Co-Authored-By: bommerts <44821497+bommerts@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 04:56:41 +01:00
ca151c6b84 Paste into another artboard keeps the place on the board (#8788) (#10538)
* Paste into another artboard keeps the place on the board (#8788)

Copying from one artboard and pasting with another board (or a layer on it)
selected put the pixels at their old canvas spot on the first board, where
the second board hid them, or in the middle of the view; the new layer still
went beside the selected one, inside the second board.

The clipboard now remembers the artboard a Copy came from (the copied layer's
board, every copied layer's when several are selected, or for Copy Merged the
board under the middle of the copied area). Paste and Paste in Place into a
different board of the same document move the pixels by the offset between
the two boards' origins, so they land at the same spot on the new board, and
the layer goes inside it as before. Pasting on the same board, outside the
boards or into another document is unchanged, and Paste Into / Outside keep
centring on the selection.

Co-Authored-By: Claude <noreply@anthropic.com>

* Paste between artboards: copied layers and true middle for the source board

Review follow-ups:
- With a pixel selection, Copy takes the active layer only, even when several
  layers are selected, but the source board was worked out from every
  selected layer, so selected layers on another board cancelled it. It now
  uses the layers Copy actually takes.
- Copy Merged found the board under the middle of the copied area by halving
  each edge first, which rounds 9..11 to 9 and could pick the wrong one of two
  boards that meet. The edges are now added before halving.

Adds a test for each, both failing before.

Co-Authored-By: Claude <noreply@anthropic.com>

* Paste between artboards: locked boards and the placement midpoint

Review follow-ups:
- With a locked board itself selected, the pasted layer goes above the board,
  not into it, yet it was still moved to the board's spot. The board shift is
  now skipped in that case; a layer inside a locked board still lands on it.
- layer_place found the board a new layer lands on by halving each edge
  first, so a paste moved to 19..21 had its middle at 19 and was turned away
  from a board starting at 20. The edges are now added before halving, as for
  the copy's source board.

Adds a test for each, both failing before.

Co-Authored-By: Claude <noreply@anthropic.com>

* Paste between artboards: floored placement middle, pastes join smaller boards

Review follow-ups (FredApps):
- The placement middle truncated toward zero, so content at -4..3 (middle
  -0.5) counted as 0 and a board starting at x = 0 took it in. One helper,
  layer_place::centre, now adds the edges in i64 and floors the sum; Copy
  Merged's source board uses it too, and so does #10512's auto-nesting, with
  a byte-identical layer_place.rs so the two merge in either order.
- Pasting onto a smaller board kept the offset from its origin, but the
  layer's middle then fell past the board's edge and it was placed outside.
  A paste moved onto a board now joins it; the board clips the rest.

Tests: negative-boundary placement, a document without boards, a smaller
board (offset kept, board clips), each failing before where it applies.

Co-Authored-By: Claude <noreply@anthropic.com>

* Paste between artboards: keep a clipped paste's clipping on a board

Review follow-ups (CodeRabbit):
- A paste that joins a board always lost its clipping. It now keeps its own
  clipping flag (the copy's, from before placement) while the board holds a
  layer it can clip to, and drops it on an empty board, as a new layer does.
- Documented that boards more than the 32-bit range apart can't shift a paste,
  which then keeps its usual placement rather than wrapping around.

Adds a test (a clipped group pasted onto a board with a layer and onto an
empty one), failing before.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-05 04:55:07 +01:00
30b199f8df Port #8659: keep name, blend mode and clipping on adjustment-layer Make steps
An adjustment layer's Make step now loads its `Nm  `, `Md  ` and `Grup`
keys as the command's `name`, `mode` and `clipToPrevious` params and saves
them back. An unreadable value keeps the step as an unsupported kept step;
`layer.newAdjustmentLayer.*` validates the new params like New Layer and
clips through the clip-group rules. Fixes the remainder of #8384.

Co-Authored-By: bommerts <44821497+bommerts@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 04:35:32 +01:00
8d34370bcf Port #8111: the Crop tool fits a canvas-sized artboard to its frame
A straight Crop tool crop (image.crop with an explicit rectangle) of a
document whose only artboard covers the whole canvas now fits that board
to the new canvas and clears its size preset. Before, the board kept its
old size and hung past the cropped canvas.

Measured in the reference application: its Crop tool in an artboard
document edits the artboard ("Edit Artboard": the board takes the frame,
content stays where it is), so the visible result matches. Image > Crop
with a selection does nothing there, Image > Trim keeps the board's
size, and a turned crop is impossible with artboards.

Left out of the original PR: the fit on selection crops, Trim and turned
crops (they differ from the reference application), so crop_doc and
Export Layers to Files are unchanged; the printer-query commits
(superseded on main) and the shapes.rs hunk (already on main).

Co-Authored-By: durtyrobbin <76844303+durtyrobbin@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 04:00:14 +01:00
David Mann 9cfdc15be3 Merge PR #10505: Free Transform takes soft edges whole after a move, leaving no outline (#10461) 2026-11-05 03:34:22 +01:00
Khawar Zamman Wani 0a9717fa64 PDF export: keep the top text and shape layers as vectors, with selectable text (#10355)
* Skip compositing for geometric measurements

* Preserve simple PDF shapes and glyph source ranges

* Preserve text and shapes in PDF export (#10269)

- Export topmost simple text layers as vector glyph outlines with selectable text
- Embed ActualText unicode span and invisible text operators (mode 3 Tr) for 100% extraction
- Support stroked shapes in vector PDF export (centered solid strokes, dashes, line caps/joins)
- Retain glyph style indices in text rendering outlines

* Drop a product name from the glyph outline doc comment

* PDF export: keep path text and synthetic bold raster

* Fix PDF Unicode selection and respect font embedding permissions

* Render the text cache in PDF raster fallback fixtures

* Fix PDF vector selection eligibility and finite text matrices

* Preserve upper PDF vectors and reject overflowing curve controls

* Fix text shape import in PDF regression test

* Cover PDF Unicode map blocks and leading selection whitespace
2026-11-05 03:33:35 +01:00
yoriswind 83861f6862 Preserve DDS subresources and recorded filter representations 2026-11-04 17:12:28 -08:00
yoriswind 067cef6543 fix: preserve DDS slices and recorded Shape Blur metadata 2026-11-04 16:54:35 -08:00
yoriswind a27de5e30d fix: replace stale Smart Filter shape selectors 2026-11-04 16:06:21 -08:00
yoriswind 6c831b7569 fix: retain LUT shapers and resolve edited Shape Blur geometry 2026-11-04 12:34:44 -08:00
dotCooCoo 6d91271c0a Merge main into feat/equalize-entire-image 2026-11-04 11:07:34 -08:00
Saloouu c426d4fbe5 Toolbar slots and tool keys keep their last tool across launches (#3569) 2026-11-04 19:58:46 +01:00
yoriswind 1720af269d Merge current main while preserving recorded Batch safeguards 2026-11-04 10:47:01 -08:00
yoriswind 0769620468 Keep unsupported Shape Blur origin in preservation regression 2026-11-04 10:44:31 -08:00
yoriswind 3edffb77ec Merge current main and preserve named Batch history ownership 2026-11-04 10:34:08 -08:00