Commit Graph
12353 Commits
Author SHA1 Message Date
Dylan M. Taylor 56da11e907 Merge origin/main; guard NaN in gradient sample() 2026-11-11 23:51:56 +00:00
FredApps f1b5e7d727 CI: nightly release dry run (#13374)
release.yml also runs nightly on main with craft-common-actions' dry-run: every release build
except macOS, with nothing signed, pushed or drafted. Breakage that only the release build hits
(riscv64, Flatpak, FreeBSD, packaging) then shows up the next morning instead of on release
day, as it did on 11 Nov 2026.
2026-11-11 23:04:35 +01:00
Dylan M. Taylor abeb16c96b paint: refuse a sequential-dab stroke whose working copy is too large (#11070)
* paint: refuse a sequential-dab stroke whose working copy is too large

apply_dab_stroke read the whole rectangle enclosing a stroke's dabs into
two dense f32 copies (and a third for the mix), sized by the area
between the dabs rather than what they paint. Two distant points asked
for gigabytes on a sparse document.

Check the three planes against a 4 GiB budget (1 GiB on 32-bit) before
reading, and paint nothing past it.

* address review: apply_dab_stroke returns Result so over-budget dab strokes fail with 'stroke too large'

* fix tests: apply_dab_stroke returns a Result

* fix tests: handle the Result of the dab-stroke functions
2026-11-11 16:31:47 -05:00
Dylan M. Taylor f7771c8545 Engine: check dense working buffers against a budget before expanding sparse content (#10964)
* Engine: check dense working buffers against a budget before expanding sparse content

A native document stores only the tiles it holds, so a few distant tiles (or a
huge empty canvas) make a small file whose content bounds span trillions of
pixels. Several commands read those bounds, or the whole canvas, into dense
f32 buffers without checking the size first, and ran the process out of memory.

- allocation::check_dense refuses an area whose dense buffers would pass
  MAX_DENSE_BYTES (the Image Size allowance), before anything is allocated.
- Adjustments run through process_surface, Apply Layer Mask, channel sources
  (Apply Image / Calculations / Load Selection), face detection and Multichannel
  conversion (both directions) check their buffers first.
- Auto-Blend checks the final work area too, not only the layers' union.
- Liquify's selection blend works over the part of the content the selection
  reaches, on a copy of the old pixels, and checks that area.
- Floating a selection visits only stored source or selection tiles when a
  default is empty, and checks the full grid otherwise.
- Frame from Layers and the Frame tool fill their mask without a dense buffer
  and check its area.
- Image Size checks every surface's resampled content bounds, off-canvas
  pixels included, not only the canvas.

* cargo fmt

* address review: propagate budget error out of adjust_as_filter

* address review: budget merged CMYK channel planes, frame mask GRAY8 source, Duotone inks and the stored surface in Multichannel conversions

* address review: budget the Frame mask at its tile footprint and Auto-Blend stack pyramids

* address review: non-seamless stack blend skips the fusion pyramids in its budget; canvas refresh returns smart-object refresh errors

* address merge: take main's resample_doc signature in Bitmap; fmt

* address merge: Image Size over distant tiles is bounded by main's resample budget; drop the duplicate test

* address merge: keep brush_clear_background_tests test-only

* address CI: a smart object that cannot re-render keeps its resampled fallback (main's tested behavior); drop the refresh error propagation
2026-11-11 16:31:22 -05:00
Dylan M. Taylor 479f8e643e Actions: charge skipped steps to the playback budget, bound batch nesting, clip the set override (#10969)
* Actions: charge skipped steps to the playback budget, bound batch nesting, clip the set override

- actions.play charges every stored step of a call (run, disabled or before
  `from`) to the playback tree, and refuses a call that no longer fits before
  copying the action, so repeated calls to a large disabled child stop at the
  shared limit.
- file.automate.batch and runDroplet refuse to nest more than MAX_BATCH_DEPTH
  deep, checked before the droplet is read; nested batches charge the shared
  step budget like batches inside played actions.
- actions.load clips the `set` override to the importer's name limit before
  copying it into every action.

* address review: check the script step limit before charging skipped playback steps

* address review: nested batches keep the shared playback count, and nesting or playback limits fail the enclosing input

* address review: a limit stop inside a called action or nested batch fails the enclosing input

* address review: keep begin_playback's signature; the call that starts mid-action uses begin_playback_from

* address review: keep child results in limit failures, history after the script-limit check, trim a clipped set name, open-document batches carry the nesting state
2026-11-11 16:30:57 -05:00
Dylan M. Taylor 2e10342cdb fix(engine): authorization for nested scratch sessions and preset calls, CSV and PostScript text escaping (#11188)
* fix(engine): authorization for nested scratch sessions and preset calls, CSV and PostScript text escaping

* address review: Batch checks the authorization gate for each save point

* address merge: restore the #[test] attribute

* address merge: batch save points answer to the authorization gate in the rewritten batch

* address review: neutralize leading line feeds and full-width formula characters; test the preset command gate

* address review: check formula prefixes after leading spaces
2026-11-11 16:30:33 -05:00
Dylan M. Taylor dd19c295d1 fix(engine): bound sparse remap, scaled clone sources, path reads, export format, name lookups (#11181)
* fix(engine): bound sparse remap, scaled clone sources, path reads, export format, name lookups

* address review: read footage frames by Path so non-UTF-8 file names still import
2026-11-11 16:30:07 -05:00
Dylan M. Taylor ab4ba9f37c fix(codecs): checked sizes in encoders, EXR name lookup, FITS float limit, VP8 plane copies, EXIF thumbnail bytes (#11164)
* fix(codecs): checked sizes in encoders, EXR name lookup, FITS float limit, VP8 plane copies, EXIF thumbnail bytes

* address review: thumbnail range must be one SHORT/LONG tag and clear of IFD0

* address review: keep the TIFF header and Exif/GPS sub-IFDs out of the blanked thumbnail range

* address review: bound the Exif/GPS sub-IFD overlap scan with a total budget

* address review: keep the Interoperability IFD out of a blanked thumbnail range
2026-11-11 16:29:41 -05:00
Dylan M. Taylor f373ec181c fix(format,engine): limit zstd windows, set bundle modes via the handle, refuse symlinked presets (#11145)
* fix(format): limit zstd windows, set bundle permissions through the handle, refuse symlinked presets

* test(engine): create the symlink test's directory

* address review: preset writes never follow a symlink swapped in after the check

* address review: a zstd window past the limit is a limit error; replacing a link never reads its target's attributes

* test: replacing a link to a FIFO does not block
2026-11-11 16:29:17 -05:00
Dylan M. Taylor e6c9ce340b fix(io): charge importers for the whole tiles surfaces keep (#11144)
* fix(io): charge importers for the whole tiles surfaces keep

* test(io): size the affinity and SVG pixel budgets in whole tiles

* address review: charge retained tiles after prune, logical scratch in SVG peak check

* address review: charge only the tiles a raster layer keeps

* fix PsdImportBudget initializer after merging main

* address review: leave the multichannel tile budget to the PSD preflight

* address review: charge a shape cache for the tiles it keeps
2026-11-11 16:28:51 -05:00
Dylan M. Taylor b4ad74fda8 fix(gpu): cap plan accumulator slots and gradient lookup tables (#11061) 2026-11-11 16:28:26 -05:00
Dylan M. Taylor bbcb4b825a codecs: list each Cryptomatte layer once and index streams by name (#10978)
* codecs: list each Cryptomatte layer once and index streams by name

layers() cloned the cached stream list for every cryptomatte/<key>/name
attribute that named a layer, so many keys naming one layer (in any
case or _/- spelling) retained keys x channels strings. Streams are now
indexed by normalized layer name in one pass over the channels, each
layer's list is moved into the first key that names it, and later keys
naming the same layer are skipped (decode resolves a name to its first
layer anyway).

decode() searched the layer's stream list for every decoded channel;
it now builds a stream-name -> slot map once.

* address review: compare cryptomatte layer names normalized in decode

* address review: prefer exact Cryptomatte layer name

* address review: sort cryptomatte keys so layer names are stable

* address review: prefer the key with a usable manifest when keys name one cryptomatte layer
2026-11-11 16:28:01 -05:00
Dylan M. Taylor 648d742a50 fix(algo): bound EXIF text decoding, warp scans, gallery windows, inpaint sizes, pyramid depth (#11161)
* fix(algo): bound EXIF text decoding, warp scans, gallery windows, inpaint sizes, pyramid depth

* address review: gallery window budget no longer scales with the effect count; assert blended pixels in the level-clamp test

* address review: Filter Gallery window budget counts the working window and effect temporaries

* address review: empty Filter Gallery is not charged working buffers; document the warp scan skip

* address merge: multiband returns a Result; keep apply_tiled_with_impl under the complexity limit
2026-11-11 16:27:36 -05:00
Dylan M. Taylor 3b43cb451a fix(algo): hold raw filter parameters to their ranges (Water Paper, Box Blur, Lanczos, Camera Raw noise) (#11199) 2026-11-11 16:27:11 -05:00
Dylan M. Taylor 556382bab8 fix(ui-egui): bound the RAW re-read and treat symlinked names as taken in batch export (#11204)
* fix(ui-egui): bound the RAW re-read and treat symlinked names as taken in batch export

* address review: refuse an oversized RAW file from its length and reserve the read buffer fallibly

* address review: lower the RAW re-read ceiling to the decoder's 2 GiB allocation limit
2026-11-11 16:26:46 -05:00
Dylan M. Taylor b01e6c0270 Save: a replacement in another group does not widen group access (#11232)
* Save: a replacement in another group does not widen group access

* address review: set the group before copying extended attributes; skip the group test when the original's group is not assignable

* address review: copy the permissions (minus group bits) when the group lookup fails
2026-11-11 16:26:21 -05:00
Dylan M. Taylor c6a71929ef fix(cms): charge decoded CLUT values against a per-profile budget (#11055) 2026-11-11 16:25:57 -05:00
Dylan M. Taylor d49ebf4a41 Camera Raw: read each source row once when building the preview proxy (#11064)
* Camera Raw: read each source row once when building the preview proxy

The proxy box-averages k x k blocks, with k chosen from the longer side
of the domain. Blocks past the last row re-read that row once per
missing row, so a one-row domain (a sparse document a pixel high and a
million wide) read the same row k times: quadratic in its width, on the
UI thread.

Read every source row once and weight the last one by the block rows it
stands for; the averages are unchanged.

* address review: accumulate camera raw preview rows in f64
2026-11-11 16:25:33 -05:00
Dylan M. Taylor 9f606d83d1 fix(compose): bisect gradient stops, evict oversized effect maps, skip empty distance transforms (#11056)
* fix(compose): bisect gradient stops, evict oversized effect maps, skip empty distance transforms

* address review: handle NaN gradient position in stop samplers
2026-11-11 16:25:08 -05:00
Dylan M. Taylor e4efca36aa fix(engine): apply the metadata choice to WebP Quick Export (#11058) 2026-11-11 16:24:44 -05:00
Dylan M. Taylor d51e4bce94 text: charge the rasterizer's output tiles, not only its pixels (#11047)
* text: charge the rasterizer's output tiles, not only its pixels

The renderer checked a layer's pixel count and working buffers, but its
output surface stores whole 256x256 tiles. An extreme transform of short
text gives a thin rectangle that crosses tens of thousands of tiles while
holding few pixels, so the tile storage far exceeded the budget.

Refuse a render whose output tiles exceed MAX_RASTER_BYTES.

* address review: charge text accumulator with output tiles

* address review: compute the accumulator size in u64
2026-11-11 16:24:19 -05:00
Dylan M. Taylor 46f6ec4ccf Escape control characters in log lines and diagnostic output taken from files and plug-ins (#11218)
* Escape control characters in log lines and diagnostic output taken from files and plug-ins

* address review: escape the plug-in load error and the atn_dump path before printing
2026-11-11 16:23:55 -05:00
Dylan M. Taylor bf162c2215 automation: save_bytes never reads linked files (#11233) 2026-11-11 16:23:30 -05:00
Dylan M. Taylor 5a935b2830 Place: refuse a scale that makes the placed image exceed the render pixel limit (#11229)
* Place: refuse a scale that makes the placed image exceed the render pixel limit

* address review: bound the rounded-up resampled size when placing at a scale

* address review: the oversized-scale error names the placing command
2026-11-11 16:23:05 -05:00
Dylan M. Taylor f6741eff4d macOS signing: decode the certificate into an exclusive temp file (#11028)
import-cert.sh wrote the decoded .p12 to a fixed name in the temp
directory. If another account had created that file first, the shell
redirection truncated and reused it, keeping its owner and mode, and the
signing key was readable to that account. Create it with mktemp.
2026-11-11 16:22:40 -05:00
Dylan M. Taylor 23c2b85a4f ci: use StepSecurity's maintained actions (#13337)
Each third-party action that StepSecurity publishes a secure drop-in
replacement for now uses that replacement, pinned to a commit with its
version as a comment. Versions follow what we used: the newest
StepSecurity release in the same major, or the closest major they
publish. dtolnay/rust-toolchain refs that named a toolchain (stable,
nightly, 1.76) become the replacement's `toolchain` input.
2026-11-11 16:02:46 -05:00
David Mann 63b641b55e Merge pull request #6413 from marmitoTH/fix/pen-undo-resumes-path
Pen: Undo after finishing a path gives it back to the Pen instead of deleting it (#6619)
2026-11-11 21:15:51 +01:00
David Mann 0549be857e Merge pull request #13171 from rmsff/fix/remove-locked-layer-alert-12552
Remove: alert on a pixel layer with Lock All
2026-11-11 21:08:34 +01:00
FredAppsandFredApps 8a909b2673 Release: PhotoCraft v0.23.0 on main (#13345)
Co-authored-by: FredApps <[email protected]>
2026-11-11 20:54:32 +01:00
David Mann 1247303e78 Merge pull request #13151 from rmsff/fix/remove-default-size-12548
Remove tool: 19 px brush after Reset Tool and on first use
2026-11-11 20:29:21 +01:00
David Mann c1b22bdaae Merge pull request #13217 from RickiNano/fix/13067-ruler-angle-f64
fix(ui): the Arbitrary angle rounds in f64 and keeps that value (#13067)
2026-11-11 20:22:26 +01:00
David Mann 5a7889d2f7 Merge pull request #13212 from RickiNano/fix/sampler-drag-cursor-13063
fix(ui): keep the Color Sampler cursor while a sampler is dragged (#13063)
2026-11-11 20:18:23 +01:00
rmsff c3de649306 Test the Remove tool's Lock All alert 2026-11-11 22:01:51 +03:00
rmsff f9632298f6 Remove: alert on a pixel layer with Lock All (#12552)
A Remove press on a pixel layer with Lock All opens the reference
application's modal alert "Can't use the tool because the layer is
locked." at once, instead of drawing the stroke and failing in the job.
A hidden target, a group, a type, shape, Smart Object or fill layer
keep today's behaviour (not measured), and the Brush's wording is
unchanged.
2026-11-11 22:01:40 +03:00
8ca9cf51d6 Pen resume (#6413): Step Backward/Forward, per-document Redo, redrawn drafts, Esc fallback
Fix-ups for the open review threads on #6413, after merging main:

- Edit > Step Backward / Step Forward and the History panel's items now
  step a Pen path the way Undo and Redo do (anchor by anchor, then the
  finish), through one shared hook, pen_history_step, and its enable rule.
- Finishing a path in one document no longer drops another document's
  record of a path that Undo gave back, so Redo then Undo there gives
  the path back again instead of deleting it.
- Redo no longer takes the same anchors redrawn in another mode (Shape
  instead of Path) for the draft that Undo gave back: the target counts.
- A draft the document refuses, which Esc keeps as the Work Path, is
  recorded too, so Undo gives it back to the Pen.
- Main's Enter now deselects the finished Work Path (#12892), so the
  tests that build up or carry on the Work Path end their paths with Esc.

Co-Authored-By: marmitoTH <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-11 19:58:23 +01:00
David Mann a89998e1ae Merge origin/main into fix/pen-undo-resumes-path (#6413) 2026-11-11 19:58:14 +01:00
David Mann 78e478adda Merge pull request #13278 from rmsff/feat/red-eye-canvas-menu-12577
Red Eye: canvas right-click opens the layer or selection menu
2026-11-11 19:57:11 +01:00
RickiNano 6513ce6e47 fix(ui): round the ruler's Arbitrary angle before the first frame (#13067)
The ruler pre-fill stored the raw straightening angle, and only a drawn
frame rounded it, so `ui.dialog.open` then `ui.dialog.confirm` with no
frame between them sent 32.1249984 instead of 32.12. Round it in f64 to
the field's two decimals where it is filled, on open and on Alt+Reset.
2026-11-11 19:36:48 +01:00
David Mann 7f148de825 Merge pull request #13150 from TrevorBrown-dev/feat/delete-anchor-live-shape-warning-12768
Delete Anchor Point: deleting a live shape's anchor asks first, with Don't show again (#12768)
2026-11-11 19:35:07 +01:00
David Mann f69cb2056e Merge pull request #13153 from rmsff/fix/clone-stamp-no-source-alert-12609
Clone Stamp: a press without a source point shows the reference's alert
2026-11-11 19:18:28 +01:00
David Mann 66d602933a Merge pull request #13264 from rmsff/fix/pen-mode-menu-entries-12906
Pen: Mode dropdown lists Shape, Path and a greyed Pixels
2026-11-11 19:18:14 +01:00
David Mann 0b6eb314c9 Merge pull request #13107 from rmsff/fix/warp-options-bar-details-12503
Warp: one-decimal Bend/H/V, shared commit and cancel tooltips, greyed reference point
2026-11-11 19:12:25 +01:00
David Mann a1a639c582 Merge pull request #13206 from davidmann4/docs/no-pr-screenshots-in-repo
Docs: before/after screenshots go in the PR description, not the repo
2026-11-11 19:08:11 +01:00
David Mann 5fb1dadc13 Merge pull request #13122 from rmsff/fix/convert-point-hit-tolerance-12748
Convert Point: hit an anchor within 5 points
2026-11-11 19:04:23 +01:00
Dylan M. Taylor 2be1d6e19d Merge pull request #13281 from storytold/chore/craft-update-6e03f65
Updates: take craft-update from craft-libs main at 6e03f65bf
2026-11-11 12:53:06 -05:00
Dylan M. Taylor 8452ec9bde Updates: take craft-update from craft-libs main at 6e03f65bf 2026-11-11 12:53:01 -05:00
David Mann 7ebaea05b6 Merge pull request #11577 from yoriswind/codex/actions-format-io-followup
Bound file read growth and publish files without replacement
2026-11-11 18:49:04 +01:00
David Mann 62748dfede Merge pull request #13116 from rmsff/fix/paint-bucket-refuses-bitmap-12536
Paint Bucket: refuse Bitmap documents with the reference's alert
2026-11-11 18:48:50 +01:00
David Mann 3678b35733 Merge pull request #10738 from Lcoding15/fix/decimal-comma-in-fields
Number fields take a decimal comma (#10729)
2026-11-11 18:47:21 +01:00
rmsff b04a707014 Test the Red Eye canvas menu 2026-11-11 20:23:03 +03:00