A pattern past the per-call budget is converted under one lock and shared while in use, with a one-time warning, and the desktop budget keeps every pattern a call uses (1 GiB). The web build caps a pattern's working copy at 128 MiB and a call at 256 MiB, and the pattern readers reserve their memory fallibly on every target. The legacy text restyle writes and compares BaselineShift, FontCaps, FontBaseline, UnderlinePosition, StrikethroughPosition and the ligatures per run, keeps an automatic leading's own value, and import reads the legacy AutoKern; a corpus test edits the size in psd-tools' text.psd and checks the rest of the legacy object is unchanged.
layer.new.artboardFromLayers takes width and height: the board gets
that size from the layers' top left (0 or none keeps their bounds), and
Layer > New > Artboard from Layers... opens a dialog with Name,
Background, Color, Width and Height instead of running at once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A box drawn over the untouched default frame, or that frame resized by a handle, kept
`default_frame` set when another tool's key ended the drag, so leaving dropped the edit
instead of committing it. The release logic is now one function both paths run.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Multiply BevelTexture::scale by the effects factor in scale_effects, as
Pattern Overlay's and a pattern Stroke's scale already are.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scale_effects scaled Pattern Overlay's and a pattern Stroke's scale but left
Bevel & Emboss › Texture at its old size, so a texture aligned with the
overlay drifted after Scale Effects, Image Size or Crop W x H.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 <noreply@anthropic.com>
An Angle gradient sweeps clockwise from its angle, so a mirror turns the sweep
anticlockwise: map_fill mirrored the angle and the centre offset but left
Reverse alone, and Flip Canvas showed the fill mirrored about the other axis.
Toggle Reverse for Angle gradients under any map with a negative determinant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layerless exporters took a plain limit and always ran fit_psd_size, so
an export with size_limit_psb off could still be promoted to PSB by size.
They now take an optional limit, None when the option is off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Synthetic keys from the control channel carry their modifiers on the event
only; the frame's modifier state doesn't see them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workers that missed the shared-tile memo at the same time each built
and kept a copy, so the number of copies grew with the thread count and
translated_shares_tiles_rebuilt_from_shared_sources failed on machines
with 16 or more threads. Each worker now takes the tile stored first.
egui's consume_key ignores an extra Shift, so the Crop tool's plain H/P/I
checks also took Shift+H/P/I before the tool-switch loop saw them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tool key pressed while dragging the crop frame left crop.drag set when
the new tool's handler takes every event before the Crop tool's (Perspective
Crop, Ruler, Slice, Frame, Artboard), so the frame was neither committed on
leave nor cancelled. tool_event now ends the gesture before any handler runs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Align measures shape extents at the document's own sample type, a render keeps two of the largest patterns converted per call instead of rebuilding the second for every tile, a pattern too large to paint is named by every command that would use it, by pattern.list and by a PSD open warning, and a style-only edit restyles the older Photoshop's legacy text objects too, checked against the real psd-tools text.psd.
image.crop's target size, Image Size and Bitmap's Output resolution budgeted
only the new canvas, but resample_doc scales every surface's whole content,
including the pixels a non-deleting crop kept outside the canvas. A 20 px
frame of a 2000 px image resampled to 2000 px tried to allocate 160 GB.
resample_doc now refuses, before touching the document, when the largest
surface it scales would pass the budget (at that surface's own bytes per
pixel). A failed compound (the turned crop) also rolls back the painting
symmetry its rotation moved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In default mode a turned crop frame turns its document's view. When
another document became active, cancel_stale's cancel turned only the
newly active view upright, so the old document kept the crop's turn
with no crop on it. Turn the crop document's own view upright first.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit (discussion_r4368613885): the reveal pass used scroll_to_me,
which starts egui's default scroll animation, so a deep current family
stayed outside the popup for a moment after the menu opened. The reveal
now jumps (ScrollAnimation::none()); arrow steps keep the animation.
Test: open_menu_shows_the_current_family_without_animating turns a slow
scroll animation back on in the harness, which otherwise disables it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Response::hovered is false while the primary button is down, so a
press-drag through a menu never moved the highlight and it desynced
from the cursor. Hit-test with contains_pointer, which keeps answering
while a button is held.
Closes#8887
Co-authored-by: bfenty <1398236+bfenty@users.noreply.github.com>
egui queues focus navigation before the type tool consumes Tab. Removing the
key event leaves that navigation queued, allowing menu focus to block later
Tabs and ordinary text input. Cancel the queued move when inserting a tab.
Add a full-app input regression that fails on the second Tab before the fix
and verifies three Tab presses, caret positions, and subsequent typing.
The filter-type dropdown gains Smart Object, with three toggles: smart
objects linked to a file, linked to a file that was not there when the
app last looked, and embedded. Like the Kind toggles, the filter applies
once a toggle is on, and the panel lists the smart objects that match any
toggle that is on.
The two-second look at linked files now also records which files were
not there, and Session::missing_links returns them for the active
document. ui.set {layerFilter} takes by: "smartObject" and a smart list.
The first comment claimed the check covers the Lab re-type, which happens later
in `write_image`. Say instead what the check actually adds: the planes are
validated in the sample type they now hold after `converted`, and a plane that
`Image::convert` took but could not rebuild arrives here empty rather than
retyped.
The open font menu marked the current family's alphabetical copy, even
when it also headed the recent group, and opened scrolled to the top
whatever the family, so the mark could be far out of view. As in
Photoshop, the current family is now marked in the recent group when it
is a recent one, the menu opens showing it (the recent group at the top,
else the family's row at the top of the view), and the arrows walk on
from the marked row. Applies to the options bar and the Character panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The public `ExtraSample` contract is one sample per pixel in the image's sample
type, but the writer only stopped when a requested slice was missing, so an
oversized plane was silently truncated and a short one was dropped mid-image.
`Image::convert` leaves a plane whose length does not match the image alone
(deliberately: importers drop such a plane with a warning), so encoding a Lab
F32 image also reinterpreted a wrong-sized plane at the file's 16 bits.
Check every plane against width * height * sample.bytes(), with checked
arithmetic, at both ends: on the source image before `converted` brings it to
the plan's sample type, and on the image actually written, which the Lab path
re-types. A plane of any other length is a CodecError::Encode naming the plane,
its length and the length the image needs.
Regressions: too long, too short and empty planes at 8 bits, and a 7- or 9-byte
plane for a two-pixel Lab F32 image, which the U16 conversion used to accept.
Return the pattern code to the state before the earlier 8000 x 8000 attempts. A pattern that fits the compositor's 256 MiB cap is expanded as before; a larger 8-bit or 16-bit one is held as straight RGBA8 or RGBA16, exactly its values at 4 or 8 bytes a pixel, so Define Pattern's 8000 x 8000 paints at 8 bits. Define Pattern refuses an area the compositor could not hold with its limit, patterns whose RGBA32F texture passes 256 MiB paint on the CPU, shape bounds for Align keep full alpha precision, Define Pattern judges opacity on the stored samples, and a Halftone Gallery stack with an unknown setting beside its effect list stays verbatim.
Arithmetic-coded frames (SOF9-SOF11) and SOF0/SOF1 frames whose precision
isn't 8 bits go to craft-jpeg; everything else stays on zune-jpeg. 12-bit
files open as 16-bit images. PhotoCraft's own marker scan still supplies
ICC, EXIF, XMP, resolution and Photoshop resources, and damaged or truncated
entropy data adds the Truncated warning. A truncated scan too short for the
frame it declares is refused, as on the zune-jpeg path.
craft-jpeg is pinned to the aiongg fork until it lands on storytold.
Co-authored-by: Michael Higgins <mhiggins217@gmail.com>
The checks parse() runs after clap built their messages from a const
and two format! calls. ServerOptionError holds them as thiserror
variants beside ValueError, each with the clap ErrorKind it reports
as: the PHOTOCRAFT_CONTROL_PORT host:port refusal, bridge roots, and a
token flag without its transport. The output is unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Segmentation: anti-aliasing the full-resolution mask skips runs far from its edge
Select Subject, Object Selection and Select Sky finish with antialias_u8
over the whole full-resolution mask, which read nine neighbours through a
bounds-checked closure for every pixel: 171-185 ms of an 800 ms first
Select Subject on 24 MP (ubuntu-latest, 4 cores). A run of 64 pixels whose
3x3 neighbourhood holds one value has no edge pixel, so it is only compared
now; other runs take the per-pixel rule as before. The output is byte for
byte the same, checked against the per-pixel rule over widths around the run
length, single rows and columns, discs, noise and stripes. Part of #211.
* Segmentation: the mask's anti-aliasing and its test share one per-pixel rule
The 3x3 rule moves into edge_value, which antialias_u8 calls for spans that
are not uniform and the test calls for every pixel, so the test checks only
that skipping never misses an edge pixel instead of keeping a second copy of
the rule. A small case pins the rule's values.
The review round of the #7071 stack, which #9167 merged without
(it took the pre-review heads):
- A bare --help or -h before `--` is help after any parse error, not
only after a missing value: `mcp stray.psd --help` and
`serve --port abc --port 1 -h` print the subcommand's help.
- mcp and serve --help carry #8035's rules: what the automation roots
grant, that bridge roots are refused, and that the token flags need
--bridge or --port (or PHOTOCRAFT_CONTROL_PORT).
- check_server takes the subcommand and whether a transport is set;
the bridge-roots check moves next to the other mcp checks.
- The server tests match clap's "a value is required for" text, and
mcp.md in the book and docs names PHOTOCRAFT_CONTROL_PORT.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The GPU path keeps its RGBA32F pattern textures and shader, and declines a pattern whose texture would pass 256 MiB so the CPU compositor, which holds an 8-bit pattern at 4 bytes a pixel, paints it. Add tests for the fallback, the pattern id staying the same when read in bands, and the paintable limits.
- The hung center/right arms add kern_align back: their slack already
deducts the line's kerning (each mark's trim carries the kern that
moved it), so base's shift applied the kerning twice and parked hung
lines left of centre on lines with manual/tab/optical kerning
(hanging_centers_a_kerned_line_exactly).
- The justify-all slack is the drawn width once: extra already carries
the horizontal-scale growth, so scaling adv counted it twice and left
a 150% last line short of the box edge
(justify_all_spreads_to_the_edge_exactly).
Define Pattern accepts 8-bit patterns up to 8000 x 8000: an 8-bit pattern is held at 4 bytes a pixel by the compositor and the GPU, read in bands, and what is paintable follows the working-copy bytes. Shape bounds for Align keep full alpha precision, Define Pattern judges opacity on the stored samples, and a Halftone Gallery stack with an unknown setting beside its effect list stays verbatim.
The Windows integration job aborted in photocraft-gpu::it
parity::fills_and_dissolve on the runner's software Dx12 driver; this PR
doesn't touch the GPU crate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>