Commit Graph
11425 Commits
Author SHA1 Message Date
yoriswind 7906cd8bc2 Start Stylize and Pixelate ATN adapters with parameterless events 2026-10-31 18:58:08 -07:00
yoriswind d7a2a3362e Import native color component selections from Photoshop actions 2026-10-31 18:56:53 -07:00
yoriswind 822e72d856 Guard named Batch playback against recursion and budget bypass 2026-10-31 18:53:45 -07:00
David MannandClaude Opus 5.5 47287016d3 Docs (atn): fix the Filter Gallery row, mark example values, settle two specs
- The supported table read the command list of the next entry for an event whose
  list is a constant: Filter Gallery (`GEfc`) maps to `filter.gallery.spatter`, not
  Shadows/Highlights. The table now resolves constants and reads each entry alone.
- Steps measured in a prepared document (Fade, Replace Color, Trap, selection
  combinations, ...) show the example values that were sent, labelled as such, not
  as factory defaults.
- Mosaic cell size: write `#Pxl`, read a value without a unit as pixels.
- Custom: no factory matrix; the test matrix is no longer shown as defaults.
- Intro: kept steps with no document effect are imported switched off and skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 02:31:47 +01:00
yoriswind 4580778ce2 Document Batch and droplet action selection 2026-10-31 18:21:54 -07:00
David MannandClaude Opus 5.5 b408d4166d Docs: .atn event reference with the supported events and measured specs of unmapped ones
docs/atn.md lists the 117 events PhotoCraft maps today and, for 101 events it does
not map yet, every key the step carries in recorded order, with type, unit, factory
default, exact range and accepted enum values, measured in the reference application.
An implementation needs no further checks there. Linked from file-format-parity.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 02:17:06 +01:00
yoriswind 9033499c05 fix: honor selected actions in Batch and Create Droplet 2026-10-31 18:11:22 -07:00
yoriswind 9b1be2f526 fix: load every selected Actions file 2026-10-31 16:51:48 -07:00
Dylan M. Taylor 1f984bffb3 packaging(flatpak): add OCI image build and GHCR publishing helper (#10567) 2026-10-31 18:53:08 -04:00
tronicumandClaude Sonnet 5 d6158b9974 i18n: add Urdu (ur) catalog
Registers ur using the existing plural_one_other rule (Urdu's CLDR
plural category is a simple one|other). RTL_LANGUAGES already listed "ur", so the shell mirrors it the
same way it already does for Arabic.

Updates right_to_left_scripts_by_language_code and its doc comment to
cover Urdu next to Arabic.

Full ui-egui lib test suite passes (4426-4427/4450 depending on test
flakiness unrelated to this change; the remaining failures are the
documented pre-existing test-environment font-glyph limitation plus a
couple of known-flaky font-matching/timing tests, confirmed unrelated).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-31 23:18:12 +01:00
tronicumandClaude Sonnet 5 2538266349 i18n: add Romanian (ro) catalog
Registers ro with a new plural_romanian rule (CLDR): 1 -> one; 0, or
n % 100 in 1-19 -> few (bare plural noun, e.g. "2 straturi"); else ->
other (takes "de" + plural, e.g. "20 de straturi") -- Romanian's
grammatical rule for when counted nouns need "de" inserted.

Verified against cargo xtask i18n-coverage (the authoritative
completeness check, not just cargo test): ro has 1 missing entry
("No matching fonts"), which is missing from nearly every other
registered language too -- pre-existing project-wide drift, not
specific to this addition.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-31 23:18:02 +01:00
tronicumandClaude Sonnet 5 7d8098757c i18n: add Hebrew (he) catalog
Registers he using the existing plural_one_other rule: modern Hebrew
software UI commonly collapses CLDR's one/two/many/other into a plain
one|other. RTL_LANGUAGES already listed "he", so the shell mirrors it
the same way it already does for Arabic.

Updates right_to_left_scripts_by_language_code and its doc comment to
cover Hebrew next to Arabic.

Full ui-egui lib test suite passes (4427/4450; the remaining 23
failures are the documented pre-existing test-environment font-glyph
limitation and known-flaky font-matching/timing tests, confirmed
unrelated to this change).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-31 23:18:02 +01:00
Hector VillarrealandClaude Opus 5.5 0d235ddcf6 Re-run CI
The gate failed in photocraft-compose's proptest the_split_route_agrees_with_the_exact_path (flaky on main, #10386), which this PR doesn't touch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:47:16 -06:00
Hector VillarrealandClaude Opus 5.5 41caec921d Re-run CI
A CI job failed in photocraft-compose's proptest the_split_route_agrees_with_the_exact_path (flaky on main, #10386), which this PR doesn't touch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:14:52 -06:00
Hector VillarrealandClaude Opus 5.5 c171557ff8 Select and Mask: end a brush resize when its own button comes up (CodeRabbit review on crates/ui-egui/src/dialogs/select_mask_ui.rs:1829)
A resize ended only once no button at all was down. Releasing the right
button while the middle button panned kept it pending, so a left-drag
begun during that pan resized the brush from the old anchor on the frame
the middle button came up. The resize now records the button that drags
it and ends as soon as that button is let go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:59:36 -06:00
Taxperia 349977449b i18n: refine az/ro translations and address review findings 2026-10-31 23:48:40 +03:00
Hector VillarrealandClaude Opus 5.5 c075160d02 Liquify: Preview checkbox and P show the image unwarped
Photoshop's Liquify has a Preview checkbox above OK and Cancel (P toggles
it): off, the preview shows the image as it was while strokes still
change the field. Both preview paths (the proxy and the zoomed-in
document-resolution view) now draw through an undisplaced field while
Preview is off; turning it back on redraws the warp. The control channel
takes and reports "preview". Every opening starts with Preview on. The
properties now scroll above the footer instead of under it.

