Commit Graph
537 Commits
Author SHA1 Message Date
David Mann 01a5b5a389 Merge pull request #15381 from davidmann4/perf/test-speed-quick-wins
Test speed: no font scan in test processes, CMYK profile once, raw-develop at one depth (#15377)
2026-11-17 16:49:07 +01:00
aiongg ed14e1c413 PhotoCraft on the craft UI framework (#15449)
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
2026-11-17 10:41:35 -05:00
David MannandClaude Opus 5.5 484483b691 test: build the CMYK test profile once, run large raw-develop sizes at one depth
- cmyk_flatten_profile: synthesise the test profile once per process and
  share one Arc, so CmykSpace's per-allocation cache builds the transforms
  once; exact() reads both rows from one run (4 documents, not 8).
- camera_raw GPU tests: the 858x572 and 1600x900 comparisons run at one
  depth each. The depth only changes the input quantization (8 and 16 bits
  both develop with float = false) and every depth runs at 171x113 above.
- cols_timing is a benchmark without assertions: ignore it like its
  siblings.
- compose: delete clipped_dissolve_is_binary_and_preserves_the_base_shape,
  a byte-identical copy of clipped_dissolve_opacity_fill_is_binary_and_
  preserves_base_shape (whose doc comment names both issues).

Part of #15376.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 02:03:03 +01:00
hnoerenberg d98386f43b test(engine): import craft_psd in the gaussian edge profile test
The shared PSD crate is craft_psd now. The test still imported photocraft_psd, so the engine test target did not compile on a merge with current main.
2026-11-16 08:25:49 +01:00
hnoerenberg 29d0068c08 Merge upstream/main into fix/gaussian-blur-edge-parity-11528 2026-11-16 01:31:39 +01:00
hnoerenberg 0b6c9d6700 Merge upstream/main into fix/gaussian-blur-edge-parity-11528 2026-11-15 16:27:43 +01:00
RickiNano 86d27993ee Assign Profile: greyed for Lab, Bitmap and Multichannel documents (#14238)
edit.assignProfile now has its own enabled check: disabled with no
document and for Lab, Bitmap and Multichannel documents, so the menu item
is greyed and a scripted run fails with "not available in <mode> mode".
RGB, CMYK, Grayscale, Indexed and Duotone (not measured) keep today's
behaviour, and Convert to Profile keeps has_doc, so it stays enabled for Lab.

The convert_profile_options helper no longer assigns lab-d50 to its Lab
document, which is now refused.

Fixes #14238
2026-11-15 14:39:15 +01:00
Dylan M. Taylor 13fe2864af Fix CI formatting, clippy, scorecard, and format routing regressions 2026-11-14 04:52:59 +00:00
Dylan M. Taylor 8c7544ed2a Use craft-affinity from craft-libs; remove crates/affinity 2026-11-14 00:16:50 +00:00
Dylan M. Taylor 040962a5b4 Merge photo-cms-port: use craft-cms and remove crates/cms (#13393) 2026-11-14 00:02:22 +00:00
MarekSpodBiedryandskylar 8631a92178 Rasterize: undo the layers already converted when a later step fails (#4974) (#5073)
* Rasterize: undo the layers already converted when a later step fails (#4974)

* Rasterize: roll back through the shared compound helper when a later layer fails (#4974)

* Test that a failed Rasterize keeps a clean document clean (#4974)

* Rasterize: undo the layers already converted when a later step fails, and refuse before a step starts when there is nothing to do (#4974)

* Format the rasterize rollback tests

* Rasterize: cover the All Layers and Layer Style refusals through the real commands

* Rasterize: name the history step after the variant, and test the rollback through the real commands (#4974)

---------

Co-authored-by: skylar <[email protected]>
2026-11-13 01:16:51 +01:00
Dylan M. Taylor 74330157cb Use craft-psd for PSD/PSB format code (#13414)
* Use craft-psd from craft-libs; remove crates/psd

* Regenerate the scorecard (28 crate roots)

* Take craft-psd at craft-libs 55d120f2

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Match brush import cap to shared decoder budget

* xtask: update layer fixtures after PSD extraction
2026-11-12 02:53:54 -05:00
Dylan M. Taylor fd943c466b Merge main into photo-cms-port; pin craft-cms to the head of storytold/craft-libs#858
main's one change to crates/cms since (#11055, the per-profile CLUT budget) is
already in craft-cms (storytold/craft-libs#815).
2026-11-11 23:18:18 +00: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 2b75a0092d Use craft-cms from craft-libs; remove crates/cms
craft-cms was extracted from crates/cms (storytold/craft-libs#779), and both
copies changed afterwards. storytold/craft-libs#PRNUM ports the 41 commits made
here since the extraction, so the shared crate now has everything this copy
had, and PhotoCraft depends on it.

craft-cms returns errors where the local crate panicked on caller input:
transforms, tables and LUT constructors return Result. Call sites propagate
the error where the function already returns one, and fall back where the
arguments are fixed by construction (each with a comment saying why).
Lut3d's fields are private there; the proof and HDR display table is built
with Lut3d::from_fn.

The pin is the head of the craft-libs branch and moves to main when that
pull request merges.
2026-11-11 19:41:51 +00:00
David Mann 00f9b7d60d Merge pull request #13106 from rmsff/fix/art-history-brush-depth-refused-12637
Art History Brush: refuse 16- and 32-bit documents with the reference texts
2026-11-11 14:25:30 +01:00
Tanish Manku 28d2b499b5 Merge pull request #11062 from yoriswind/codex/artboard-move-overflow
Reject cross-artboard moves whose required translation overflows
2026-11-11 00:27:05 -07:00
Tanish Manku 6c8140daf4 Merge pull request #10896 from yoriswind/codex/fill-dialog-mask-target
Fix Fill and Stroke for targeted masks
2026-11-11 00:24:24 -07:00
Tanish Manku dc855ae902 Merge pull request #6864 from hidoba/codex/curves-followup-fixes
Fix remaining grayscale Levels/Curves target mismatches
2026-11-10 23:57:32 -07:00
Tanish Manku c2e8c4db82 Merge pull request #6787 from ingling/spot-dot-gain
Color Settings › Spot: dot gain for spot channel and Multichannel ink previews
2026-11-10 23:57:09 -07:00
rmsff 6804a0b8da Art History Brush: refuse 16- and 32-bit documents with the reference texts
The brush works in 8-bit documents only: a 16-bit document with one
layer, a layered 16-bit document or a depth change after the source,
and a 32-bit document each get the reference application's alert text,
before anything is painted. A source of another colour mode gets the
reference text too. Tests that expected 16/32-bit painting now run at
8 bits.
2026-11-11 05:56:48 +03:00
David Mann 6a712d54c9 Merge pull request #12908 from hectorviov/fix/eraser-gray-background
Eraser and Fill: background swatch through the Grayscale document's grey profile (#11940)
2026-11-11 02:00:53 +01:00
David Mann d58afecac9 Merge pull request #12244 from ElNeMeR70/fix/gradient-live-drops-selection-12196
fix(engine): drop selection after masking a live Gradient Fill layer
2026-11-11 00:53:39 +01:00
Vlad Grankovsky 333566a616 Merge upstream main 609e2aa72 into curves follow-up 2026-11-10 19:51:17 +01:00
Hector Villarreal 7b20000052 Grayscale swatch through sGray, as agreed on the PR (#11940)
The reference's Eraser paints 173 for background RGB 0,200,0 in a Grayscale
document; the document's Dot Gain curve gives 153, so swatch_in_doc now
converts through the sRGB tone curve (sGray, 172-173) instead. Pixel
conversions keep the document's profile. The two Grayscale tests are no
longer ignored, and eraser_locked's Gray case checks the sGray value, since
the Brush's own conversion into Gray (not measured) is unchanged.
2026-11-10 08:37:07 -06:00
rmsff 6106c825e7 Red Eye: name the step Red Eye Removal Tool and record a click that changes nothing
A click that runs but changes no pixel (a blue pupil, a transparent area, an
empty layer, Darken Amount 0) now adds one unchanged history state instead of
the "no red-eye pixels" error, as in Photoshop. Non-RGB/Lab documents, channel
and mask targets, hidden layers and clicks outside the selection or the canvas
keep the error and add no state.
2026-11-10 13:56:00 +03:00
437cd7f0fe fix: brush hints keep a feathered mask's ring and the effects' reach (#9329) (#10104)
* fix: brush hints keep a feathered mask's ring and the effects' reach (#9329)

A command's damage hint (the bare dab) was intersected with the edit's
own damage, which `tile_damage` had grown by the mask's feather and the
layer's and enclosing groups' effects. The intersection cut that growth
off, so painting on a feathered layer mask left a stale soft ring around
each dab, and a dab's drop shadow was outside the reported damage.

`hint_damage` now grows the hint by the same rule first (`grow_hint`,
sharing `grow_in_layer` and `effects_reach` with `tile_damage` and the
group walk). The hint is still checked against the changed tiles as is.

The group-shadow test now cuts a hole at a tile's right edge, so its
shadow crosses into the next tile (it passed without the group's growth
before), and the clip-base test gains a dab at a tile edge.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix: brush hints skip the effects of layers that aren't drawn (#9329)

`grow_hint` grew a dab by the effects of every layer in the document,
hidden ones included, so a large drop shadow on a hidden layer widened
every `paint.stroke` dab elsewhere to all the tiles `step_damage`
reported, and each dab recomposited and uploaded that much.

It now skips layers the compositor skips, by the same rule as
`effect_layers`: a hidden layer, a clipped layer over a hidden base, and
everything inside a hidden group. A change there shows nowhere, and
every drawn layer still grows the hint as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* test: the group-shadow brush test goes through the hint (#9329)

`a_dab_inside_a_group_with_a_drop_shadow_damages_the_shadow` painted
with a plain `Session::edit`, so its damage came from `step_damage` and
never exercised `grow_hint`. It now paints with `paint.stroke`, and the
child carries a shadow of its own inside the shadowed group: the group's
shadow of the child's shadow lands past either shadow's reach alone, in
the next tile, so dropping the enclosing groups' reach from `grow_hint`
fails it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: FredApps <[email protected]>
Co-authored-by: FredApps <[email protected]>
2026-11-09 16:36:58 +01:00
Eng. Mahmoud Bek ElNemer 5fa708967f fix(engine): drop selection after masking a live Gradient Fill layer
Fixes #12196
2026-11-09 05:07:35 +02:00
David Mann 55498d45ba Merge remote-tracking branch 'origin/main' into pr-9077
# Conflicts:
#	docs/gaps.md
2026-11-08 18:55:24 +01:00
Vlad Grankovsky 3d57a9afeb Merge upstream main 6ab991571 into curves follow-up
Keep recorded channel initialization shared with Record Again and retain upstream Photo Filter and Action playback behavior.
2026-11-08 14:13:01 +01:00
Hector Villarreal 60e45bb926 Color Replacement: refuse RGB/32, Grayscale, Bitmap and Indexed documents (#11923)
paint.colorReplacement and its live stroke refuse the modes and depths
the reference application refuses, with its words: 32 bit per channel
RGB, Grayscale and Bitmap (only full color modes), and Indexed Color.
Nothing is painted and no history is added. RGB/8, RGB/16, CMYK and Lab
paint as before; cases that weren't measured keep today's behaviour.
2026-11-07 21:00:56 -06:00
David Mann d95faebaa3 Merge remote-tracking branch 'origin/main' into pr-9077
# Conflicts:
#	docs/gaps.md
#	docs/target-app-parity.md
2026-11-08 03:04:43 +01:00
Vlad Grankovsky 2ed691bcc5 Merge upstream main e6ba4aca4 into curves follow-up 2026-11-07 20:12:52 +01:00
yoriswind 99653a4626 fix(actions): preserve the Equalize dialog on recorded playback 2026-11-07 10:24:40 -08:00
7f09b2013d Merge current main into #9077 (Average on Smart Objects)
Resolves the status-line conflicts in docs/gaps.md and
docs/target-app-parity.md (both sides kept) and the module list in
crates/engine/tests/it/main.rs.

Co-Authored-By: arjen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 18:48:12 +01:00
Trevor Brown 5c49acf7c0 Merge remote-tracking branch 'upstream/main' into fix/magnetic-lasso-composite-11686 2026-11-07 09:39:38 -05:00
David Mann e18900e5fb Merge pull request #10443 from hectorviov/fix/replace-color-add-subtract
Replace Color: Add to Sample and Subtract from Sample (#6280)
2026-11-07 14:44:38 +01:00
yoriswind 6e38ee5760 Reconcile Artboard overflow tests and documentation with current main 2026-11-06 20:16:57 -08:00
Vlad Grankovsky 283de2c506 Merge upstream main 8df2b7a2e into curves follow-up 2026-11-07 01:27:10 +01:00
yoriswind 2e210c0aae Scope Actions tool recording guard to the active take 2026-11-06 13:40:05 -08:00
Trevor BrownandClaude Fable 5.1 3014737225 Magnetic Lasso: tests for following the visible composite (#11686)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-11-06 15:49:58 -05:00
Tom InglingandClaude Opus 5.5 721e003b3f Merge main: spot inks in RGB/CMYK previews (#10276) keep the Spot dot gain
main moved the ink formula into `Ink::apply` / `overprint` and prints the
spot channels of RGB and CMYK documents as inks in the channel view instead
of a tint. The Spot dot gain now lives there: `overprint` (the Multichannel
composite and every on-screen ink preview) and the channel view's inks add
`spot_dot_gain()` through `Ink::apply_with_gain`; `Ink::apply` and the saved
PSD thumbnail print inks as stored. The new paged-canvas caller of
`texture_key` (viewport_pages.rs) passes the document, so its pages follow
the ink preview like the other textures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 15:47:16 -05:00
yoriswind 5f480238d0 Reconcile five Classic Actions commands with current main 2026-11-06 09:29:48 -08:00
FredApps aee46a2fc6 Merge remote-tracking branch 'origin/main' into fix/10164-final-prune-u2 2026-11-06 17:28:48 +01:00
David Mann ec5eb1e2d0 Merge commit 'refs/fixprs/main' into HEAD 2026-11-06 10:21:59 +01:00
Khawar Zamman Wani 123b2032c4 Web build: Place runs a slice per frame, so a large PNG no longer freezes the page (#10164, rebased onto main)
The remaining commits of the stack, applied on top of the squash-merged #10147:

- PNG decodes in resumable steps of rows (PngDecodeRows, shared with decode_rows)
- PNG imports as a document in resumable steps (io PngImport, text metadata and
  document build in bounded steps)
- Jobs can run a slice at a time where there are no threads (StepWork,
  cooperative sessions, Session::poll_jobs)
- Place decodes, flattens and resizes in slices (PlaceSteps), reading a path
  and keeping the frame, memory gate and typed memory-budget errors main has
- The web build places dropped and picked files a slice per frame, with a
  bounded place inbox
- A measurement of the stepped place; docs for jobs without threads
2026-11-06 08:51:17 +05:30
Hector VillarrealandClaude Opus 5.5 be4a915161 Replace Color: Lab bounds refuse subtracted samples; panic_hunt covers them (tanish2k09 review)
Main's Lab bounds (#10765) refuse RGB samples, subtractPoints and order
included. A test pins that for subtractPoints and order, and panic_hunt
now sends malformed and far-off subtractPoints, points and click orders,
also with Lab bounds, to every command.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 21:15:00 -06:00
David MannandClaude Opus 5.5 99b93f82da Batch 18 (CodeRabbit nitpicks): crop test checks the active layer's covered pixels; Esc test goes through the shortcut handler
- #11458: the straight-crop rows also check that the active layer's pixels
  inside the old canvas are the plain crop's, so a fill that recolours them
  fails.
- #11295: the Esc case sends the key through shortcuts::handle instead of
  calling cancel directly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 04:04:26 +01:00
yoriswind d58701ddff Merge current main into the Actions preservation candidate 2026-11-05 18:31:30 -08:00
David Mann 3af79c0cb7 Merge main 9b02eac2c4 into integration batch 18 2026-11-06 02:14:46 +01:00