- Convert to Profile: the reference application records `sdwM` -1 for RGB
targets (`convertToProfile T="ProPhoto RGB" Inte=AClr Dthr=true Fltt=false
rasterizePlaced=false sdwM=-1`). The PR accepted only 2, so every recorded
step became a kept step that fails at playback. Accept and write -1.
- Paste: an ordinary Edit > Paste records `AntA Anno` + `As Pxel` (Paste in
Place adds `inPlace true`). `As Pxel` was routed through the explicit vector
mode (no layer recreation, no mask/channel targets) and Paste in Place became
a kept step. `As Pxel` now keeps the ordinary Paste / Paste in Place route.
- Dither: transparent layers stay sparse (only stored tiles are dithered) and
tiles run in parallel. 24 MP 8-bit, one layer: opaque 1576 -> 101 ms;
transparent with one stored tile 1670 -> 5 ms and 384 -> 1 stored tiles.
- Image Size: a recorded step without `scaleStyles` (Fit Image) gained
`scaleStyles false` on save; the key is now written only when styles scale.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three gaps in loading and saving Filter Gallery steps from .atn files:
- An effect recorded under its own event by string ID (event `cutout`
with `GEfk` = `Ct `, the form newer versions write) stayed a kept
Photoshop step: only 4-char codes were routed to the effect table.
The effects' string IDs are now matched too.
- A step recorded as the effect's own event (`AccE` "Accented Edges")
saved back as a `GEfc` "Filter Gallery" event, so load -> save changed
the event and its panel name. The step now remembers the event it was
loaded from (hidden `_atnEvent` param) and writes it back when that
event is the step's own effect; `GEfc` steps, steps made in PhotoCraft
and a stale or forged event naming another effect save as `GEfc`.
Playback strips the param (`playback_params`, like `_actionLayer`), so
the command, the journal (Last Filter), smart filters and the step's
dialog never carry it.
- A key that was present but had the wrong type or a non-finite value
took the default (Texturizer `InvT` as Integer 1 played with invert
off; `EdgW` NaN played as 2). Only missing keys take defaults now; an
unreadable present key keeps the step.
Co-authored-by: hectorviov <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening Edit > Check Spelling again while an action waits at a Check
Spelling step keeps that action's continuation, so Done still plays
its remaining steps. A second playback that reaches a Check Spelling
step with its dialog on while the dialog is held for another action
fails at that step instead of taking the dialog over.
- A Trap step recorded without Wdth loaded as {} and saved back as Wdth 1 px,
so it reloaded as {"width":1}. It now loads as width 1 (what the command
plays), so load -> save -> load gives the same step.
- The Match Color dialog records Source "None" as "source": -1, which the
export refused because "source" wasn't an allowed key, so a Match Color
recorded in PhotoCraft could never be saved. A null or negative source
(and a sourceLayer with it) is now written as the source-less event; a
real source (>= 0) is still refused.
- Split Channels closes the original, but split and its enabled check never
checked the layer count, so a played SplC split and closed a layered
document with no undo. Like the reference application it now refuses
(Err, document untouched and open) a document with more than one layer
(a hidden one counts) or a lone group; a Background-only image or a lone
normal layer still splits.
Co-authored-by: hectorviov <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- steps_layer.rs select_from/select_to: #10753's layer references by name, index and ordinal
(recorded_layer_target / recorded_layer_ref) together with #10702's property references and the
zero document offset it refuses; the line merge had interleaved the two functions.
- layer_params.rs explicit_layer: #10753's group-end arm had lost its closing brace next to
#10702's Background arm.
- events.rs event_for: the batch's lookup (by code, else by non-empty name, legacy codes) kept;
#10628 renamed IntW/Dstr to intersectWith/distribute, and the run-time names the reference
application reports (interfaceWhite, distort) still load through NAME_ALIASES (test extended).
- Vibrance: one event, saved as the string event `vibrance` (#10702, from #8659) with the
`vibrance` class main writes (#8534); `Vbrn` still loads. #10702's round-trip test expects that
class now (the top-level class does not change what the reference application plays).
- #10702's tests build AtnFile with the `encoding` field main added (#8327).
All engine tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trace Contour read any i32 level, but a recorded step carries a whole
number 0..255 that the reference application clamps; import now clamps
(Lvl -1 -> 0, 300 -> 255) and export refuses levels outside 0..255.
Save Actions refused every Tiles/Pointillize step recorded through the
filter dialog, because the dialog adds foreground/background colours the
recorded event does not carry. Export now drops them (playback uses the
current colours, as the reference application does). Tiles count is
rounded on export like the native command rounds it (17.4 -> TlNm 17),
and null params export the defaults instead of being refused.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A Shift-click channel select (`slct` Chnl.Chnl.Cyn with `Extd` true) imported as a plain
single-channel `channel.target`, so playback targeted Cyan alone and Save dropped `Extd`.
It now stays a kept Photoshop step (only `Extd` absent or false maps).
- `select Chnl.Chnl.Lmnc` went through `channel_of`'s legacy fallback, targeted Lightness and
saved back as `Lght `. The select importer now uses the exact CHANNELS lookup, so it stays a
kept step and round-trips unchanged.
- The Channels panel recorded a colour click as `{"channel":{"color":0}}`, which the new export
rejects, so Save Actions of a PhotoCraft recording failed. A colour row click now sends the
mode's lowercase colour name (`{"color":"cyan"}`), which targets the same channel and exports
as the component select; other rows keep their reference.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Lens Flare params doc said "centerX":number=0.5, which the filter
dialog reads as an integer field defaulting to 0: Filter > Render > Lens
Flare put the flare in the top-left corner and an imported 0.4 centre
rounded to 0. The doc is back to 0..1=0.5; the engine still plays
off-canvas centres unclamped (a recorded 1.4 centre now has a playback test).
A Clouds or Difference Clouds step recorded through PhotoCraft's dialog
carries {"seed":0}, and Save Actions refused it. The event has no seed
key; seed 0 is what the imported empty step plays as, so it is dropped on
export. Any other seed still plays differently and is still refused.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- FTcs reference points used a 3x3 grid (Qcs0..Qcs8). The reference application has
Qcsa centre, Qcs0..Qcs3 corners clockwise from top-left and Qcs4..Qcs7 the sides
top/right/bottom/left (measured: 50 % scale, Qcs6 keeps the bottom centre, Qcs1 the
top-right corner). Qcs8 and Qcsi stay kept steps; nothing writes Qcs8.
- file.close {"save": false} (used by ui-egui tests) became an error; it discards again
and saves as Svng N.
- Batch never performs the action's Save As, so the scratch document stayed dirty and the
recorded Close (no Svng -> "save":"ask") failed every file of "...; Save As; Close".
A Save / Save As save point now marks the document saved.
- Adjustment-layer opacity is quantised to 8 bits on load; a recorded 70 % saved back as
70.196 %. The whole percent that quantises to the same level is saved again.
- Cmd-clicking a group's thumbnail errored; it loads the whole canvas again as before.
A recorded Cmd-click on another layer's thumbnail kept the numeric id and failed strict
Save Actions; it records the layer by name (or as the Background).
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Group F loader only mapped descriptors with an empty name and class
`null`, and nested shapes with an empty name. The reference application
names every step descriptor after the localized step (plus NUL), uses
the event code as its class and names nested shapes too, so every real
recorded Add To / Fade / Merge Layers ... step stayed a kept step and
never played (e.g. `addTo` with name "Add To\0", class `AddT` and a
nested `Rctn` named "\0"). The header is no longer checked; the shape
is matched by class only; key, order and enum checks stay strict.
IntW, Dstr and MrgL were registered with the string IDs
`interfaceWhite`, `distort` and none; the real ones are
`intersectWith`, `distribute` and `mergeLayers`, so steps written with
them stayed kept.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With our fix-up ea4112a4ce on top of the author's head 686f08c884. docs/atn.md kept from the batch (regenerated at the end); development.md and parity doc rows as unions.
- atn_cmds/tests.rs: the line unions of the merges split tests into each other (shared closing
lines kept once). Rebuilt from main plus every merged PR's added and changed tests, item by
item; the shared every_mapped_command table merged line by line.
- events.rs: Remove White Matte had lost its closing lines in the same way.
- #10627 and #10631 both added a `bare_from`/`bare_to` with different export rules (the Group E
one also takes a pixel `target`): #10627's is now `empty_from`/`empty_to`, so Focus Area and
Remove Background keep their own rule.
- The non-object params fix of #10631's fix-up (632a62b554) applied to the same `sets_only`
copies in steps_image.rs (#10627) and steps_distort.rs (#10629).
- Smart Sharpen export writes `presetKind` Custom first again, as recorded steps carry it
(#10627's fix-up 6ab24508d8 had dropped it, so load -> save lost the key).
All engine tests pass (lib 2591, integration suites green).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recording Check Spelling now adds one edit.checkSpelling step,
{"allLayers"} with Check All Layers as the dialog has it on Done, with
the step's dialog on. The dialog's corrections, dictionary edits and
lookups, and the canvas spelling suggestions, are not recorded.
Load Actions maps the spellCheck event (null = the spellCheck property
of all text layers, Usng = checkAll) to that step, keeping its dialog
flag, and Save Actions writes the same descriptor back. Any other form
of the event stays a kept Photoshop step.
Played with its dialog on, the step opens Check Spelling with Check All
Layers as recorded, and Done continues the action. With its dialog off,
or headless, it checks and changes nothing.
Add all measured naming components, nested starting serial, compatibility flags, complete-step refusal for unknown settings and exact descriptor retention. Keep literal text and extension placement separate from image encoding, and preserve the legacy native template, save snapshots and output protections. Reuse only the serial-letter helper from #4579 by @FabioLissi at 720a1e4b9c, with Adobe's independent letter counter. Unsupported Batch routing and Alias forms remain explicit gaps; combined validation is pending.
actions.load replaces a set of the same name, so when two chosen .atn
files both hold "Set 1" the panel keeps only the later one, but the
summary still added up both files' actions and unsupported steps
("actions: 2" with one action in the panel). The summary now counts per
set name, says which set was replaced ("Set 1 from b.atn replaced the
one from a.atn"), and is plural-aware and translated in every catalog.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A `{"layer":{"index":n}}` that lands on a group end made explicit_layer
return None, so layer.translate and the other callers acted on the
selected layers instead (e.g. layer.translate {"layer":{"index":3}} with
L1+L2 selected moved both). It now fails with "a group end is not a
layer"; layer.select still treats a group end as a no-op.
explicit_layer_enabled resolved a relative ordinal (Frwr/Bckw), made that
layer active, then ran the precondition with the unresolved ordinal, which
resolved again one layer further. With only Red targeted and A (active),
B, C (type) bottom to top, edit.clear {"layer":{"ordinal":"Frwr"}} was
refused with "Rasterize the layer" although it acts on raster B. The
precondition now sees the resolved layer id.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With our fix-up 6ab24508d8 on top of the author's head 8988b6bfd0. Conflicts resolved: import lists as unions (bare_from/bare_to taken from steps_other, #10631), event table, tests and parity doc rows as unions.
With our fix-up 1f524c378b on top of the author's head 713aa92ba5. Resolved with main: the version check sits in main's parse_layout (it merged cleanly); doc comments combined; atn_contract no longer expects version 12 to be refused and pins that an empty version 12 set parses; one ATTRIBUTION row for all ATN fixtures; the fixture README states which files were encoded how; development.md no longer counts the fixtures.
Out-of-range Oil Paint and Smart Sharpen settings kept the step as a
Photoshop step; the reference application clamps them when the step
plays, so the import now clamps (stylization 10.5 -> 10, Amnt 500.5 % ->
500, Rds 0.05 px -> 0.1). Export still refuses out-of-range params.
Oil Paint's light direction (LghD) had no range: LghD 500 mapped and
saved back as 500. It now clamps to the command's -180..180 on import
(500 -> 180) and export refuses {"angle": 181}.
Smart Sharpen mapped the legacy Lens Blur form, which the command's
Gaussian sharpen does not play, and wrote every step as legacy Lens
Blur. It now follows the PSD smart-filter mapping (photocraft-io
smart_map): only useLegacy false + blur GsnB maps (noiseReduction ->
reduceNoise); the reference default (useLegacy true, lensBlur), Motion
Blur and legacy steps stay Photoshop steps; export writes useLegacy
false, Amnt, Rds, noiseReduction, blur GsnB.
Co-authored-by: hectorviov <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three version 12 fixtures were tracked inside crates/psd/fuzz/corpus,
which crates/psd/fuzz/.gitignore ignores and cargo-fuzz rewrites (cmin) or
deletes; the psd and engine test binaries include_bytes! them, so cleaning
the corpus broke the build. They move to crates/psd/tests/fixtures/atn with
a README (sizes, purpose, sha256; the seeds note folded in) and an
ATTRIBUTION.md row; the fuzzer takes the folder as an extra corpus dir.
photocraft-cli recognised an extensionless Actions file only by version
word 16, so a version 12 set without .atn (classic Mac OS Photoshop 5)
went down the JSON path and failed with a UTF-8 error. It now accepts 12
and 16, the versions photocraft-psd reads. Input: v12-commands.atn copied
to "Legacy Actions" and passed to load_actions_file.
Co-authored-by: yoriswind <164435053+yoriswind@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve @HirthikBalaji's original ee4966260b history. Move its adapter and named-action support into the current layout while retaining the newer native Batch save snapshots, playback budget and output protections. Naming and descriptor extensions follow in the same source batch before combined validation.
Adapt only Custom from #10631 by @hectorviov at 4ed3f5b591 and Fibers from #10620 at 33ee38b431. Retain the measured ranges and whole unsupported descriptors without importing unrelated filters. Source and fixtures only; combined validation remains.
With our fix-up 363e0f5e89 on top of the author's head 244082fb2c. Conflicts with main resolved as unions (new tests next to main's; parity doc revision rows).
Port the ten backend, automation and test paths from #5493 by
@jonathanwxh-cell, pinned at 43920ab780.
Keep its original CSH codec, bounded preset reader and protection tests.
The prerequisite's UI, translation and parity-document changes are excluded.
Adapt ShapePreset construction to retain the exact source identifier. Empty
identifiers remain anonymous presets; repeated identifiers resolve when their
geometry is identical and refuse resolution when it conflicts. Add one
import-to-ATN Shape Blur regression and document the source attribution.
Original contribution: https://github.com/storytold/photocraft/pull/5493
Source-only integration; compilation and combined runtime validation remain.
A Custom (Cstm) step with a fractional Scl/Ofst/cell, e.g. Scl Double 1.5,
was mapped to filter.other.custom with scale 1.5, but export writes integers
and refuses the fraction, so Save Actions failed on a step that used to stay
a kept Photoshop step and round-trip. `within` now requires a whole number;
an integral Double such as 2.0 still maps.
`sets_only` accepted any non-object params, so custom_to(json!([1])) wrote an
identity Custom and bare_to(json!(5)) an empty descriptor for params no
command can play. Only an object or null passes now.
Co-authored-by: hectorviov <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Wave step recorded with NmbG above 64 (photocraft_algo::MAX_WAVE_GENERATORS)
mapped to filter.distort.wave, but the renderer clamps to 64 generators, so the
step played differently from Photoshop. Add generators 1..MAX_WAVE_GENERATORS to
WAVE_COMMAND_LIMITS: such a step (e.g. NmbG 65, 999, 1000000) now stays a kept
Photoshop step on import, and {"generators": 65} is refused on export, as the
PSD smart-filter mapper does.
Co-authored-by: hectorviov <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>