Fixes #7905

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:43:30 -06:00
Hector VillarrealandClaude Opus 5.5 1c07f00188 Select and Mask: keep a brush resize on the tool it began on (CodeRabbit review on crates/ui-egui/src/dialogs/select_mask_ui.rs:1809)
Picking another tool by key mid-resize (let go of Alt, press W) applied
the Brush's starting size to Quick Selection, and picking a non-brush
tool (L) let the rest of the held drag draw a lasso selection. The
resize now records its tool; when the tool changes, the rest of the
drag is consumed until the button is let go, and the anchored circle
and readout show only for that tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:33:44 -06:00
Hector VillarrealandClaude Opus 5.5 84f7ebe8c2 Select and Mask: end a brush resize released while Space pans (CodeRabbit review on crates/ui-egui/src/dialogs/select_mask_ui.rs:1805)
Releasing the button of an Alt+right-drag resize while Space (or the
middle button) was down left the resize pending, so a later Space-drag
that went on after Space came up resized the brush from the old anchor
instead of painting. Letting go of the button now ends the resize
whether or not a pan is under way.

The resize test's harness and drag steps move into helpers shared by
the new test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:31:36 -06:00
Hector VillarrealandClaude Opus 5.5 be7d681673 Free Transform: lift a pixel's coverage up to all of it, as Move does
Transforming a selection split each pixel as a·k and a·(1 − k), so a
selection loaded from the layer's own transparency (⌘-click) left a
faint ghost of its anti-aliased edge behind. Move already lifts up to the
pixel's coverage (min(a, k), leaving max(a − k, 0)); split_selected now
does the same, for Free Transform, its live preview, Warp and Distort.
An opaque pixel still splits as k and 1 − k.

Fixes #5595

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:23:25 -06:00
SvenCarstensen b475317173 Test guide unit switches preserve small and precise positions
Exercise the unit dropdown through inches, millimeters and pixels, then confirm the guide. Cover tiny positive and negative positions, high-precision fractions, zero and integers. The regression fails with fixed twelve-place serialization.
2026-10-31 21:03:21 +01:00
SvenCarstensen 51275cc5bb Preserve precision when converting guide position units
Serialize converted guide positions with f64 Display instead of fixed twelve-place rounding. Keep decimal text accepted by Unit::parse_length, including small nonzero values.
2026-10-31 21:02:36 +01:00
SvenCarstensen 9c7590105c Merge branch 'main' into codex/guide-position-units 2026-10-31 20:48:47 +01:00
Hector VillarrealandClaude Opus 5.5 f2fe5d94c3 Select and Mask: resize the brush with Alt+right-drag
Alt+right-drag, or Control+Alt-drag, on the image now changes the current
brush tool's size (and the Brush tool's hardness) with the circle anchored
where the drag began and a Diameter/Hardness readout, as on the main
canvas and in Liquify. It no longer starts a selection stroke; Alt+left-drag
still subtracts.

