A one-step setup of frequency separation for retouching: from the active pixel layer it builds a
"Frequency Separation" group right above it with a "Low Frequency" layer (Gaussian Blur at the
chosen radius, the same pixels Filter > Blur > Gaussian Blur makes) and a "High Frequency" layer,
High = (Source - Low) / 2 + 0.5 per colour channel on Linear Light, which composites back to the
source: within one level at 8 bits (as Photoshop's Apply Image recipe), exactly at 16 and 32 bits
for values in 0..1. One history step; the source layer is left as it was and High is targeted.
The command (layer.frequencySeparation, {"radius":0.1..1000=4}) gets the schema dialog for its
radius and sits in Filter > Other after Color to Alpha; it is no filter.* command because it adds
layers rather than filtering the target (no mask or channel routing, Fade or Last Filter). It is
refused on non-pixel and empty layers, a targeted channel or mask, and in CMYK and Lab, where
Linear Light does not rebuild the source.
The pass reran every test in the workspace, but CRAFT_FONTS is only read in photocraft-text,
photocraft-io (svg) and photocraft-ui-egui. The build selection stays the same (the disk warning
above still applies); a nextest filter runs those three packages' tests: ~3,800 of ~8,900.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
cargo test runs the ~258 test binaries one at a time; nextest runs them in parallel. Its new `ci`
profile stops at the first failure (a red PR frees its runner early), fails a test that hangs for
10 minutes instead of letting it hold the runner, and repeats every failure at the end of the log;
the GPU test group still applies. Same --workspace --locked --features heif selection, so the build
is unchanged. Doctests stay on cargo test --doc.
postscript_only_style_shows_actual_subfamily relied on another test in the same process having
started the font scan; under nextest it runs alone, so it starts the scan itself (as #2933 does).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
They take about 1.5 min together but ran after all the test passes, so a clippy failure (15 s)
showed red only 41-48 min into the job. Same steps, reordered: no cost on a green run.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- With Make Layer Visibility Changes Undoable off, Undo, Redo, a History row and
non-linear Delete keep every layer's visibility as the user left it.
- History::rollback takes the last record back exactly (also the later states it
moved in non-linear history); Transform Again on a copy, New Frame from Layers,
the Free Transform take-back and an abandoned Alt-drag copy use it via
Session::rollback. The Alt-drag fold keeps the moved later states.
- Non-linear Delete reaches a later (dimmed) state; the History panel lets those
rows be dragged onto the trash.
- Reword the snapshot-option comments: they come with #3634.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Automatically Create New Snapshot When Saving adds no row when the document
is unchanged since the snapshot the previous save added (and that snapshot
is still there), so Ctrl+S on a clean document doesn't stack duplicates.
The new snapshot's tiles are trimmed against the history budget at once,
and its memory cost is documented: snapshots count against History & Cache
by dropping the oldest states, but are never dropped themselves.
Tests: the engine dedupe, and the desktop save path (a save adds one, Save a
Copy none, a background save finishing on another document snapshots the
document it saved). The purge test from main deletes the first snapshot so
it measures only the snapshot it takes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Edit > Purge > Histories resets a state source to the default instead of
leaving every document without one (History::clear).
- The pinned source state counts against the history byte budget first; the
newest states fill what remains, so trimming stays within max_bytes.
- The History Brush and Fill > History refuse a source of another canvas size
(after Crop, Canvas Size or Image Size) instead of painting shifted pixels.
- Snapshots can be the source: history.setSource {snapshot}, a source column on
snapshot rows, HistorySource::State|Snapshot in the engine; deleting the
snapshot leaves no source, Purge > Histories keeps it.
- paint.historyBrush and Fill > History take History panel rows for `state`
(redo rows included), as history.setSource does, and accept `snapshot`.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Step Backward in the History panel puts a floating selection back like Edit > Undo; Step
Forward and Edit > Redo put it back and step instead of dropping it first (which recorded a
Move and wiped the redo states); with nothing to step to the piece keeps floating.
- Memory figures and the byte budget count the states Clear History keeps for its undo.
- Undoing Clear History keeps a saved document clean.
- New Snapshot... in the panel menu runs history.newSnapshot.
- Tests: Clear on one document leaves the others alone, and each fix above.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The helpers-only use made cargo clippy -p photocraft-io --all-targets
flag is_psd_input as never used; import_stages now calls it for the
extension branch, keeping the magic-first order that lets an Affinity
file renamed .psd stay with the Affinity loader.
Pattern Stamp was the only retouch command that refused a stroke it could not
render. Clone Stamp, Healing Brush, Spot Healing and Remove all reach the same
dense conversion: coverage is accumulated in tiles, but dense_coverage()
materialises the whole bounding box, and the retouch paths read a Region over
that box for every channel. The box comes from the stroke's own points, which
are validated against MAX_COORD rather than the document, so it is not bounded
by the canvas. Both allocations go through the infallible vec!, which aborts
instead of returning an error.
With the guards now shared in retouch_cmds, apply them to the rest:
reject_huge_stroke before anything is rendered, and reject_bounds before the
dense region read where the command can return one. spot_heal_surface returns a
Rect, so Spot Healing charges the stroke in the command; Remove builds a list,
so each stroke is charged as it is parsed.
The allowance is unchanged, so no stroke that worked before starts failing.
Test: every retouch stroke refuses the oversized box, leaves the pixels alone,
and still accepts a stroke across the whole canvas.
- New Snapshot dialog: snapshot_dialog::open returns None while a Free
Transform is open, so the Alt-click (and any other caller) no longer
opens it under the transform box.
- A cleared Name in the dialog now takes the next default snapshot name
instead of failing; the engine still rejects an empty name from agents.
- Snapshot thumbnails remember the snapshot document they show: a
document reopened with the same id, or a refreshed first snapshot,
gets a fresh thumbnail, and closing a document drops its thumbnails
(sync_views). Pruning deleted snapshots runs once per panel draw,
not per row.
- Session::refresh_type_layers also re-renders the type layers of the
first snapshot (the document as opened), so returning to it keeps the
served font.
- Housekeeping: snapshot_rows doc comment, the dialog's select-all uses
field_tab::select_all, and the New Snapshot block no longer splits
the Free Transform comment from its code. cargo fmt also reformats two
test lines in rotate_view.rs and wheel_nav.rs that came in with main.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add three linked Arabic help chapters with a card exercise, 15 tools and
28 terms. Keep current English UI labels for navigation and distinguish
editable projects from exports. Add RTL language wrappers and link the
chapters from the book, repository README and Arabic localization notes.
Validated with mdBook 0.4.52 and 74 local link/anchor checks.
In the desktop app Free Transform commits as a background job. When
another tool or layer was picked, end_if_left committed the box (#1400)
and then, seeing it still open while the job ran, cancelled it as if
the engine had refused the commit. Cancelling the job threw the
transform away: an existing layer went back to where it was, and a
dropped file was taken back, or, after New Layer, kept untransformed
because its place was no longer the latest step (#5667). The tests
commit inline, so they never saw it.
A commit still running now ends the session when it lands. If the
engine refuses it then, the box ends as Esc would, as an inline
refusal already did.
A transformed place folds into its Place Embedded step only when the
place is the step just before the transform. After New Layer, the
place, the new layer and the transform stay three steps, instead of the
new layer being folded into the transform and labelled Place Embedded.
Add 348 original Arabic entries for menus, tools and New Document with
catalog and staging regression tests. Keep Arabic outside LANGUAGES
until bidi, caret and font delivery are verified. Document native font
fallback and remaining validation; no shipped coverage change.
Saved workspaces get dynamic Window › Workspace items after the presets
(window.workspace.saved.<index>), checked while current and selecting
the workspace; the top-bar dropdown lists them after the presets.
Co-authored-by: Cursor <cursoragent@cursor.com>
Image > Mode > Bitmap now opens a dialog laid out like Photoshop's:
Resolution (Input, read-only; Output in pixels/inch or pixels/centimeter),
Method (50% Threshold, Pattern Dither, Diffusion Dither, Halftone Screen,
Custom Pattern) with a pattern picker enabled for Custom Pattern, and the
Halftone Screen settings (Frequency, Angle, Shape) shown only for that method.
The image.mode.bitmap command gains `resolution` (resamples to the Output
resolution keeping the print size, then sets it) and the `customPattern`
method (threshold map ranked from the pattern's lightness, tiled from the
top-left). The halftone screen is laid out at the output resolution. The
live preview keeps the canvas size.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Over existing type that sits on a path, the pointer showed the area or
path-type cursor while the press edited the type layer, because the
hover never asked the hit test pointer_down uses. The hover now goes
through hover_path_target, which shares hit_layer with the press and
keeps Photoshop's plain I-beam there (a shifted press still starts new
type on the path). hit_layer and layout borrow the document instead of
cloning it, since the hover calls them; the type hit only runs once a
path is under the pointer.
A one-anchor subpath is no longer an on-path target (type.attachToPath
rejects it, so the cursor promised type it could not place), and paths
over 4096 anchors are skipped so the per-frame segment hit stays cheap;
pointer and click use the same rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Photoshop Frame is a group whose record carries the frame outline as a
vector mask and its Properties > Stroke as a shape-style `vstk`. We dropped
that `vstk`, so frames lost their stroke. `Group::frame_stroke` now holds it:
read from and written back to PSD (byte-identical while unchanged), saved in
.pcraft, and drawn along the vector mask above the frame's content by the CPU
compositor and the GPU planner.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>