Commit Graph
2574 Commits
Author SHA1 Message Date
7b7b6c930d PSD: recognise Photoshop's MTrn merged-transparency marker
Photoshop 27.11 saves a layered TIFF with Save Transparency as an RGBA
composite whose layer data has a positive layer count and an `MTrn`
block (`nrTM` in an II file). The specification's key is `Mtrn`, so the
composite's transparency opened as an extra alpha channel and a PSD save
wrote it twice.

TaggedBlock::is_merged_transparency_marker lists Mtrn, MTrn, Mt16 and
Mt32; PsdFile::merged_has_alpha and the PSD exporter's layer-block
placement use it.

Split from #7415; the work started in #3121.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
2026-10-21 11:36:31 -04:00
Korg1ch 76e4e81e33 fix(ui-egui): outline the slider knob in the light themes (#7927) 2026-10-21 18:28:10 +03:00
Michael Higgins 968d8db4e1 Merge branch 'storytold:main' into fix/7524-plugin-preview-px-scale 2026-10-21 11:22:01 -04:00
Branch Sync 48d2fb45bd Merge remote-tracking branch 'refs/remotes/upstream/main' into HEAD 2026-10-21 11:18:54 -04:00
Branch Sync 960d927a37 Merge remote-tracking branch 'refs/remotes/upstream/main' into HEAD 2026-10-21 11:18:25 -04:00
Jason White 0cc7bba44c fix(atn): import a recorded Save As with its destination (#7102)
The save event was mapped with no fields, so every Save As in an .atn
came in as a plain File > Save. Playing it wrote over the file the action
was played on and never wrote the recorded output.

Save now reads As, In and Cpy. A destination that's a file of the
recorded format imports as file.saveAs, or file.saveACopy for As a Copy.
A folder destination, an unknown format or an extension that doesn't
match stays a kept Photoshop step, so playback stops before writing
anything. Folder saves can map once the {folder, extension} step from
Save As steps now export to .atn too instead of being skipped.
2026-10-21 16:11:11 +01:00
fjamespriceandClaude Opus 5.5 49df3fb921 perf(camera-raw): develop the preview's per-pixel stages on the GPU (#6916)
Step 1 of #6916: one wgpu fragment pass for develop's per-pixel stages
(white balance and exposure, Contrast without Texture or Clarity, Whites
and Blacks, Vibrance and Saturation, tone curves, Color Mixer, Color
Grading, vignette, grain in full-resolution coordinates).

- algo: camera_raw::per_pixel resolves those stages' constants and
  tables; the CPU develop builds its own from the same functions, so its
  output is unchanged bit for bit.
- gpu: CameraRawDevelop (camera_raw.rs, camera_raw.wgsl), curves and
  Whites/Blacks rows in one R32Float table texture, readback for the
  histogram and scopes. Built on demand, not with the compositor (#6419).
- ui-egui: the proxy worker develops on the GPU when the settings have no
  spatial stage; Rendering Mode CPU, no GPU canvas, a software adapter, a
  fault or a failed develop use the CPU develop. The pipeline builds on a
  thread at the first open. describe() reports developMs and
  developBackend.

GPU vs CPU at 8, 16 and 32 bits: at most 2.7e-5 (RTX 5060 Ti, Vulkan and
DX12), 6.7e-6 (WARP); tests hold 1/4096. 858x572 proxy, release: CPU
20.7-28.1 ms, GPU 2.7 ms.

Part of #6916.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:10:13 -04:00
Michael Higgins 74aadae69e Merge branch 'storytold:main' into fix/688-windows-symbols 2026-10-21 11:09:33 -04:00
Reynold Hu b2611ce846 docs: list the canvas-size page in troubleshooting 2026-10-21 22:28:07 +08:00
Reynold Hu 8d7b5324ef docs: answer the Canvas Size white border question (support) 2026-10-21 22:28:07 +08:00
52c1e211d1 Integration: one undo step per Color panel gesture, no Move tool recolouring (#5842)
A drag in the Color panel's field or sliders only reaches the panel after
its press frame (egui decides click vs drag on a later frame), so
`continuing()` was always true on a drag's first pick and the drag reused
the previous pick's history key: a swatch, click or earlier drag followed
by a drag became one undo step. The key is now the pointer's press time,
as `type_tool::drag_key` does; swatches, the Color Picker and clicks get
a fresh key. The kittest `color_panel_gestures_recolour_the_selected_shape_in_separate_steps`
drives real clicks and drags (the first drag joined the click's step
before). CodeRabbit flagged this on the PR.

The R, G, B, HSB and hex fields apply every keystroke, so typing "128"
into G with a shape selected left three undo steps (1, 12, 128). While
no button is held, picks now share the focused field's step; a focus
counter (`track_focus`, run by the panel each frame) makes a value typed
after refocusing a field a new step, and a click (a release frame) is
always its own; a sum (`2*64`) committed by Enter, after the field let go
of the focus, keeps the step of the field focused last frame. Pinned by `typing_an_rgb_value_recolours_the_selected_shape_in_one_step`
(5 steps instead of 3 for "128" before).

With the Move tool (the default tool), Photoshop only changes the
foreground when a colour is picked; the PR recoloured the selected type
and shapes too, so a colour picked to paint with later rewrote them. The
Move tool now joins `other_tools_only_change_the_foreground`.

Co-authored-by: baz <57290335+bazmarth@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:25:52 +02:00
Aditya VishwakarmaandClaude Opus 5.5 ef2d8b1a7d docs(architecture): requirements, not pins; Cargo.lock has the exact versions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:54:16 +05:30
PerchAnton 44d37f98c6 Merge main and resolve automation path documentation conflict 2026-10-21 16:21:28 +03:00
Aditya VishwakarmaandClaude Opus 5.5 c8ffb9a8b0 docs(architecture): drop references to the removed rust-framework-options.md
The guide pointed to rust-framework-options.md, which is no longer in the
repo, for version pinning and the UI toolkit choice. Say where versions are
pinned, and drop the two open decisions this document already records as
made (egui/eframe on wgpu; the WebAssembly plug-in API).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:46:30 +05:30
jonathanwxh-cellandClaude Opus 5.5 171f612337 Keep Batch results when the action saves and then closes the document
Batch dropped recorded Save / Save As / Save a Copy steps and saved the
active document after the whole action, so "..., Save As, Close" failed on
every file, and a Close that left another document active saved that one
instead. Treat a recorded save as marking the result (Photoshop's "Override
Action 'Save As' Commands"): write the document as the save found it when it
is closed or another document is active at the end, else save it after the
action as before (#3058). Droplets keep the save steps too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 20:38:27 +08:00
9a6b3cb3bc Integration: merge main, resolve conflicts with #6913's split warps (#5769)
Main's quiltWarp support (#6913) rewrote the same placed-warp code the
cylinder warp touches. Kept main's split-warp read and write
(warp_head, quiltWarp, sold_warp) and added the cylinder to it:
warp_head writes `warpValues` for a cylinder, placed_frame frames a
cylinder's mesh as well as any valid custom mesh, quad_points uses
perspective_frame of the warp the block stores, and parse_smart_perspective
reads `quiltWarp` before `warp`, as parse_placed_warp does, so a projective
placement is framed by the warp that is imported.

Co-authored-by: alvarohn <32224796+alvarohn@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:29:59 +02:00
Higgs32584andClaude Opus 5.5 20c9dec174 Plug-ins: an unknown "unit" is unitless, not a manifest error (#7524)
Unknown manifest fields were always ignored, so a plug-in may already
carry any "unit" value; failing its install would break it. Anything but
"px" (an unknown string, a number, null...) now reads as "none", as when
the field is absent. The plug-in loader has no warning channel, so this
stays silent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:10:16 -04:00
Higgs32584andClaude Opus 5.5 65f38bf3ed Plug-ins: scale "unit": "px" params on a reduced live preview (#7524)
A filter plug-in's live preview runs on a reduced copy of a large
document, but its params only went through the built-in name list, so a
pixel length with another name (Chromatic Aberration's Amount) previewed
2-4 times too large, and a unitless `size` or `radius` was divided.

number and int params now take an optional "unit" ("px" or "none", the
default; anything else is a manifest error). The preview divides px
params by the reduction (defaults included, ints rounded, kept in range)
and limits the factor so a px param with a positive minimum never drops
below it. Unitless params are never scaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:00:57 -04:00
David MannandClaude Opus 5.5 1ff7487333 Integration: merge main, resolve conflicts (#5249)
docs/file-format-parity.md: kept main's status line and PSD row, re-applied
the PR's smart filter additions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:00:56 +02:00
Rene Leonhardt eb7e497aaf perf(compression): decode compressed slices without buffering
Use the buffered-input decoders directly for Affinity zlib entries, deep
EXR ZIP chunks and SVGZ data already held in memory. This avoids a 32 KiB
input allocation and copy per decoder.

Keep output limits and checksum handling, with coverage for truncated
EXR streams and concatenated SVG gzip members.
2026-10-21 13:59:34 +02:00
Rene Leonhardt df6a7e7b5a perf(format): reduce ZIP archive allocations
Reserve complete bundles and directories from compressed sizes, and borrow
UTF-8 entry paths in the lookup index. Preserve lossy names and first-entry
lookup for duplicates.

Check ZIP field lengths before writing, bound metadata reservations, and
cover byte equivalence, overflow and incremental saves. ZIP entry paths
have a format limit independent of filesystem path constraints.
2026-10-21 13:59:34 +02:00
FartmanAndBurps 755ca9e2a0 feat(print): add interactive preview positioning
Drag the visible image in the print preview using paper-scaled egui points.
Switch Center to manual without moving the grab point, allow signed Top/Left
offsets, and retain the shared preview/PDF layout and mirrored behavior.

Add regression coverage for negative PDF placement, native HiDPI dragging,
centering, clipping, scaling, fit, mirroring and invalid geometry.

Validation: 25 engine print tests, 19 file-dialog unit tests, four print-dialog
integration tests and the adversarial-command test pass. Formatting,
all-target clippy, desktop check/build and layer checks pass.
Three existing socket-binding tests are sandbox-blocked and excluded from
the successful print-suite rerun. GUI capture and wasm checks remain limited
by the environment.
2026-10-21 12:31:08 +01:00
SimoneRecchia 729e5c68ed feat(ui): Photoshop Fill/Stroke popover and full Color Picker for every colour swatch
The shape Fill and Stroke swatches (options bar and Properties) opened egui's
built-in picker, which only has RGBA fields and no hex. They now open
Photoshop's popover: No Color, Solid Color, Gradient and Pattern along the
top, the Color Picker button at the top right, Recently Used Colors and the
swatch library's folders. Gradient applies a gradient preset to the selected
shape; Pattern is shown but off, since shapes don't render pattern paint yet.

The Color Picker button opens the full Color Picker dialog (HSB, RGB, Lab,
CMYK, hex, eyedropper) titled Color Picker (Fill Color) / (Stroke Color),
with a live canvas preview; OK is one undo step (shape_fill_ui::open_paint).

Every other colour swatch built on widgets::color_edit_button* (Photo
Filter, Black & White tint, Gradient Map stop, Content-Aware Fill overlay,
Filter Gallery glow, Save for Web colour table) now opens the same Color
Picker dialog instead of egui's picker; OK hands the colour back to the
swatch through color_picker_ui::widget_tick.

Recently Used Colors are kept in Preferences::recent_colors (newest first,
15), filled by the Color Picker's OK and by popover picks.
2026-10-21 10:54:46 +00:00
David MannandClaude Opus 5.5 9b21358035 Address CodeRabbit review: document the panel scan's blind spots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:43:58 +02:00
David MannandClaude Opus 5.5 222180e028 Address CodeRabbit review: preference counts match the scorecard
The regenerated scorecard reports 24 of 170 settings that do nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:29:54 +02:00
David MannandClaude Opus 5.5 60cd4ad099 Address CodeRabbit review: scope the Gaussian Blur speedup claim
The uncancelled speedup is for layers with locked transparency only, the
numbers are local runs and the perf baseline is not re-measured yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:26:07 +02:00
David Mann d073b42290 Merge remote-tracking branch 'origin/main' into perf/p25-blur-cancel 2026-10-21 12:24:58 +02:00
David MannandClaude Opus 5.5 a67b6ed5ca Address CodeRabbit review: narrow two coverage claims, cite evidence as file:line
BUG-207-5: only eight retouch tools are tested to follow the Channels panel target (Healing,
Spot Healing, Sponge and Remove are skipped by changes_gray). BUG-208-4: the Polygonal Lasso test
keeps the selection for Shift or Alt and commits a Shift polygon; no test commits an Alt one.
The notes this branch changes now cite file:line, as docs/development.md asks; ui-parity.md gets
a dated row for the marquee Shift+Alt test instead of rewriting the 2026-10-11 one.
Regenerated docs/scorecard.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:24:49 +02:00
David MannandClaude Opus 5.5 d3a5c28904 Merge main into docs/scorecard-stale-rows-2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:23:19 +02:00
David MannandClaude Opus 5.5 0427d52cbb Fix up the merges of #3535, #3567 and #6088: one catalog line per string, purge test as in #3567
The merges left the History Options and New Snapshot strings twice in the hu, sr, tr and vi
catalogs (this branch's old copies next to #3535's and #3567's), which the catalog consistency
test refuses; the owners' lines stay. The purge-histories test had both #3567's and this branch's
edits; it is #3567's again.

A test checks the snapshots against #3535's current visibility rule: with visibility changes not
undoable, undoing the selection of the first snapshot or a save snapshot hides a layer the eye hid
again, and Redo shows it. Regenerated docs/scorecard.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:17:13 +02:00
Marco Arnulfo 562601eb47 Save for Web: Width, Height, Percent and Resample in Image Size, linked in proportion (#6388) 2026-10-21 11:40:38 +02:00
Marco Arnulfo eabd5c1398 Crop tool: right-click on a pending crop opens its menu: presets, overlays, Cancel and Crop (#6561) 2026-10-21 11:39:53 +02:00
David Mann b68b64ccb5 Merge PR #6160: feat(psd): editable Render smart filters (Clouds, Difference Clouds, Fibers, Lens Flare)
# Conflicts:
#	docs/file-format-parity.md
2026-10-21 11:37:14 +02:00
David Mann 86811ddeee Merge PR #6002: Stroke: keep Overprint (overprint)
# Conflicts:
#	crates/engine/src/layer_style.rs
#	crates/ui-egui/src/layer_style.rs
#	docs/file-format-parity.md
2026-10-21 11:36:58 +02:00
David Mann a492716367 Merge PR #5990: Bevel & Emboss: keep the Gloss Contour's Anti-aliased (antialiasGloss) 2026-10-21 11:29:05 +02:00
David Mann 56931ca511 Merge remote-tracking branch 'origin/main' into feat/auto-219-8-panel-command-check 2026-10-21 11:28:52 +02:00
David Mann 27b8d133d8 Merge PR #4771: Fix mixed-order layered TIFF type geometry and unsafe text fallback 2026-10-21 11:28:23 +02:00
David Mann 4cfb576ee0 Merge PR #4496: .atn: a pinned corpus of real action sets, with byte-exact and load/save/reload tests (#219) 2026-10-21 11:28:19 +02:00
David MannandClaude Opus 5.5 093945cb82 Merge #3567's current head (feat/2966-snapshot-dialog) into feat/history-snapshot-options
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:28:04 +02:00
David MannandClaude Opus 5.5 30789f4557 Merge #3535's current head (fix/history-options) into feat/history-snapshot-options
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:27:54 +02:00
paulou-jpgandClaude Opus 5.5 b1a939f265 Mode dropdowns for Clone Stamp, Pattern Stamp, History Brush, Healing and Paint Bucket
Photoshop gives these painting tools a Mode in the options bar; here they
always painted in Normal.

- Clone Stamp, Pattern Stamp and History Brush offer the layer modes, and
  Healing its own list (Normal, Multiply, Screen, Darken, Lighten, Color,
  Luminosity). The mode is kept in each tool's own brush, like its size,
  and reaches the live stroke and the commit.
- Paint Bucket: paint.bucket takes "mode" (any blend mode, or "clear" to
  erase the filled area). algo's bucket fill gains a FillMode for it. The
  options bar's Mode has Clear after Dissolve, as the Brush's does.
- A tool's first brush now starts in Normal instead of inheriting the
  previous tool's mode, so a Multiply Brush no longer makes the first
  Clone Stamp stroke multiply.
- The Shift+Alt letter and Shift+Plus/Minus mode keys reach these tools,
  within each tool's menu. Tools with no blend mode (the Erasers, Mixer
  Brush, Dodge, Burn, Sponge) now pass the keys to the selected layers.

Not yet: Healing's Replace mode, and a Mode for Spot Healing, Color
Replacement, Blur, Sharpen and Smudge (they ignore the keys meanwhile).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 01:23:22 -07:00
paulou-jpgandClaude Opus 5.5 5430f29e21 Blend mode and number keys work while a transform or warp is open
With a Free Transform box, Puppet Warp or Perspective Warp open, Shift+Alt
letters, Shift+Plus/Minus and the number keys go where the active tool sends
them (the Brush's mode and opacity with the Brush, the layer's with the Move
tool) and never close the box. Puppet and Perspective Warp no longer swallow
those keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 01:22:29 -07:00
paulou-jpgandClaude Opus 5.5 909c034686 Blend mode keys: Shift+Alt+letter picks a mode, as in Photoshop
Shift+Alt plus Photoshop's letter (N Normal, M Multiply, S Screen, O Overlay,
R Clear, P Pass Through...) sets the blend mode. With the Brush, Pencil or
Gradient it sets that tool's mode and never the layer's; with a non-painting
tool it sets every selected layer in one undo step. Pass Through applies to
groups only, Clear to Brush and Pencil only, and the Background is skipped.
The typed letter wins, so German Z is still Pin Light; the physical key is
the fallback for the characters Option types on a Mac.

Shift+Plus/Minus now also step every selected layer, and Brush/Pencil
cycling includes Clear after Dissolve, as in the options-bar dropdown.

Fixes Shift+Alt+tool letter switching tools: the tool-letter loop's
consume_key ignores extra modifiers, so blend_keys now runs before it.

Not yet: Behind (Shift+Alt+Q does nothing), and the painting tools without
an options-bar Mode (Clone Stamp, Healing, Paint Bucket...) ignore the keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 01:22:29 -07:00
David Mann f6f93838d8 Merge main into fix/history-options 2026-10-21 09:51:06 +02:00
David Mann 2027e85a44 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/scorecard.md
2026-10-21 09:35:08 +02:00
VishnuByrraju a8b7d2bbca docs(parity): Crop rows in ui-parity.md match the code and the scorecard (#6562) 2026-10-21 12:27:12 +05:30
Higgs32584andClaude Opus 5.5 020784da62 PSD: type on a path opens on its path and saves back into the file's Txt2 (#7962)
Photoshop keeps a path-text layer's path only in its Txt2 frame (EngineData
calls it a text box the size of the path's bounds), so it opened as
paragraph text. The frame (kind /2 /0 = 2) holds the path as a flat list of
cubic segments at /1 /0, mapped to the TySh text space by /2 /2.
apply_txt2_path reads it into TextShape::Path (a closed path starting at its
last anchor, as Photoshop sets it); malformed or hostile frames keep the
box/point shape with an import warning.

build_txt2 writes a path layer's path into its object's frame (Photoshop's
own frame left byte for byte when the path is unchanged; flip and a moved
start written into the path), and a layer taken off its path loses its path
frame. A new document still saves path text as point text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 02:32:12 -04:00
jonathanwxh-cell c5e25bba8f Merge current main and validate document activation replies 2026-10-21 14:12:39 +08:00
VishnuByrraju 6b99ac877c fix(automation): doc.replaceSmartObject replaces Smart Object contents from the read root (#8061)
layer.smartObjects.replaceContents takes an ambient path and is refused in
serve/mcp. Add the capability-scoped sibling of doc.place: the file is read
beneath --automation-read-root and handed to the command's own core, as an
RPC method (doc.replaceSmartObject) and an MCP tool (doc_replace_smart_object).
2026-10-21 11:04:23 +05:30
aiongg b1e408d28f Merge the smart-filter track (#7066 #6398 #6397 #6297 #6299 #6301 #6303 #6315 #6305 #6317)
# Conflicts:
#	docs/file-format-parity.md
2026-10-21 05:04:04 +00:00