Commit Graph
1878 Commits
Author SHA1 Message Date
David Mann 673bfb4d9c Merge remote-tracking branch 'origin/main' into integration-batch-12
# Conflicts:
#	docs/file-format-parity.md
2026-11-02 20:15:23 +01:00
FredApps f8e393fdb6 Merge pull request #6266 from danielmigueltejedor/fix/gnome-window-decorations
Enable font-free GNOME/Wayland controls for system title bars
2026-11-02 19:59:41 +01:00
9034223c4b TIFF: open YCbCr images as RGB (#10316) (#10319)
* TIFF: open YCbCr images as RGB (#10316)

Scanners often write JPEG-compressed YCbCr TIFFs with 2x2 chroma
subsampling. The tiff crate decodes and upsamples them but returns raw
YCbCr samples, which the decoder rejected with "colour type YCbCr(8)".

The new tiff/ycbcr.rs converts them to RGB after decoding: JPEG data
uses the JFIF full-range BT.601 conversion (as libtiff does), other
compressions honour ReferenceBlackWhite and YCbCrCoefficients with the
TIFF defaults as fallback. 8 and 16-bit. YCbCr with extra samples, or
in other sample formats, fails with a clear unsupported error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Contributors: add Yuki-init's display name

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* TIFF YCbCr: test that YCbCrCoefficients set the luma weights

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* TIFF: YCbCr tags with the wrong value count use the defaults

tag_f64s now returns None unless the tag holds exactly n values, so a
YCbCrCoefficients or ReferenceBlackWhite tag with extra values falls
back to the TIFF defaults instead of being truncated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrgj5pnShYtsSnrsZq5iRn

* TIFF YCbCr: tests for tiled JPEG with ICC, big-endian 16-bit and planar

Covers the layouts the review asked for: a tiled 4:2:0 JPEG file with an
embedded profile (checked against an independent JPEG decoder), a
big-endian 16-bit file, and planar data in both byte orders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrgj5pnShYtsSnrsZq5iRn

* TIFF YCbCr: cite the formula sources and pin the green-channel choice

Documents where the conversion comes from: TIFF 6.0 Section 21
(YCbCrCoefficients, pp. 90-91) and libtiff's tif_color.c
(TIFFYCbCrToRGBInit, TIFFYCbCrtoRGB). Red and blue follow the spec;
green follows libtiff and adds Y unscaled, which matches the spec only
when the luma weights sum to 1. The module doc records this as a
deliberate compatibility choice, and a new test pins it: with weights
0.25/0.25/0.25, mid gray stays (128, 128, 128).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrgj5pnShYtsSnrsZq5iRn

* Codecs README: YCbCr TIFFs with three 8- or 16-bit samples decode to RGB

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lrgj5pnShYtsSnrsZq5iRn

* Format tiff_ycbcr tests with rustfmt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(tiff): compare grouped YCbCr decoding and update support notes

* style(tiff): align grouped decode call with test formatting

* style(tiff): apply repository rustfmt to grouped YCbCr regression

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-02 19:31:22 +01:00
FredApps 9236d27eb6 Merge current main into fix/gnome-window-decorations 2026-11-02 19:10:43 +01:00
David MannandClaude Opus 5.5 f79a169651 Integration: one Actions row and the batch's event total in the file format parity page
The doc merge left five Actions rows that disagreed (version 12 unsupported vs read; 120 vs
127 events). Found by CodeRabbit on #10776.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 16:42:36 +01:00
David MannandClaude Opus 5.5 8caea149c1 Integration: regenerate docs/atn.md for the batch (144 supported events, settings each PR keeps)
Supported table read from the batch's events.rs. The PRs' own sections (settings and command
options retained, Render defaults, steps kept disabled) are kept; the known-gaps tables that
#10702 and #10704 close are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:03:44 +01:00
David Mann 79a2a4e15f Merge PR #10632: Actions: map all 47 Filter Gallery effects (#10592)
With our fix-up 023e2662d7 on top of the author's head. Conflicts resolved item by item (Rust), docs as unions.
2026-11-02 03:18:45 +01:00
David Mann 520a996b30 Merge PR #10630: Actions: map Photoshop's Split Channels, Merge Spot Channel, Trap and Match Color steps (#10609)
With our fix-up a299bf9f6c on top of the author's head. Conflicts resolved item by item (Rust), docs as unions.
2026-11-02 03:15:28 +01:00
David Mann 496d9f3623 Merge PR #10618: Map Stylize and Pixelate action events
With our fix-up 52cc86351b on top of the author's head. Conflicts resolved item by item (Rust), docs as unions; docs/atn.md regenerated at the end.
2026-11-02 03:10:21 +01:00
David Mann 5d6041c1cd Merge PR #10628: Map selection, clipboard and layer-operation ATN events
With our fix-up 0e41091687 on top of the author's head. Conflicts resolved item by item (Rust), docs as unions; docs/atn.md regenerated at the end.
2026-11-02 02:55:08 +01:00
David Mann 4f899196cb Merge PR #10702: Actions: preserve settings in mapped ATN events
With our fix-up 78cf0cf91f on top of the author's head. Conflicts resolved item by item (Rust), docs as unions; docs/atn.md regenerated at the end.
2026-11-02 02:55:02 +01:00
0e41091687 Integration: Group F steps recorded by the reference application map (#10628)
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>
2026-11-02 02:50:33 +01:00
David Mann d570b77abb Merge PR #10753: Support recorded layer, document and layer comp references
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.
2026-11-02 02:40:55 +01:00
David Mann 48b0e221cd Merge PR #10627: Actions: map Photoshop's newer-feature steps (Oil Paint, Smart Sharpen, Focus Area, Sky, Remove Background) (#10610)
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.
2026-11-02 02:16:45 +01:00
David Mann 5bc852379a Merge PR #10743: Read Photoshop Actions version 12 descriptors
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.
2026-11-02 02:13:56 +01:00
6ab24508d8 Integration: .atn Oil Paint/Smart Sharpen clamp on import, Smart Sharpen maps the Gaussian form (#10627)
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>
2026-11-02 02:13:01 +01:00
David Mann cafaabcf04 Merge PR #10631: Actions: map Photoshop's De-Interlace, NTSC, HSB/HSL, Custom, Average and matting steps (#10607)
With our fix-up 632a62b554 on top of the author's head 4ed3f5b591. Conflicts resolved as unions (module list, event table, tests, parity doc rows).
2026-11-02 02:03:24 +01:00
David Mann 2d332d3ba5 Merge PR #10629: Actions: map Photoshop's Distort filter steps (Pinch, Polar Coordinates, Spherize, Twirl, Wave, ZigZag) (#10605)
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).
2026-11-02 02:02:03 +01:00
David Mann 5a99af60d7 Merge PR #10620: Map Render filter steps in Photoshop actions 2026-11-02 01:54:44 +01:00
aiongg fab871dadb Merge pull request #10535 from davidmann4/integration-batch-11
Integration batch 11: 9 ATN PRs on main
2026-11-01 19:11:02 -05:00
Gabriel Heuser 24be8ea6e2 Add editable arrowheads to Line tool (#6408) (#9259)
* Add configurable arrowheads to line tool

* Add editable arrowheads to Line tool

* Fix arrow scaling validation and PSD import defaults

* Preserve arrow geometry under affine transforms

* Preserve scaled arrowhead dimensions and prevent non-finite geometry

* Localize arrowhead Start and End labels

* Fix arrow transform editability and short line handling

* Fix PSD arrow concavity serialization

* Fix arrow dimension fallback validation

* Refine arrowhead options UI to match Photoshop

* Add opt-in arrowhead defaults to Shape properties

* Fix tool reset syntax after upstream merge

* Validate arrowhead flags and clamp copied defaults

* Preserve editable headless lines under transforms

* Fix arrowhead UI imports and formatting after v0.17 merge

* Format arrowhead properties after v0.18 merge

* Fix Clippy lint errors in arrow geometry and tests

* Fix headless arrow geometry after nonuniform scaling

* Fix proportional arrow scaling in Properties panel

* Fix Rust formatting in Properties arrow scaling tests

* test: validate invalid arrowhead dimensions without mutation

* fix: preserve arrow compatibility with older pcraft versions
2026-11-01 18:46:05 -05:00
yoriswind 01b3d74c50 docs: mark recorded ATN reference forms supported 2026-11-01 13:23:53 -08:00
yoriswind 35850ca7db Merge original ATN reference documentation from #10603 2026-11-01 13:23:37 -08:00
yoriswind 21b6546907 Resolve recorded Action reference forms at playback 2026-11-01 12:55:02 -08:00
yoriswind 4c6ddb9cb7 Correct legacy action import expectations and document version support 2026-11-01 11:49:17 -08:00
yoriswind 7ca16e9eba Read Photoshop Actions version 12 descriptors 2026-11-01 11:45:32 -08:00
yoriswind 33ee38b431 Merge main and preserve the Render gap update 2026-11-01 10:22:26 -08:00
yoriswind 7e0bf9ab6c Merge main and retain both gap log updates 2026-11-01 10:04:57 -08:00
David MannandClaude Opus 5.5 5a9ca48f8a docs(atn): Convert Stroke to Fill exists only internally; where it was looked for
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:37:35 +01:00
David MannandClaude Opus 5.5 ea326374b2 docs(atn): Convert Stroke to Fill is not a user command, nothing to map
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:23:54 +01:00
David MannandClaude Opus 5.5 2ec27abb95 docs(atn): measure the remaining menu events through recordings
Every remaining event recorded in the reference application through its
menus: Scale Effects, Create Layers, Frame and Artboards, all eleven
Stack Modes with their plug-in codes, video layer and frame commands,
Create Work Path, Find and Replace, Check Spelling, measurement scale
and Scale Marker, Close All, data sets (apply, import, export), Package,
Video Frames to Layers, Import Notes, Photomerge, Crop and Straighten
Photos, Conditional Mode Change and Fit Image. Close Others and Define
Variables record nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:10:32 +01:00
yoriswind 2703d88a35 Document preserved settings in mapped ATN events
Build on davidmann4's ATN reference in #10603 and move the 22 repaired settings out of its gap table.
2026-11-01 09:08:58 -08:00
David MannandClaude Opus 5.5 0588012b29 docs(atn): measure Batch behaviour, document-independent recording, Trace Contour
Measured in the reference application: Batch source and destination keys
(open documents, Save and Close, override Open and Save As, suppress open
options), file naming output (the extension component only gets a dot as
the last component), processing order, flat output with subfolders, name
clashes, stop and log error modes with the log file format, and Esc.
What a normal recording names (layers by name, merged nudges and typing,
document offsets) and how it plays on another document. Trace Contour's
recorded keys and its 0..255 level; Quick Export records no step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:11:39 +01:00
David MannandClaude Opus 5.5 5020854dde docs(atn): measure Shear, gradients, workspaces, Print, Droplet, Sky Replacement, layer comps
Measured in the reference application through its dialogs and recorded
actions: Shear point ranges and what ShrS/ShrE mean, the classic and the
new Gradient tool steps, Content-Aware Fill, Perspective Warp, Print,
Create Droplet and Sky Replacement descriptors, the mmdd/ddmm Batch date
components, and every layer comp reference form. Export As records no
step; Convert Stroke to Fill was not available in the measured version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 16:31:26 +01:00
Khawar Zamman WaniandFredApps 209bce8d46 Budget PSD pattern expansion and bound multichannel conversion (#10541)
* Stream PSD user and real masks into tile rows

* Correct streamed-mask fixture metadata and test lint issues

* Budget PSD pattern expansion and bound multichannel conversion

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-01 16:00:21 +01:00
David MannandClaude Opus 5.5 a02e1211e9 Docs (atn): Custom ranges from the dialog; only Spatter of the Filter Gallery is mapped
Addresses CodeRabbit on #10603: the Group A intro said every Filter Gallery effect loads as a
kept step, but Spatter is mapped; Custom's scale, offset and matrix cells now have their
measured ranges and the matrix has no default (a step carries all 25 cells).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 15:51:23 +01:00
David MannandClaude Opus 5.5 2e0c0f9a69 Docs (atn): how Insert Menu Item and Insert Path are recorded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 15:40:20 +01:00
David MannandClaude Opus 5.5 ceb5ddf6c5 Docs (atn): events measured through dialogs and recordings, Batch file naming, panel menu
Recorded in the reference application through its menus and read back from the saved Actions
panel, or returned by the dialog on OK: Custom, Fibers, Displace (with ranges), Color Lookup,
Shape Blur, Lighting Effects, Blur Gallery, Liquify, Camera Raw Filter, Vanishing Point,
Calculations; how Image Size, Canvas Size, Convert Mode and New Group are recorded. The Batch
descriptor with its file naming components, and the Actions panel menu and Playback Options.

Known gaps gain four rows: Convert Mode is saved with an enum the reference application
rejects, adjustment layer opacity on Make, Canvas Size in percent, Image Size in cm/inches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 15:37:04 +01:00
aiongg 84732d09bc Merge pull request #9618 from RickiNano/prefs/gpu-adapter-typed-read
Prefs: startup reads Graphics Adapter through the typed Performance section
2026-11-01 08:56:16 -05:00
aiongg dbe24c7e92 Merge pull request #10658 from RickiNano/fix/10640-preset-group-reimport
Ask before re-importing a brush or gradient file over its group (#10640)
2026-11-01 08:55:56 -05:00
David MannandClaude Opus 5.5 fe3d8db7e3 Docs (atn): reference forms, newer events, version 12 files, wrong codes in the mapping
- Known gaps: every exported step of the round-trip test was played in the reference
  application (128 of 151 ran); six codes the mapping writes are wrong there (Vibrance and
  Gradient Map events, Stroke Outside, Pass Through, canvas extension colour, Absolute
  Colorimetric), and a document offset wraps around there.
- Reference forms: layers and documents by index, id, offset and ordinal, measured.
- Newer events: 63 candidates from the menu catalogue run in the reference application;
  which need no settings, which were measured with settings, which need their dialog.
- Version 12 files: the older descriptor layout, checked on 325 real sets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:55:29 +01:00
4b053e15ae Integration: keep the ATN contract tests, drop the extra workflow (#7561)
The contract tests no longer compiled on main (AtnItem::dictionary is now
Vec<u8>, so it is compared with b"Future event"), sat outside main's
tests/it layout, and the new atn.yml added six legs (two macOS) to every
PR against ci.yml's policy. Move the tests into tests/it so the existing
CI runs them, drop atn.yml and docs/atn-testing.md, keep main's ci.yml and
fuzz target, and note the committed fixtures in ATTRIBUTION.md.

Co-authored-by: denstu473 <63150090+denstu473@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:25:51 +01:00
David Mann 893d12bee2 Merge main into #7561 2026-11-01 14:19:49 +01:00
aiongg 713197635d Merge origin/main into prefs/gpu-adapter-typed-read 2026-11-01 13:16:28 +00:00
Khawar Zamman WaniandFredApps 5d815c5a4b Stream PSD user and real masks into tile rows (#10532)
* Bound PSD import pixel storage before decoding

* Include ZIP inflater workspace in PSD preflight

* PSD import: budget unknown-mode layers, stop after a fatal layer error, keep best-effort for non-allocation limits (#8593 review)

* Stream PSD user and real masks into tile rows

* Correct streamed-mask fixture metadata and test lint issues

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-01 14:03:08 +01:00
David MannandClaude Opus 5.5 a23b30edd2 Docs (atn): known gaps in mapped events; fix the adjustment rows of the supported table
Every mapped event was checked against the reference application: the corpus sets'
5 296 recorded steps and factory descriptors went through Load and Save Actions and were
compared with the original, and the forms PhotoCraft writes were played there. The new
section lists the settings mapped events still lose (transform reference point, show
only this layer, group names, clipping and colour labels on Make, shape layers, layer
via copy options, load selection from another layer, Background by property, Close that
asks, Lab Photo Filter colours) and the settings the commands do not have yet.

The supported table showed 15 direct adjustment events with shifted columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:49:32 +01:00
Khawar Zamman Wani 97a83f074f Bound PSD layer and mask import memory before decoding (#10503)
* Bound PSD import pixel storage before decoding

* Include ZIP inflater workspace in PSD preflight

* PSD import: budget unknown-mode layers, stop after a fatal layer error, keep best-effort for non-allocation limits (#8593 review)
2026-11-01 12:33:09 +01:00
RickiNanoandClaude Opus 5.5 122e55a4a0 Ask before re-importing a brush or gradient file over its group (#10640)
Importing an .abr or .grd whose name matched an existing group silently
deleted that group's user presets (edited or moved-in ones included); the
preset libraries are outside document history, so it could not be undone.

- brush.presets.importAbr / gradient.presets.importGrd: `replace` now
  defaults to false; a taken group name imports beside it as "Kit (2)",
  "Kit (3)"…, and the result's `group` names the one it landed in.
- UI: when the group already holds the user's presets, a prompt asks
  Import as New Group (default) / Replace (can't be undone) / Cancel.
  Agents drive it with ui.dialog.set {"choice":"replace"} / confirm / cancel.
- The status bar names the group the file landed in.

Fixes #10640

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:49:33 +01:00
yoriswind 036d37f90d Clarify current and historical ATN documentation counts 2026-10-31 23:07:10 -07:00
yoriswind 0a605880dd Separate disabled ATN steps from supported Render counts 2026-10-31 21:11:28 -07:00