Fixes #10497

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:42:51 -06:00
Taxperia 5d54be710c i18n: add Azerbaijani and Romanian UI languages 2026-10-31 22:26:12 +03:00
qvest-sselsandClaude Opus 5.5 7e0e809cb9 Merge remote-tracking branch 'origin/main' into feat/curves-channel-keys-7325
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 19:08:22 +01:00
Ben Huyck 6d96ae9fab Contributors: credit regexer by GitHub profile name 2026-10-31 17:44:49 +00:00
Ben Huyck ab37e0d606 Actions: Load Actions takes an encoding and reports the one it used (#6743) 2026-10-31 17:44:43 +00:00
Ben Huyck a5066d9e88 Actions: read .atn step names in the code page Photoshop wrote them in (#6743) 2026-10-31 17:44:42 +00:00
Ben Huyck 1adef51797 PSD: guess the legacy code page of 8-bit names (#6743) 2026-10-31 17:44:42 +00:00
Hector VillarrealandClaude Opus 5.5 ba94972ffa Move tool: snap the nudge only within f32 precision of a whole step (CodeRabbit review on move_mods.rs:212)
Test: a_nudge_is_one_screen_pixel_below_a_tenth_of_a_percent gains 0.3333334 -> 2 (was 3) and
the f32 third -> 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:38:22 -06:00
Hector VillarrealandClaude Opus 5.5 6d9ddc66e1 Move tool: no 1000 px cap on the screen-pixel nudge (CodeRabbit review on crates/ui-egui/src/tools/move_mods.rs:210)
A large document zooms out until its shorter side is 2 px on screen
(zoom_levels::min), below 0.1 %, so one screen pixel can be more than
1000 document pixels (6000 at a 12,000 x 12,000 px document's lowest
zoom). The step is now floor(1 / zoom), at least 1, with no upper cap;
the zoom's own floor bounds it at half the shorter side.

The rounding margin is now relative: an f32 zoom rung is a hair off its
value (0.1 % is 1 / 999.99995), so the old absolute 1e-6 gave 999 at
0.1 % and 499 at 0.2 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:38:22 -06:00
Hector VillarrealandClaude Opus 5.5 321c25ce47 Move tool: an arrow nudge is one screen pixel, as in Photoshop (#9511)
A plain arrow nudge moved layers 1 document pixel at any zoom. Photoshop
moves one screen pixel: floor(1 / zoom) document pixels, at least 1 (4 at
25 %, 2 at 50 %, 1 at 66.7 % and above), while ⇧ stays 10 px.

Fixes #9511

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:38:22 -06:00
sn-o-w 6ef5813a12 Contributors: add myself (sn-o-w) 2026-10-31 18:35:20 +01:00
aiongg 799e129628 Merge pull request #10145 from davidmann4/integration-batch-10
Integration batch: 18 PRs on main
2026-10-31 13:31:44 -04:00
David MannandClaude Opus 5.5 841e74a183 Integration batch 11 (ATN): start of the batch, nothing merged yet
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:30:49 +01:00
lucas perssonandClaude Opus 5.5 dda8ac6281 [ai] raw: test split strips with up to four extra fixed-rate rows
The end-of-strip rule accepts whole fixed-rate rows past the image (up to 4),
but no test covered a valid strip with such rows. Encode 1 to 5 extra rows at
12 and 14 bit: up to 4 decode with the image rows unchanged, the fifth is
refused (preview fallback).

Suggested by CodeRabbit on #10529.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:10:56 +01:00
Khawar Zamman Wani f3caa319a2 Keep brush state intact when preset tip loading fails (#10288) 2026-10-31 13:07:18 -04:00
sn-o-w a2740ce692 Contributors: add myself (sn-o-w) 2026-10-31 17:56:24 +02:00
lucas perssonandClaude Opus 5.5 b15e914431 [ai] raw: decode Nikon "lossy after split" NEFs
Some lossy type 2 NEFs store a split row at byte 562 of maker note 0x0096.
They were refused ("lossy after split") and opened as the camera's preview.
The 11 such CC0 raw.pixls.us files come from the D3400, D5, D5000, D5200,
D5500, D5600, D7000, Nikon 1 J5 and Z 6_2.

Decode them following the rule LightCraft derived by black-box analysis of
those 11 files (storytold/lightcraft#633), the same route the Huffman tables
took. Rows above the split are Huffman coded as before. From the split row on,
every pixel is one MSB-first word of bits - 4 bits: a prefix code for the
difference category followed by the top bits of the T.81 additional bits,
dequantised to the centre of the kept bin (fixed_words, ported from
LightCraft's fixed_word_table), with the same predictor and an unclamped
running value. The section ends the strip: whole rows (up to 4 more than the
image), then 0-7 one-bits.

A split file that fails to decode for any reason (a section that does not end
the strip, the all-ones word, truncation, size limits, a split row past the
image, a curve long enough to cover byte 562) stays unsupported, so it keeps
the embedded-preview fallback it had before. Apart from the all-ones word and
the padding, the content of the fixed-rate section is not validated: a damaged
word inside a well-formed section decodes without an error, as in LightCraft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:04:10 +01:00
David MannandClaude Opus 5.5 aca609ef49 Merge #8725's current head (6d1aef9bd) into the batch
Its two new commits merge main (8a87a457a, 422ca7bed), both already in the batch.
Their catalog resolutions place the "Edit Brush…" row differently; every row they
hold is already in the batch's catalogs, so the tree is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:15:47 +01:00
David MannandClaude Opus 5.5 e46be131e9 Merge #9274's current head (7da275ea6) into the batch
The author's main merge brings one new test (full coverage keeps Threshold over
extreme float channels) and rewords the #9483 tone comment; its main side
(b1cfff9d3) is already in the batch. Docs keep the batch's newer status lines and
revision rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:43:14 +01:00
David MannandClaude Opus 5.5 130244bace Merge #8571's current head (752daed44) into the batch
752daed44 makes nested SVG images share one XML depth budget in the bounded
parser. The batch's fix-up 1acb1f464 already does that (`xml_left` passed down
to each nested image), and also leaves an image the drawing has no depth left
for out instead of failing the drawing, so the tree keeps the batch's svg.rs and
its test `bounded_embedded_svg_gets_only_the_nesting_depth_the_drawing_left` (511 + 511 levels).
866b9d0e4 merged an older main than the batch has; the batch keeps its own,
reviewed resolutions of those files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:42:49 +01:00
David MannandClaude Opus 5.5 622707a36f Address CodeRabbit review: four findings on the batch
- Channel targeting routes an allow-list of pixel-editing paint commands, not every
  `paint.*` id: the Mixer Brush's Alt-click load and Symmetry no longer follow a colour
  set or get refused with "Rasterize the layer" on a fill layer. Patch and Content-Aware
  Move stay routed (#9274).
- Native vector save-back checks the preview SVG as strictly as stored previews are
  checked on load and PSD export, so a preview with an unreadable embedded image is
  refused instead of stored and later dropped (#8571).
- .pcraft blobs read their zstd frame with framing headroom, so an incompressible
  preview right at its 16 MiB limit still loads; the limit still bounds the data.
- Levels/Curves recall (Alt+shortcut) decides the combined Lab record from the target
  the dialog captured, as remembering does, so a viewed layer mask keeps its settings
  beside a Lab colour set (#9274).

Each comes with a test that fails without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:41:36 +01:00
David MannandClaude Opus 5.5 4ca14ee527 Type: copied type brings the styles it uses, scaled with it (#10500)
The reference application, measured with Duplicate Layer from 72 to 300
ppi: a character or paragraph style the destination lacks arrives under
its name with its sizes scaled like the text (24 pt -> 5.76 pt), so the
copy has no override; a destination style of the same name keeps its
definition and the copy shows an override (+).

Copies never brought styles before: a copied run kept the source's style
id, which in the destination named another style or none. Copy to
Document, Paste and Duplicate Layer > New Document now match styles by
name, add the missing ones under fresh ids and point the runs at them;
retarget_type_resolution scales the point values of the styles that
travel with the copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:36:42 +01:00
qvest-sselsandClaude Opus 5.5 eb6ac8741b curves: the physical key decides, and Option's typed character is consumed (#7325)
Use the logical key only when the physical key is unknown, so a layout
that types a digit from another key doesn't pick a channel. Drop the Text
event Option+digit produces on macOS right after a handled key, so it
can't reach a focused number field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:20:22 +01:00
Lcoding15 dce32b66d8 engine: Free Transform takes soft edges whole after a move (#10461)
After moving selected pixels, the selection is the moved pixels' alpha
(#7538, measured in Photoshop). Free Transform split the layer by
multiplying the selection into each pixel, so a soft edge pixel of
alpha a was lifted as a² and a × (1 − a) of it stayed behind: a grey
outline of the shape at its old place.

`split_selected` now lifts the selection's share of each pixel's
coverage, up to all of it, as moving selected pixels already does
(`float_cmds::cut_piece`, #7655). Opaque pixels still split as k and
1 − k, and fully selected pixels move whole, as before. Warp, Distort
and the live transform preview share the function.
2026-10-31 14:05:02 +01:00
David MannandClaude Opus 5.5 0b32c9aed6 Review follow-up to #10328: Liquify saved twirl, restored tests, Cutout leftovers (#10500)
- Liquify: a setting saved with the old twirlCcw tool opens on Twirl
  Clockwise instead of failing back to Forward Warp; the Alt hint is
  given for twirlCcw only, other non-tools get a plain error.
- Layers: the adjustment-layer targeting test checks again, at 1x and
  2x and with a vector mask, that each mask thumbnail targets its mask
  and that Fill edits the mask and leaves the adjustment alone.
- Cutout: drop the unused corner flags, the slivers mention and the
  transpose test name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:56:19 +01:00
David Mann 9ec0f51dc1 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/i18n/nb.tsv
2026-10-31 13:55:06 +01:00
qvest-sselsandClaude Sonnet 5.5 2f550fafa1 curves: Option/Alt+2..6 select the dialog's channel (#7325)
In the Curves dialog Option/Alt+2 selects the first channel entry (the
composite) and 3, 4, 5, 6 the following ones, whatever the document's
colour model. The keys are consumed so they reach nothing else.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 10:51:15 +01:00