Commit Graph
6191 Commits
Author SHA1 Message Date
David MannandClaude Opus 5.5 14693eb085 Integration: merge main 528491f9a, resolve conflicts
- crates/engine/src/edit_cmds.rs: copy_mask keeps #3297's filter-mask target and takes main's
  clipboard `source` (#8945).
- crates/cms/src/lutfile.rs: #9183's shaper doc comment next to main's UTF-16 decode_text (#9129).
- contributors/people.toml, docs: unions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:26:06 +01:00
David Mann ff479a2c01 Merge PR #9139: Rebuild the Histogram panel
# Conflicts:
#	crates/ui-egui/src/control.rs
#	docs/scorecard.md
#	docs/ui-parity.md
2026-10-25 16:11:31 +01:00
a87d9cb637 Integration: Histogram panel review fixes (#9139)
- Cache Levels 1 in Preferences turned off the 250 ms recount throttle,
  because "forced" was derived from max_level == 1: only an Uncached
  Refresh skips it now.
- The proxy factor became 2^(level-1) for every count, so the Levels,
  Curves and Threshold dialogs counted a 6000x3000 image on an 8x proxy
  instead of main's 7x (a 36 MP one 16x instead of 9x). Uncapped counts
  use main's factor again; only a Cache Levels cap halves by powers of two.
- The panel opens in Compact View, as in Photoshop, and Compact View
  counts the entire image whatever Source Expanded View was left at.
- The clipping corner marks are gone: Photoshop's Histogram panel has none.
- ui.inspect: "preview" counts only the active document's preview, and
  "current" compares the source and cache level too, not only the
  revision (a Source change left it true until the recount landed).
- ui-parity row lists two more differences (selection, Selected Layer
  with a dialog preview); cargo fmt.

Co-authored-by: mathildalabs <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:08:36 +01:00
David Mann ef98aa507a Merge PR #3281: Vanishing Point: tear off planes and clone in perspective (#3280) 2026-10-25 15:57:43 +01:00
David MannandClaude Opus 5.5 b367a6118f Integration: snapshot 0 has a source cell, one Czech "New Snapshot" (#3567)
With #3567 the opening snapshot row gets the History Brush source column too, so the panel
test clicks the second snapshot cell. #3567 and main both added a Czech "New Snapshot";
main's translation pass ("Vytvořit snímek") stays.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-25 15:52:03 +01:00
David MannandClaude Opus 5.5 5a9a8ff9e8 Integration: History Brush source tests take snapshot 0 as the opening snapshot (#3567)
#3567 makes the document as opened snapshot 0, so {"snapshot": 0} is a valid source now;
main's bad-params test still listed it as an error.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-25 15:52:03 +01:00
David MannandClaude Opus 5.5 53e118bec5 Integration: scorecard summary counts File compatibility rows again (#3297)
The summary row still said 9/13/5 after an earlier batch PR moved FILE-215-11 to partial,
and #3297 moves FILE-215-3 to done: scorecard/file_compat.toml now counts 10 done,
14 partial, 3 missing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 15:46:30 +01:00
David Mann 7b79f70787 Merge PR #3297: Smart Filters: paint the filter mask directly, with undo (#3290)
Merged with our fix-up pr-3297-fixup (1de1e9eb58) on top of the author's head 053e1e0d03.
Conflicts resolved: channel_cmds.rs routed() keeps the PR's PAINT_IDS list plus the batch's
paint.artHistoryBrush; paint_cmds.rs Paint Bucket params keep the batch's "mode" and the PR's
"filterMask" target; docs/scorecard.md takes the batch's numbers with FILE-215-3 done.
2026-10-25 15:42:51 +01:00
528491f9ac Contributors: add my name (erenova) (#9369)
* contributors: credit VoiceLessQ by display name

* Contributors: add my name (erenova)

Help › About › Contributors shows me as "Erenova" when the display-name view
is picked. The name is fixed rather than synced from my GitHub profile; no
real name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: VoiceLessQ <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Brandon Thomas <[email protected]>
2026-10-25 10:33:30 -04:00
VoiceLessQandBrandon Thomas ee7178b2b3 contributors: credit VoiceLessQ by display name (#9264)
Co-authored-by: Brandon Thomas <[email protected]>
2026-10-25 10:32:11 -04:00
ad14fa6a45 fix(ui): Properties Transform shows a shape's path, not its stroke (#9181)
* fix(ui): Properties Transform shows a shape's path, not its stroke

For a shape layer, Properties › Transform showed the pixel bounds, so a
400 × 300 rectangle with a 15 px stroke read W 416, H 316, X 192, Y 142,
and typing a width scaled those bounds rather than the path. As in
Photoshop, the fields now show and edit the path's geometry (W 400,
H 300, X 200, Y 150); pixel and other layers are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Properties: a shape's W/H takes edits under half a pixel

CodeRabbit finding on #9181 ("Apply fractional W/H edits below 0.5 px"): the
W/H field and transform_params ignored changes under 0.5 px, so a 400.25 px
path typed as 400 kept its old width, though the fields now show and scale
the path exactly. For a shape the threshold is half the field's last shown
decimal (focusing and leaving the field, which re-reads its rounded text,
still changes nothing); pixel layers keep half a pixel. New test:
a_shape_path_takes_a_width_edit_under_half_a_pixel (the edit is dropped
without the fix).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Brandon Thomas <[email protected]>
2026-10-25 10:32:04 -04:00
berceandBrandon Thomas 05c75fe855 fix(cms): read UTF-16 LUT files by their byte-order mark (#9129)
A UTF-16 .look that Photoshop loads was read as UTF-8 and failed with "no <size> in .look", in Color Lookup and in PSD import. Decode FF FE / FE FF as UTF-16 before picking the format.

Fixes #9118

Co-authored-by: Brandon Thomas <[email protected]>
2026-10-25 10:31:58 -04:00
eb4494b915 Integration: VP preview keyed to its document, OK paints the session's layer (#3281)
Vanishing Point is not modal, so the Layers panel and menu commands stay
usable while it is open. The stamp preview kept painting over the document
as it was when the mode opened, and OK painted whichever layer was active
by then: stamp on layer 1, click layer 2, and the canvas still showed
layer 1 while OK cloned onto layer 2 (a filter run meanwhile was hidden).
filter.vanishingPoint now takes an optional `layer` (the UI passes the
session's when another layer was picked, so recorded actions stay
portable) and makes the painted layer active, so Fade and a colour-channel
target follow it. The preview repaints over the document as it is now when
its pixels change (the canvas syncs it before drawing, so no frame goes
without the strokes); a selection or view change keeps it as it is.

display_doc's VP branch is also keyed to the session's document, as main's
Puppet and Perspective Warp branches are (#5115): a document opened in the
same frame no longer shows the other document's strokes.

Co-authored-by: Valentin Klein <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 15:29:02 +01:00
1de1e9eb58 Integration: keep the filter mask target to commands that edit it (#3297)
Redone on the PR head 053e1e0d0 (the author's main merge); the earlier
fix-up f7af09d0f carried the first six points.

With a smart object's filter mask targeted, every routed command got
"target":"filterMask" and the filter-mask precondition instead of its own:

- Cmd+T and Edit > Transform > Flip/Rotate failed ("can't transform a
  filter mask on its own"); now the smart object transforms, as in
  Photoshop (lone_target -> Ok(None), and transforms get no target).
- Move (layer.translate) re-rendered the whole filter stack on every
  nudge, and failed for contents that can't render.
- Convert for Smart Filters became enabled and nested the smart object;
  Apply Image, Last Filter, Liquify, the lens filters, Vanishing Point,
  the render filters and Desaturate ignore the target.
  `follows_filter_mask` now leaves these out, in the shell, in
  inject_target, in the precondition and in the re-render hook; Paste
  keeps its own precondition.
- With the filter mask shown (Alt-click), clicking the layer, layer-mask
  or vector-mask thumbnail (or ui.set maskTarget/vectorMaskTarget/
  filterMaskTarget:false) left the view on (and ui.set maskTarget:false
  left the filter mask targeted), so strokes kept landing in
  the filter mask; those now end the view (CodeRabbit, panels.rs).
- ui.set filterMaskTarget:true on a layer without smart filters, or with
  a single channel targeted, cleared the mask target and answered ok; it
  is now refused before anything changes (CodeRabbit, control.rs).
- Curves on a targeted filter mask showed colour channels and the smart
  object's histogram; it is now a gray plane with the mask's histogram
  (GraySurface::FilterMask).

New on this head:

- Filters with a parameter schema (Gaussian Blur, High Pass, ...)
  refused "target":"filterMask" ("`target` must be pixels, mask,
  quickMask or {channel}"), so blurring the filter mask, the usual way to
  feather it, failed from the menu, the dialog and agents. The filter
  validation now accepts it (blurring_the_filter_mask_feathers_it).
- Delete with a selection and the filter mask targeted ran Edit > Clear
  on the smart object ("not a pixel layer"); it now fills the filter mask
  with the background colour there, as Photoshop does. With no selection
  Photoshop deletes the layer, which Delete already did
  (delete_with_the_filter_mask_targeted_edits_the_filter_mask).
- docs/control-protocol.md: the ui.set line lost its closing parenthesis
  in the main merge.

Co-authored-by: Valentin Klein <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 15:21:05 +01:00
.CooCoo 09dc629b42 Codecs: save Amiga IFF (.iff) as 24-bit ILBM (#9080)
Photoshop reads and writes IFF; PhotoCraft opened Amiga IFF/ILBM files
but had no writer. Saving as .iff now writes a FORM ILBM with a BMHD and
a ByteRun1-compressed BODY of 24 bitplanes (red, green and blue, least
significant bit first), one plane row at a time. An image with alpha
also gets a mask plane (masking 1): alpha of 128 or more is opaque, and
when any pixel is not fully opaque the export warns that alpha is
reduced to on/off transparency. Gray is expanded to RGB, 16-bit and
float images are reduced to 8 bits, and images wider or taller than
65535 pixels are refused.

The reader also opens 24-bitplane ILBMs, so a saved file reopens with
the same pixels. A transparent color index in a 24-bitplane file is
refused as unsupported.

IFF leaves ASYMMETRIC_EXCEPTIONS, Save As offers Amiga IFF, and the
codecs README, file-format parity and G10 are updated.
2026-10-25 10:20:09 -04:00
Hector VillarrealandClaude Opus 5.5 11334297a5 fix(ui): Save for Web reopens on the preview tab chosen last (#9174) (#9178)
The dialog always opened on 2-Up. It now remembers the Original /
Optimized / 2-Up / 4-Up tab last chosen (in the UI state, so across
restarts too) and reopens on it; 2-Up stays the first-time default.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:20:03 -04:00
Hector VillarrealandClaude Opus 5.5 d18922e5e3 Channels panel: drag alpha channels to reorder them (#9163) (#9168)
Photoshop reorders alpha and spot channels when one is dragged up or down
the Channels panel: a line shows where it lands, a drop over the colour
channels puts it first among the alphas, and colour channels don't move.
PhotoCraft only took channel drops on the footer buttons. Dragging an
alpha row over the other rows now marks the slot and runs channel.move
on release, one history step; colour channels still don't reorder.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:19:57 -04:00
Andee CollardandClaude Opus 5.5 2b61c29242 Filter Gallery: ⌘+ / ⌘− / ⌘0 / ⌘1 zoom the preview, stepping like Liquify's (#9107)
* Filter Gallery: ⌘+ / ⌘− / ⌘0 / ⌘1 zoom the preview

While the Filter Gallery was open the canvas zoom shortcuts did nothing.
They now step the gallery preview through the same steps as its zoom
bar's − / + buttons (Fit, 12.5 %–400 %); ⌘0 is Fit in View and ⌘1 is
100 %. The keys come from the canvas's View › Zoom In / Zoom Out / Fit on
Screen / 100 % bindings (with Edit › Keyboard Shortcuts overrides),
through the same `nav_shortcut` Liquify's preview uses (#7210).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Filter Gallery: zoom steps from the fitted zoom along the canvas ladder

Like Liquify's preview: ⌘+ / ⌘− and the zoom bar's − / + now step along
`zoom_levels`' ladder (1 %–3200 %) from the zoom on screen. At Fit in View
they step from the zoom Fit shows, so zooming in from a large image's Fit
no longer jumps down to 12.5 %. The zoom menu shows a zoom off its list
(300 %, say) as itself rather than "—".

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Filter Gallery: Zoom Out from a Fit below 1 % stays at Fit

A huge image can fit the preview below the 1 % minimum; stepping down
clamped that Fit up to 1 % first, so Zoom Out enlarged the preview.
When no smaller supported zoom exists, Zoom Out now keeps Fit in View.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:19:52 -04:00
Gert Pellin - GPE 90ea546695 ora: test that Soft Light exports as svg:soft-light (#8804) (#9028)
Import accepts krita:soft_light_svg as well, so the round trip alone would not
notice an export that switched to it.
2026-10-25 10:19:46 -04:00
NetterSilverandClaude Opus 5.5 92a1559138 Refuse .pcraft manifests with too many JSON values before parsing (#8893)
Fixes #8594

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:19:41 -04:00
skylar taylor-barrick 72e11802d4 Regression tests for eight fixes merged without one (#8690)
* #3763: test that automation refuses edit.installedProfiles

edit.installedProfiles scans the OS and user ICC folders but takes no path
parameter, so the automation policy let it through until it was listed as an
ambient-path command. The test checks every authorize entry point and the
sandboxed Headless session refuse it; without the policy line the first
assertion fails (authorize_engine_command allowed it).

* #4134: test that Liquify undo/redo and brush keys work with a numeric field focused

Ctrl+Z was ignored in Liquify while a slider's text edit had focus, and the
bracket keys could not step a 2 px brush down to 1 px. The tests focus a real
text edit and press Cmd+Z / Cmd+Shift+Z and the bracket keys. Without the fix
Cmd+Z leaves the stroke in place and '[' gives 1.8 instead of 1.0.

* #119: test that Layers panel thumbnails are released with their layer or document

Thumbnail textures of deleted layers and closed documents were kept for the
session. The test deletes a layer and then closes the document and checks the
thumbnail cache. Without prune_thumbs the deleted layer's thumbnail is still
cached.

* #2241: test that Quick Mask and Screen Mode follow the two-column toolbar

The two buttons stayed stacked when the toolbar was widened to two columns.
The test checks they are stacked in one column and share a row once the header
chevron switches to two columns, in three themes. Without the layout the
second assertion fails (the buttons sit on different rows).

* #3425: test that the options bar draws a single full-width border

The options bar drew its own top and bottom separator on top of the panel's
border, doubling the lines. The test renders the bar in three themes and counts
full-width separator-coloured horizontal lines. Without the fix there are three.

* #4139: test that the Free Transform rotate zone draws the turn arrow

The rotate zone hides the OS pointer, so the canvas must draw the curved arrow
itself where the box has no preview overlay. The test hovers just outside a
corner of a box without a preview and checks the pointer is hidden and the
arrow arc is painted. Without the canvas draw call no arrow is painted.

* #4630: test that the scrollbar thumb stays visible under the pointer

The stock thin scroll bar fades its handle to the track's opacity while the
pointer is on it, so the thumb vanished. The test checks every theme's floating
scroll style keeps the handle opaque and more opaque than the track. Without
the override both are 0.6.

* #2209: test that Make/Reset Default buttons wrap with long labels

In languages with long labels (Russian) the two buttons overflowed the page
column in a non-wrapping row. The test draws the page in Russian and checks the
second button wraps to its own right-aligned row. Without main-axis wrap both
sit on one row and run left over the effect list.

* #3425: require exactly one options-bar border

The test allowed zero borders, so it would pass if the options bar lost its border altogether. It now requires exactly one, the panel's, in every theme; with the options bar's own separators restored it still fails (three lines).
2026-10-25 10:19:36 -04:00
JGF d6825a2bc1 Fix layout benchmark setup for preserved Smart Objects (#8664) 2026-10-25 10:19:30 -04:00
David Mann bb39b4a8dd Revert "Merge PR #1199: Add optional local models for subject matting and object selection"
This reverts commit 5f2a7b9903, reversing
changes made to 9ef4c0a487.
2026-10-25 15:19:27 +01:00
05246233b6 Kept composites follow the text gamma and free their memory; GPU timing survives an OOM retry (#8520, #8521) (#8522)
* Background redraw: key kept composites on the text gamma, trim them every frame (#8520)

Two gaps in the kept background redraws:

- Color Settings > "Blend Text Colors Using Gamma" is an application
  setting that type layers composite with, but it wasn't part of the key.
  After toggling it, going back to a kept state (an Alt-click solo and
  again, undo/redo) uploaded type edges drawn with the old gamma. The key
  now holds the gamma, and a redraw that ran while the gamma changed
  (even if changed back, and also while another document was shown)
  isn't kept. Every running redraw is checked every frame; two changes
  within one frame aren't seen.
- Kept composites were trimmed only when the next deferred redraw
  started. A state History dropped (or purged) kept its texels, and
  lowering Memory Usage or a small edit that grew a kept document didn't
  release them. Each frame now drops dead entries, and the cap is taken
  again when Memory Usage or the revision of any kept document changes.

Tests (each fails without its part of the fix):
a_state_drawn_before_the_text_gamma_changed_is_composited_again,
a_redraw_across_a_text_gamma_change_is_not_kept,
a_redraw_across_a_text_gamma_change_and_back_is_not_kept,
a_hidden_documents_redraw_across_a_text_gamma_change_and_back_is_not_kept,
kept_composites_go_when_memory_usage_drops_between_redraws,
kept_composites_go_when_a_small_edit_grows_the_document_past_the_cap,
an_older_kept_composite_goes_when_its_document_grows_past_the_cap,
a_kept_state_history_purged_goes_at_the_next_frame.

Co-authored-by: Michael Higgins <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* GPU compositor: test the layer page out-of-memory paths, keep GPU timing after one (#8521)

The PR's tests passed with its fix reverted: main's after-cell evict()
already meets every assert of the zero-budget test, so the out-of-memory
fallback had no test. A test hook (Compositor::fail_layer_allocs) now makes
the next n page textures fail as out of memory, and a parity test covers
the in-place retry, the submit-and-retry, the CPU fallback with a healthy
device, and the next refresh back on the GPU. Each of those fails when its
part of the fix is removed.

A retry that failed after its submit also switched GPU timing off for the
rest of the session: the submit marks the measurement flushed, and
cancelling a flushed measurement stops timing for good. The retry waits
for the GPU, so it now clears that mark (GpuTimer::drained);
an_out_of_memory_refresh_does_not_stop_gpu_timing fails without it.

Co-authored-by: Michael Higgins <[email protected]>
Co-authored-by: FredApps <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address CodeRabbit review: serialise the OOM timing test with GPU_LOCK

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Michael Higgins <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
2026-10-25 10:19:25 -04:00
Justin John ab2508d6af fix(atn): preserve unsupported event kinds (#8509)
* fix(atn): preserve unsupported event kinds

* fix(atn): reject invalid event kind metadata
2026-10-25 10:19:19 -04:00
David MannandClaude Opus 5.5 121a2407ff Engine: assets_dir's doc comment back on assets_dir (#9390) (#9391)
has_pixels was inserted between assets_dir's doc line and the function,
so rustdoc attached both lines to has_pixels.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:19:13 -04:00
David MannandClaude Opus 5.5 ab54aee120 Plug-ins: refuse a manifest that declares a parameter twice (#9441) (#9442)
* Plug-ins: refuse a manifest that declares a parameter twice (#9441)

`ordered_params` kept every entry of the `params` object, so a repeated
key gave one value two dialog controls and the last spec won in
`resolve_params`. Refuse the repeated key with an error naming it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Plug-ins: quote the repeated parameter name in the error (#9441)

The duplicate check runs before validate() checks the name, so a key
with control or bidi characters must not reach the message unescaped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address CodeRabbit review: a repeated parameter is named before its spec is read

The key was checked after next_entry had parsed the value and after the
64-parameter limit, so a repeated key with a broken second spec, or one
past the limit, reported that error instead of naming the key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:19:07 -04:00
David Mann 6ab5c07751 Revert "Integration: Preferences › Integrations shows the local model rows only where models run (#1199, #4097)"
This reverts commit e8894aa9f9.
2026-10-25 15:19:02 +01:00
David MannandClaude Opus 5.5 2c4982f2d2 Export Data Sets as Files keeps outputs in the chosen folder (#9420) (#9422)
* Export Data Sets as Files keeps outputs in the chosen folder (#9420)

{document} was the document name verbatim, so a document named
../esc/aped.psd wrote outside the chosen folder; separators and reserved
characters in it now become _. A data set named after a Windows device
(nul, CON) gets the same _ every other exporter gives it (nul_.png).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Export Data Sets as Files: a document stem of . or .. becomes _ (#9420)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address CodeRabbit review: data-set names check every folder, an empty stem is _

A device-named document under `{document}/{name}` made a `nul` folder,
since the device check saw the whole path; it now checks each component.
A document named `.` has an empty stem and gave `.png`; it becomes `_`
like `.` and `..`. The test uses a temp dir that cleans itself up.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:19:01 -04:00
David MannandClaude Opus 5.5 fb1d95902d SVG: text reads each font file once instead of once per glyph (#9406) (#9407)
* SVG: text reads each font file once instead of once per glyph (#9406)

fontdb re-reads a file source's whole font for every glyph usvg outlines,
about a millisecond a character with the system fonts. The import's font
resolver now loads each chosen face's file once per process (capped at
256 MB) and hands usvg the bytes from memory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* SVG: a font collection moved into memory keeps its face order (#9406)

fontdb reuses freed slots last-first, so removing a .ttc's faces in order
and loading them again reversed them, and the glyph fallback of a later
text found a different face (MS PGothic instead of MS Gothic).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address CodeRabbit review: font cache checks size first, validates before swapping

A font file past the cache budget is no longer read (and dropped) on
every lookup: its size is checked first. Read bytes must load the face
before they're cached or the file's on-disk faces are removed, so a file
replaced or cut short since indexing keeps its faces and isn't remembered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address CodeRabbit review: font cache misses are single-flight

Two imports missing the cache for the same file at once both read it,
and the later one kept setting its text from its own copy. A miss now
holds a loading lock and looks again once it has it, so the second
import takes the first one's bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:54 -04:00
David MannandClaude Opus 5.5 00d0deaeac Reveal All: ignore erased, fully transparent pixels (#9379) (#9380)
* Reveal All: ignore erased, fully transparent pixels (#9379)

The Eraser only clears alpha, so an erased pixel keeps its colour bytes
and Surface::content_bounds counted it: Reveal All (and the Crop tool's
beyond-canvas preview) grew the canvas to pixels nothing shows. Count
only pixels with alpha > 0 outside the canvas, as Photoshop's layer
bounds do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Reveal All: scan only off-canvas pixels, in parallel (#9379)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:48 -04:00
David MannandClaude Opus 5.5 8eef287408 Tests: the smart filter stack-cache test runs in its own binary (#9376) (#9377)
an_ambient_map_or_lut_never_renders_unfiltered_pixels_into_the_stack_cache
compares the process-wide stack_cache_bytes() before and after a denied
render. In the shared tests/it binary other tests render smart objects in
parallel and change that counter, so the test failed about 1 run in 20.
It now runs in its own process, like engine smart_filter_stages and
mask_cache_purge; the fixture moves to tests/support and is shared by
both binaries.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:43 -04:00
Hector VillarrealandClaude Opus 5.5 a73b1e1d27 feat(ui): Browse… for the source and destination folders of Image Processor and Batch (#9357) (#9360)
Image Processor, Batch, Lens Correction, Contact Sheet and Create
Droplet took their source and destination folders as typed paths only.
Photoshop picks them with Select Folder… / Choose… buttons.

Their `input` and `output` fields now get the same Browse… folder
picker the `dir` fields of the export dialogs have (#7942).

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:37 -04:00
DuBearteandClaude Opus 5.5 28e5efa888 Paste: centre pixels copied from another document (#8945) (#9353)
Paste kept clipboard pixels where they were whenever that spot lay on
the canvas, whichever document they came from: a whole small document
copied into a larger one landed in its top-left corner. The clipboard
now remembers its source document; Paste keeps pixels in place only
there and centres them in any other, as it already did for pixels that
don't fit. Images from other apps have no source and centre too. Paste
in Place is unchanged.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:30 -04:00
Hector VillarrealandClaude Opus 5.5 284f569264 fix(engine): defined and imported patterns survive a restart (#9317) (#9318)
* fix(engine): defined and imported patterns survive a restart (#9317)

The pattern library lived only in memory: patterns defined with Edit >
Define Pattern or imported from a .pat file were gone after a restart,
while their Patterns panel folders (saved with the preferences) still
named them. Photoshop keeps them.

The preset store now writes the user patterns (the library minus the
built-ins, in order) to patterns.pat, Photoshop's own pattern file
format, whenever their ids, names, sizes or order change, and loads
them when the store attaches. Like actions.json, a file that fails to
load is warned about and never overwritten. The web store accepts the
new record.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Patterns: persist same-id pixel replacements, retry a failed removal

CodeRabbit (discussion_r4369506324, r4369506326):
- an imported .pat whose id is already in the library replaces its
  pixels, which the id/name/size key didn't show, so the old pixels came
  back after a restart; PatternLibrary::pixels_rev is bumped on such a
  replacement and is part of the key;
- a failed patterns.pat removal recorded the empty library as saved and
  was never retried, so the deleted pattern came back; it now stays
  pending, as a failed write does.

Tests: a_same_id_pattern_replacement_survives_a_restart,
a_failed_patterns_removal_is_retried.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Patterns: persist replaced built-ins and ASL replacements

CodeRabbit (discussion_r4369536978, r4369536981):
- a .pat import that replaced a built-in pattern by id was filtered out
  as a built-in and never saved; only built-ins exactly as shipped
  (is_pristine_builtin) are skipped now, and on load a saved built-in
  takes the shipped one's place unless it changed before attachment;
- style.presets.importAsl replaced patterns by id without bumping
  pixels_rev; both imports now go through PatternLibrary::upsert.

Tests: an_imported_builtin_replacement_survives_a_restart,
an_asl_pattern_replacement_bumps_pixels_rev.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* .pat: refuse names and counts the reader won't load, on write too

CodeRabbit (review 5641404908, outside-diff, two findings): now that the
preset store writes the user patterns, a file its own loader rejects or
truncates loses patterns at the next start.
- a name of 65,536+ UTF-16 units (with its NUL) was written although the
  reader refuses it; write_pattern refuses it now;
- more than 100,000 patterns were written, and the reader kept the first
  100,000 without a word; both now refuse counts over MAX_PAT_PATTERNS.

Tests: a_name_the_reader_refuses_is_refused_on_write,
more_patterns_than_a_pat_file_holds_are_refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Patterns: an early same-id import with other pixels is saved

CodeRabbit (review 5641454449, outside-diff, preset_store.rs:1191-1202):
a pattern imported before the store finished loading, with the id, name
and size of a saved one but other pixels, was appended (no pixels_rev
bump), won the merge, and then matched the loaded file's key, so it was
never written and a restart brought the old pixels back. The merge now
bumps pixels_rev when the copy it keeps differs from the saved one.

Test: an_early_same_id_import_wins_and_is_saved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:23 -04:00
DuBearteandClaude Opus 5.5 796a48d80b fix(algo): Dehaze leaves no bright halo beside dark objects (#9273) (#9316)
The transmission came from a minimum filter of the normalised dark
channel, which grows every dark object by its radius: sky beside a dark
building took the building's dark channel, counted as haze-free and kept
its haze. Open it (a maximum filter of the same radius after the
minimum) so dark regions shrink back to their outline, and rescale the
0.95 weight so the slider's overall strength stays the same.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:17 -04:00
David MannandClaude Opus 5.5 6b122c7477 Crop and Straighten Photos processes only the selection (#9297) (#9298)
* Crop and Straighten Photos processes only the selection (#9297)

Like Photoshop, File > Automate > Crop and Straighten Photos only searches
the selected area when there is a selection; before, it always split the
whole scan. The found photos are warped from the full canvas, so a photo
reaching past a tight marquee keeps its real pixels.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address CodeRabbit review: mask unselected pixels before photo detection (#9297)

Pixels inside the selection's bounding box but outside the selection (holes,
gaps between regions) now read as background, so a photo there is not split
off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address CodeRabbit review: refuse a selection with no pixel at least half selected (#9297)

A faint feathered selection left every pixel unmasked, so photos outside
it could still be split off. The command now reports that no pixels are
more than 50% selected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:11 -04:00
David MannandClaude Opus 5.5 466e428b72 Crop: in Full Screen Mode Match Canvas is the black pasteboard (#9294) (#9295)
The Crop Shield's Match Canvas colour fell back to the theme canvas even in
Full Screen Mode, where the document sits on black, so the shield (and the
opaque fill with Show Cropped Area off) was a grey band over the black view.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:05 -04:00
DuBearteandClaude Opus 5.5 e456c9b677 feat: New Document can start as an artboard (#9086) (#9258)
file.new takes "artboard": true: the document is one artboard over the
canvas, its background the chosen Background Contents, holding an empty
Layer 1 and no Background layer. The New Document dialog has an
Artboards box under Orientation that sets it.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:18:00 -04:00
Hector VillarrealandClaude Opus 5.5 e2f92f7190 fix(ui): a swatch click recolours selected type and shapes with any tool (#9238) (#9253)
A swatch recoloured the selected type layers only with a Type tool, and
shape fills only with a shape or Pen tool. Photoshop 2025 recolours both
whatever the tool (measured with the Move and Brush tools); its Color
panel keeps to the tool-based rule, which is unchanged here.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:17:55 -04:00
DuBearteandClaude Opus 5.5 d931929653 fix(ui): Hue/Saturation's spectrum bars stretch with the panel (#9242) (#9250)
The bars were capped at 300 px while the sliders above them fill the
Properties panel; they now take its whole width too.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:17:49 -04:00
David MannandClaude Opus 5.5 100ff983f5 fix(engine): turn a shape's gradient stroke with the canvas (#9239) (#9240)
Image Rotation, rotated Crop, canvas flips and Image Size mapped a shape
layer's gradient fill through map_fill but never its stroke paint, so a
gradient stroke kept its old angle and offset while the fill turned.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:17:44 -04:00
DuBearteandClaude Opus 5.5 6f1705a32b fix(cms): headerless .3dl tables read on at least the 12-bit scale (#9121) (#9215)
A table with no header peaking at 255 or 1023 was scaled to full range,
so white came out 255 where Photoshop gives 16 or 64. Without a header,
the inferred output depth now starts at 12 bits.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:17:39 -04:00
DuBearteandClaude Opus 5.5 7e8386c94c fix(cms): ignore tags inside .look XML comments (#9109) (#9210)
A comment holding <size>/<data> text was read as the LUT, so a commented
inverse .look rendered as identity. Drop comments before finding tags.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:17:34 -04:00
David MannandClaude Opus 5.5 41c8a9e215 Image Rotation › Arbitrary turns unlinked layer masks (#9201) (#9203)
* Image Rotation › Arbitrary turns unlinked layer masks (#9201)

Free Transform's helper moves a pixel mask only when it is linked, so
rotating the whole image (and a turned crop) left unlinked masks of
non-Background layers in place. Warp them too, recursively into groups,
as every other canvas operation does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Tests: the unlinked mask also turns the right way at 90° (#9201)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 10:17:29 -04:00
Den 0b5f658fb7 fix(ui): match CPU grid width to physical pixels (#9199)
Keep CPU grid strokes one device pixel wide at 2x display scale, matching the GPU canvas. Exercise both canvases at both display scales and U8/U16/F32 without changing upstream grid colours.
2026-10-25 10:17:23 -04:00
1e5b5f7617 Package: never overwrite one link's copy with another, list a missing link once (#9185)
* Package: never overwrite one link's copy with another, list a missing link once

Copies whose names collided were renamed to "<count>-<name>" once, without
checking that name too: links a/x.png, b/2-x.png and c/x.png packaged the
third over the second's copy, so two layers showed the same image. The name
now steps until no earlier copy has it, ignoring case as macOS and Windows
folders do. A missing link placed on several layers was listed once per layer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LPBRXWMhtDUsQDdZKmt9eZ

* Contributors: credit softwaregames1 by their GitHub profile name

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LPBRXWMhtDUsQDdZKmt9eZ

* Package: never overwrite a file already in Links

A second package into the same folder picked the same Links/<name> and
replaced the earlier copy. A name taken by a file already there is now
stepped like one taken by another link in this run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LPBRXWMhtDUsQDdZKmt9eZ

* Apply suggestion from @coderabbitai[bot]

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-10-25 10:17:17 -04:00
David Mann 34310d5ba6 Merge PR #8402: Raw: open lossy DNGs (floating-point JPEG XL raw data), and fall back to the JPEG XL preview, not the tiny thumbnail (fixes #8125) 2026-10-25 15:05:48 +01:00
David MannandClaude Opus 5.5 ddb92be1fa Merge PR #9455: raw: develop the default rendering band by band, without the f32 RGB frame
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-25 15:04:31 +01:00
David MannandClaude Opus 5.5 f12be92413 Merge PR #9454: raw: develop_half, a fused half-size preview develop (part of #9433)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-25 15:04:30 +01:00