Commit Graph
11425 Commits
Author SHA1 Message Date
Przemyslaw Majdak 612c4a3c7f Codecs: warn when DPX or Cineon saves drop bits (#8793)
DPX at 10 or 12 bits and Cineon (always 10) are planned as U16, so
DepthReduced, which compares sample types, never fired: a 16-bit document
saved at 10 bits lost six bits per sample silently, and a float one was
told it would be reduced to 16-bit.

FidelityWarning::BitsReduced { from, bits } names the stored depth. Float
samples always get it; U16 ones only when some sample is not already a
code value at that depth, so a frame opened from a 10- or 12-bit file
saves back without a warning. U8 widens losslessly and stays silent.
2026-10-23 17:38:29 -04:00
Yongjip Kim 78013e2256 perf(mcp): move command list rows instead of cloning (#8844) 2026-10-23 17:38:23 -04:00
Yongjip Kim 08a606c7d1 perf(liquify): reuse interpolation taps and bound render buffers (#8855)
* perf(liquify): reuse cubic field taps across tile axes

* perf(liquify): bound completed render tiles
2026-10-23 17:38:18 -04:00
Ignat Ai 0c124bf388 i18n(zh-hans): translate status messages and preview labels (#8872) 2026-10-23 17:38:13 -04:00
Dylan M. Taylor cfd894aad3 security(paint): cap spaced steps and procedural primitives (#8957)
* security(paint): cap distance-spaced steps per segment and procedural tip primitives

* test(paint): count steps through a Cell so the walker closure can be shared

* paint: keep the spacing carry-over when a segment ends at the step cap; lower the tip work budget
2026-10-23 17:38:07 -04:00
Kushagra Sharma 7e3594b822 fix(ui-egui): a click on the bottom layer's Smart Filters selects them again (#8764) (#8974)
* fix(ui-egui): a click on the bottom layer's Smart Filters selects them again (#8764)

The empty space below the last Layers panel row deselects every layer on a
click (#8100). It started under the last layer's own row, so it covered that
layer's effect and Smart Filter rows and, registered after them, took their
clicks: on the bottom smart object (a new document's Layer 0), clicking a
filter deselected everything instead of selecting it.

The click area now starts under everything drawn for the last layer. The
drop zone below it (#1721) is unchanged.

* Contributors: credit drunkeninja42 as Kushagra Sharma
2026-10-23 17:38:02 -04:00
kotulskyandkotulsky 8d1926433f Reuse filled-shape effect maps while moving styled groups (#8993)
* perf(gpu): reuse filled-shape effect maps during translation

Hash filled-shape outlines in local coordinates so whole-pixel movement can use the existing effect-map translation reuse path. Keep its region-size and exact coverage checks, and invalidate the key when the outline deforms.

Add a shape-key regression and a synchronized styled-shape group benchmark with fresh-render parity verification. On RTX 4070 Laptop, the 1600x1200 fixture improves from 61.336 to 33.120 ms median; a 24 MP full-canvas fixture improves from 223.018 to 184.289 ms. Warm frames rebuild zero effect programs, and the quick fixture matches fresh rendering exactly.

* fix(gpu): stabilize fractional shape effect fingerprints

Quantize only origin-normalized fingerprint coordinates to a 1/65536 pixel grid and canonicalize signed zero. Preserve the render path and exact coverage guard.

Cover fractional anchors and handles, positive and negative integer translations and handle deformation. Exercise fractional origins in the benchmark and document its entry points. All 40 GPU tests, Clippy and WASM checks pass; reused output matches a fresh compositor exactly.

---------

Co-authored-by: kotulsky <7805437+kotulsky@users.noreply.github.com>
2026-10-23 17:37:56 -04:00
Finn NewickandClaude Opus 5.5 4df36ba4c4 fix(ui): outline a size-changing preview's area with the Line border
Review of #8994: with Canvas Border set to Line, the border stayed on
the document's rectangle while a size-changing preview (a 90° rotation)
drew over its own area. The canvas closure now returns the edge it drew
(the preview's area on the CPU canvas), and the border outlines it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:28:12 +01:00
Gert Pellin 390dfbbcb0 Direct Selection: arrow keys drop anchors of a saved path the Paths panel no longer selects
Anchors selected on one saved path stayed selected after the panel picked
another, so the arrow keys still nudged the old path (or whichever path
took its index after a delete). They now check the target is still one of
the paths Direct Selection edits and clear the selection if not.
2026-10-23 23:24:09 +02:00
David Mann 27caf2823b Merge remote-tracking branch 'origin/main' into integration-batch-7
# Conflicts:
#	crates/engine/Cargo.toml
2026-10-23 23:13:46 +02:00
Brandon ThomasandClaude Opus 5.5 60c87b9884 Release 0.15.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.15.1
2026-10-23 17:11:30 -04:00
Brandon ThomasandClaude Opus 5.5 4991f6377e packaging(macos): retry stapling when Apple's ticket lookup drops (#8995)
* packaging(macos): retry stapling when Apple's ticket lookup drops

The 0.15.0 release's macOS job failed after both notarizations were
accepted: stapling the DMG lost its connection to Apple's CloudKit
ticket service (error 68). Retry stapling up to five times with a
growing pause before failing the job.

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

* packaging(macos): retry stapler validation too

The re-run of the 0.15.0 macOS job stapled the DMG, then lost the
CloudKit connection in `stapler validate` (error 68 again). Retry
staple + validate as a pair in package.sh, and retry the validation
verify.sh does.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:11:00 -04:00
Dylan M. Taylor 6d4b9690ab deps: roxmltree 0.21 in photocraft-io and photocraft-engine (#8973) 2026-10-23 17:06:29 -04:00
Dylan M. Taylor ed67aa5859 Merge pull request #8990 from dylanmtaylor/ci/sonar-main-not-cancelled
ci(sonar): stop cancelling main-branch runs so coverage is published
2026-10-23 17:05:16 -04:00
Finn NewickandClaude Opus 5.5 f2ebff3de5 fix(ui): centre size-changing filter previews on the CPU canvas
A filter preview that changes the canvas's dimensions (Image > Image
Rotation) kept the unpreviewed document on the CPU canvas (a mirrored
or pixel-aspect view, no usable GPU, a GPU fallback), since drawing its
texture over the document's bounds stretched it. The CPU canvas now
draws it over its own area centred on the document's, as the GPU canvas
centres it (preview_bounds, CpuTextures::bounds), with the drop shadow,
checkerboard and rotated-view mapping on that area too. Such previews
redraw whole and have no detail texture (both work in the document's
pixels). Turning Preview off or cancelling restores the document.

Fixes #8989.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:00:37 +01:00
Jeremy YaoandClaude Opus 5.5 54a2f2ac25 Animation Effects: wheel tests read the notch size from egui
CodeRabbit noted that the wheel tests this PR adds assumed a notch is 40
points (5 px at 800 %). That is egui's native line_scroll_speed; on wasm32
egui uses 8. The tests now take it from egui instead:
- wheel_nav tests: configured_notch(), a context set up like the app's;
- canvas tests in input_tests: notch_pan_distance(), the harness's
  line_scroll_speed over NOTCH_PAN_ZOOM.

Distances that aren't notches (the 600-point page, the 53-point pixel step)
stay as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:56:34 -04:00
Dylan M. Taylor 5521968828 ci(sonar): don't cancel superseded runs on main, so coverage is published 2026-10-23 16:47:12 -04:00
aiongg 7aaa59712a Merge main into integration-batch-7 2026-10-23 20:37:05 +00:00
aiongg 84a2aa9b03 Merge pull request #8980 from aiongg/panic-hunt-fallback-heif
xtask: the panic hunt without nextest builds with the HEIF decoder
2026-10-23 16:36:09 -04:00
Gert Pellin e86b09f2dd Path Selection and Direct Selection edit the saved path selected in the Paths panel (#8478)
The saved path picked in the Paths panel was drawn as the target path
(#6550), but none of the path tools looked at it: Path Selection only
moved a vector mask, a shape path or the work path, and Direct Selection
and the anchor tools only hit those too. A PSD's "Path 1" could be seen
but not selected or changed.

Direct Selection gets a PathRef::Saved target (the path's index, sent to
the engine by name) after the layer path and before the work path, and
Path Selection and Free Transform Path target the selected saved path the
same way. The engine's path.* commands already took a saved path's name.
2026-10-23 22:35:13 +02:00
Jeremy YaoandClaude Opus 5.5 9232f2da4d Merge branch 'main' into feature/animation-effects
Brings in 72 commits from main (bde13687). Two conflicts:
- apps/photocraft-web/Cargo.toml: main added the web-sys RequestMode feature;
  the list is main's plus this branch's MediaQueryList.
- crates/ui-egui/src/prefs_ui.rs: main deleted the translation-coverage test
  preference_labels_are_translated (c3aa3f9e, missing translations are now
  reported by xtask ci); this branch had only adjusted it, so it goes.

docs/scorecard.md is regenerated; it differs from main only in UI-217-10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:23:55 -04:00
Finn NewickandClaude Opus 5.5 8a658316d5 fix(ui): draw only document-shaped filter previews on the CPU canvas
Review of #8978:
- A preview whose dimensions change (Image > Rotation) would have been
  stretched over the document's bounds by the CPU canvas, so it draws
  only previews the document's size, reduced by their proxy factor
  (preview_fits); others keep today's behaviour there.
- "Reduced" (no detail texture, whole redraws) is the proxy factor
  k > 1, not a size difference, so a full-resolution preview keeps the
  detail texture of a large document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:16:53 +01:00
aiongg 8debb6c420 xtask: the panic hunt without nextest builds with the HEIF decoder 2026-10-23 20:10:26 +00:00
dependabot[bot] cfb061c46a ci(deps): bump the actions group across 1 directory with 3 updates
Updates the requirements on [actions/checkout](https://github.com/actions/checkout), [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) and [actions/upload-artifact](https://github.com/actions/upload-artifact) to permit the latest version.

Updates `actions/checkout` from 4 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

Updates `dtolnay/rust-toolchain` to b725eda525362e7cf34af9a7243cac1e3f01a7ec
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](https://github.com/dtolnay/rust-toolchain/commits/b725eda525362e7cf34af9a7243cac1e3f01a7ec)

Updates `actions/upload-artifact` from 4 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: dtolnay/rust-toolchain
  dependency-version: b725eda525362e7cf34af9a7243cac1e3f01a7ec
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-23 20:10:08 +00:00
aiongg bde136874f Merge pull request #8970 from aiongg/xtask-ci-gate
CI: cargo xtask ci is the gate, and the workflow runs it
2026-10-23 16:07:24 -04:00
Finn NewickandClaude Opus 5.5 1feac77398 fix(ui): show a filter dialog's preview on the CPU canvas
With Preview on, the canvas showed the document unfiltered whenever it
drew through the CPU canvas: a mirrored or pixel-aspect-corrected view,
a machine without a usable GPU, or a GPU fallback. Only the GPU canvas
branch and the channel views asked for the filter preview. The CPU
canvas now draws its result too (filter_channel_preview); a zoomed-out
proxy covers the document at its own size, so its texture is redrawn
whole and has no detail texture.

Fixes #8972.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:04:38 +01:00
Dylan M. Taylor f3f2acc5ec Merge pull request #8960 from dylanmtaylor/security/gpu-plan-and-ui-swatch
security(gpu,ui-egui): bound clipped group planning; pattern swatch sampling
2026-10-23 15:52:58 -04:00
Dylan M. Taylor 597ea53023 Merge pull request #8958 from dylanmtaylor/security/plugins-host-hardening
security(plugins): host keys, band count, start fuel, FIFO open
2026-10-23 15:52:53 -04:00
Dylan M. Taylor 697aaf3f49 Merge pull request #8947 from dylanmtaylor/security/codecs-truncated-scan-icc
security(codecs): bound truncated JPEG recovery; count WebP frame ICC copies
2026-10-23 15:52:48 -04:00
aiongg 4b51647955 Merge remote-tracking branch 'upstream/main' into xtask-ci-gate
# Conflicts:
#	xtask/src/main.rs
2026-10-23 19:44:29 +00:00
aiongg 1ecb61db42 Merge pull request #8964 from aiongg/translation-gaps-pass
Tests: missing translations don't fail; xtask ci lists them
2026-10-23 15:43:33 -04:00
Dylan M. Taylor 6ca5bf359d security(compose): bound dense working sets and nested Blend If evaluation (#8949)
* security(compose): bound dense working sets and repeated group evaluation

Smart-filter mixing and stroke fitting work tile by tile instead of over the
union of sparse surfaces; render_layer admits its rect like render; hidden
layers no longer disable the proxy and uniform-area shortcuts; Blend If
groups nested deeper than two are judged by their result, so nesting costs
polynomial instead of exponential work; effect builds past an absolute byte
cap are skipped.

* CodeRabbit #8949: exact tile skips in filter_mask, allocated-tile scan in fit_stroke, contrasting backdrop in the nested-group test

- filter_mask mix/unmix: bare tiles (no tiles on either side) skip for
  non-alpha formats too when the two surfaces' default pixels are equal;
  differing defaults still get processed, so the clone's default pixel is
  never left wrong under a non-unit mask
- shape_split fit_stroke: scan the union of the three surfaces' allocated
  tiles (exact skip when all three defaults are transparent) instead of
  every tile of a 300k-canvas document; non-transparent defaults fall
  back to the full scan
- tests: the nested-groups assertion now uses a black backdrop so the
  asserted white can only come from rendering through the group chain

fixes CodeRabbit review comments (major/minor) on filter_mask.rs:27,29,
shape_split.rs:126, tests.rs:2354

* compose: skip a BTreeSet in fit_stroke — a sorted Vec compiles under the wasm toolchain (E0599 on ::drain there)
2026-10-23 15:33:01 -04:00
aiongg a75a414310 CI: cargo xtask ci is the gate, and the workflow runs it 2026-10-23 19:29:31 +00:00
Dylan M. Taylor ecd1a692a3 security(algo): bound working sets sized by caller-controlled extents (#8946)
* security(algo): bound working sets sized by caller-controlled extents

Zero-width inpaint grids, content-aware fill mosaics of turned thin images,
Liquify fields over huge canvases, tiny-scale reduction weights, warp tile
bookkeeping and per-tile source footprints, and windowed filters whose halo
follows an unclamped radius or a stacked Filter Gallery reach all asked for
memory sized by file or parameter input. Each is now bounded; halo
arithmetic saturates instead of overflowing.

* security(algo): budget variants by dimensions, size-check footprints first, widen the tile-halo maths

CodeRabbit follow-up:
- fill_cow settles the mosaic budget on variant dimensions only, so a
  variant's image and mask buffers are not built when the mosaic would
  exceed MAX_MOSAIC_PIXELS (complete falls back to the image itself).
- warp validates the footprint's pixel area against MAX_FOOTPRINT_PIXELS
  before src.has_tiles_in, so an oversized footprint returns without the
  tile-grid scan.
- auto_tile widens the input-derived halo arithmetic to i64 and clamps
  before the cast, so an i32::MAX radius cannot overflow in debug builds
  and the 2048 tile cap stands.

* fix(algo): drop the duplicate mosaic_size call left behind in fill_cow

The variant-budget rework kept both the new dimensions-based budget and
the old variants-based one; the old call no longer compiled after
mosaic_size started taking dimensions. Keep the comment that explains
the fallback.
2026-10-23 15:22:24 -04:00
Dylan M. Taylor a09c0ce85f test(gpu): match the planning error instead of err().expect() 2026-10-23 15:21:47 -04:00
Dylan M. Taylor 143c3977c2 Merge pull request #8959 from dylanmtaylor/security/cms-psd-raw-vector-parsers
security: bisect table/stop lookups; charge ICC curves; bound PSD/RAW buffers
2026-10-23 15:20:40 -04:00
Dylan M. Taylor 5b93901779 Merge pull request #8956 from dylanmtaylor/security/ipp-reply-deadline
security(ipp): total reply deadline, resumable chunk walk
2026-10-23 15:20:37 -04:00
Dylan M. Taylor 7d4c7f3889 Merge pull request #8953 from dylanmtaylor/security/raster-doc-sparse-tiles
security(raster,doc): tile counts, shared rebuilt tiles, slice merge index
2026-10-23 15:20:33 -04:00
Dylan M. Taylor a691aaf65b codecs: use u32 in the padded-truncated-JPEG test's bounds arithmetic (u64: From<i32> does not implement — E0277) 2026-10-23 15:08:50 -04:00
aiongg 437b012794 Merge pull request #8951 from aiongg/shared-gate
CI: the Linux gate runs through the suite's shared gate workflow
2026-10-23 15:08:49 -04:00
aiongg c3aa3f9e51 Tests: missing translations don't fail; xtask ci prints them
Delete the coverage tests, the per-language parity checks and the tests
of one language's exact wording. Catalog integrity, placeholder and
plural-form checks stay, as do the engine tests (locale resolution,
plural rules, fallback, language scoping, drawing in a language); those
compare against tr() or the plural rule rather than catalog wording.
Docs describe the report instead of a failing test.
2026-10-23 19:07:23 +00:00
aiongg cb297eeac1 xtask: i18n-coverage lists missing strings; ci prints them last
The report prints, per language, the source keys its catalog lacks (one
line for a language with none). `cargo xtask ci` runs it as its last step
and never fails on it: a missing translation shows in English. A report
that can't run prints a warning.
2026-10-23 19:07:23 +00:00
midasdf 7d997905df Merge remote-tracking branch 'origin/main' into jp/print-paper-sizes 2026-10-24 04:05:41 +09:00
Dylan M. Taylor 75f5a9c126 packaging: use [[ for bash conditional tests (SonarCloud S7688) (#8914)
* packaging: use [[ for bash conditional tests (SonarCloud S7688)

SonarCloud flags every bare [ conditional in bash scripts under packaging/ as a reliability smell (rule S7688). Convert the flagged [ ... ] tests to [[ ... ]]: safer word-splitting and no glob surprises, same semantics for these string and file tests.

* packaging/web: parse size overrides as base 10 under [[
2026-10-23 15:03:12 -04:00
Hartmut NörenbergandClaude Opus 5.5 b0b100643b fix: waiting Remove strokes keep the brush they were drawn with (#8923 review)
A waiting stroke (Remove after each stroke off) was tinted with the brush it
was drawn with but removed with the brush at ↩, so changing the brush in
between made the tint and the removal disagree.

- `paint.remove`: a `strokes` entry may be `{"points", "size"?, "hardness"?,
  "spacing"?}`, which override the call's for that stroke; a plain point
  list still takes the call's.
- The UI keeps each waiting stroke as such an entry with the brush it was
  drawn with; its tint (`stroke_brush` of it) and its removal both use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:54:19 +02:00
Hartmut NörenbergandClaude Opus 5.5 04dd3d5b63 fix(ui): the options-bar brush chip draws the brush's own tip (#8936)
The chip drew eight concentric circles from `hardness` alone, with an
ad-hoc ramp, so it was always round and didn't show the engine's falloff.
It now draws `brush_preview::tip_texture`, as the Brush Preset picker's
thumbnails do: `dab_coverage` for a round tip's hardness, its angle and
roundness, a sampled tip's bitmap. `panels::brush_tip` is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:53:42 +02:00
Dylan M. Taylor a8983a4060 security(codecs): budget truncated JPEG scans by scan data, document the animated WebP ICC charge
CodeRabbit follow-up:
- data_end counts the scan-data bytes it crosses, and decode's
  truncated-input bound is measured on those, not on bytes.len(): APP
  padding padded before the scan used to charge the budget without
  describing one more pixel.
- a regression test builds a truncated JPEG with ~256 KiB of complete
  COMMENT padding whose patched 20000x20000 frame was admissible under
  the file-length bound, and verifies padding alone cannot admit it
  (while the same file at its real size still recovers).
- Limits::max_alloc docs state the animated WebP charging, next to the
  PNG text/XMP sentence.
2026-10-23 14:44:28 -04:00
Dylan M. Taylor b20ccefffb security(gpu,ui-egui): bound clipped pass-through planning; sample pattern swatch pixels directly 2026-10-23 14:41:54 -04:00
Dylan M. Taylor 78ae50f7b2 security: bisect flat-table and gradient-stop lookups; charge ICC curve samples; bound PSD planes, RAW ljpeg retention and TIFF dump preview 2026-10-23 14:41:53 -04:00
Dylan M. Taylor 530e0b6b70 security(plugins): reject host routing keys, bound bands and start fuel, open without blocking on FIFOs 2026-10-23 14:41:52 -04:00