Commit Graph
4110 Commits
Author SHA1 Message Date
ljkx bf4b20b025 Quick Selection: a frame active keeps reading the composite
A frame is a group too, but the reference application was not measured
with one active, so it keeps today's behaviour, as an artboard does.
2026-11-13 11:43:08 +01:00
ljkx 9ff5aa8565 Quick Selection: a group active without Sample All Layers selects the brush disc (#12933)
A group has no pixels of its own, so with Sample All Layers off Quick
Selection fell back to the composite and a click selected a whole shape
from the layers inside. The reference application selects only the brush
disc there, as on a flat area. Quick Selection now reads a flat image for a
group (not an artboard) when Sample All Layers is off; with it on, and for
an adjustment layer, it reads the composite as before.
2026-11-13 10:46:01 +01:00
David Mann 7f93b2e0a8 Merge pull request #13502 from RickiNano/fix/13258-arrow-concavity-range
Line tool: arrowhead Concavity takes -50..50 % (#13258)
2026-11-13 09:40:47 +01:00
David Mann 1feede918e Merge pull request #12930 from rmsff/fix/pattern-stamp-indexed-refusal-12887
Refuse an RGB pattern with the Pattern Stamp in Indexed Color
2026-11-13 09:39:36 +01:00
David Mann dd444f859e Merge pull request #12644 from x-labb/fix-12010-gradient-alpha-method
fix(engine): a gradient's transparency follows the interpolation method (#12010)
2026-11-13 09:38:21 +01:00
RickiNano 675bd970f3 Line tool: fill the wedge a concave arrowhead leaves; whole-percent concavity (#13258)
With a base bent toward the tip, the shaft stopped where the bent base
crosses its edge and left the wedge up to the base's middle unfilled. The
shaft's end now follows the bent base to its middle, which fills the wedge
without reaching past the head's flanks, matching the reference outline.

shape.create / shape.edit round arrowConcavity to a whole percent, as the
gear and Properties fields do.
2026-11-13 06:11:29 +01:00
RickiNano a7990ee1f2 Line tool: arrowhead Concavity takes -50..50 % (#13258)
Concavity is a whole number from -50 % to 50 % of the head's length, as in
Photoshop. A negative value bends the head's base away from the tip, and the
shaft now ends where the bent base crosses the shaft's edge. Values outside
the range (documents, PSDs and settings saved with the old 0..100 range) are
clamped to the nearest end instead of failing.

- vector: arrow_line bends the base by concavity x length, both directions
- engine: shape.create / shape.edit take arrowConcavity in -50..=50
- io: PSD import keeps negative concavity, clamped to -50..50
- ui: gear and Properties Concavity are whole-number fields with the
  "Closest value inserted" alert; the gear menu stays open on clicks inside
  so a value can be typed
2026-11-13 06:11:29 +01:00
69ad84d9fb PR #12644: keep Smooth's transparency gradient at 97 stops
The colour and opacity bakes sample the same 97 positions, but apply_opacity cut every interval
into four (385 stops), and paint_gradient scans the stops for every pixel. Multiply the alpha in
at each shared position instead; other positions still go through apply_opacity. Raised by
CodeRabbit.

Co-Authored-By: x-labb <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 02:43:21 +01:00
FredApps e052eabf4b Merge pull request #3615 from vangel76/fix/smart-object-more-adjustments
Image Adjustments: Desaturate, Equalize and Replace Color on a smart object (#3606)
2026-11-13 02:24:05 +01:00
FredApps 33131bd78b Merge pull request #9462 from vangel76/perf/9432-camera-raw-single-decode
Camera Raw open: decode the raw once instead of three times
2026-11-13 02:22:52 +01:00
FredApps bb07d33e58 Merge pull request #9748 from vangel76/perf/9744-gamut-mask-parallel
perf(cms): compute the Gamut Warning mask in parallel
2026-11-13 02:20:16 +01:00
FredApps a2067ab456 Merge pull request #11152 from vangel76/perf/paint-stroke-budget
Paint: bound a stroke's cost and skip dabs outside the canvas (#11136)
2026-11-13 02:17:27 +01:00
David Mann 7529eaa98c Merge pull request #12097 from hnoerenberg/fix/magic-eraser-mode-refusals-12032
fix(engine): the magic eraser refuses Indexed and Bitmap documents
2026-11-13 02:02:32 +01:00
David Mann 2239ee9cb6 Merge pull request #11354 from chamber074/fix/clear-fill-fringe
Paint bucket: filling a cleared selection leaves no grey ring
2026-11-13 01:49:25 +01:00
David Mann f0985a5953 Merge pull request #11871 from DuBearte/fix/11762-count-keeps-coords
fix(engine): count markers keep their coordinates through Image Size, Canvas Size and Image Rotation (#11762)
2026-11-13 01:49:14 +01:00
David Mann 7aab944d70 Merge pull request #12471 from ljkx/actions-frame-from-layers
Actions: map Layer › New › Frame from Layers (#10723)
2026-11-13 01:40:03 +01: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
David Mann 127a83fbc9 Merge branch 'main' into fix/pattern-stamp-indexed-refusal-12887 (merge queue) 2026-11-13 01:01:52 +01:00
David Mann 721d5f521c Merge branch 'main' into fix-12010-gradient-alpha-method (merge queue) 2026-11-13 00:58:35 +01:00
David Mann 4a3bcb483a Merge branch 'main' into fix/clear-fill-fringe (merge queue) 2026-11-13 00:56:12 +01:00
David Mann b20eeb7a2e Merge branch 'main' into actions-frame-from-layers (merge queue) 2026-11-13 00:54:34 +01:00
David Mann 5a1a678af2 Merge branch 'main' into fix/magic-eraser-mode-refusals-12032 (merge queue) 2026-11-13 00:50:51 +01:00
David Mann 8b0c0fcf3d Merge pull request #13485 from ljkx/fix/12489-perspective-crop-mirrored-quad
algo, engine, ui: Perspective Crop commits a quad mirrored on one axis (#12489)
2026-11-13 00:50:39 +01:00
David Mann 594f392414 Merge pull request #13484 from ljkx/fix/13060-pencil-auto-erase-cmyk-inks
engine: Pencil Auto Erase probes a CMYK pick with the picked inks (#13060)
2026-11-13 00:50:27 +01:00
David Mann 604df4c636 Merge pull request #13481 from ljkx/fix/retouch-tools-refuse-indexed-bitmap
engine, ui: Burn, Sponge, Blur and Smudge refuse Indexed Color and Bitmap (#12673, #13033, #12656, #12967)
2026-11-13 00:49:28 +01:00
David Mann d66e141bd2 Merge branch 'main' into fix/11762-count-keeps-coords (merge queue) 2026-11-13 00:45:57 +01:00
vangel76 cbf459b1e0 Merge remote-tracking branch 'upstream/main' into HEAD 2026-11-13 00:29:54 +01:00
vangel76 0f01590b7a Merge remote-tracking branch 'upstream/main' into HEAD 2026-11-13 00:14:46 +01:00
vangel76 e2bd73c406 Merge remote-tracking branch 'upstream/main' into HEAD 2026-11-13 00:09:01 +01:00
vangel76 0a6655ffe6 Merge remote-tracking branch 'upstream/main' into HEAD 2026-11-13 00:05:44 +01:00
RickiNano e660b4906b Clear the clippy 1.100 lints that fail the gate on main (#13531) (#13535)
* Clear the clippy 1.100 lints that fail the gate on main (#13531)

Clippy 1.100.0 flags needless_range_loop in cms synth.rs (the gate
failure on main), algo photo_util.rs and an engine multichannel test,
and, on Windows only, needless_bool in format noreplace.rs, where the
cfg(unix) branch compiles away. Each loop now iterates the slice it
indexed, with the same values in the same order.

* Clear the Linux-only clippy 1.100 needless_bool lints (#13531)

paths_match in ui-egui and is_redirect in the app ended with a
cfg(not(windows)) branch that is just `false`, which clippy 1.100
flags on Linux. Each platform's branch now returns the whole
comparison: the same results, in the same order.
2026-11-12 14:56:57 -06:00
David Mann 134208d7fd Merge pull request #13371 from RickiNano/fix/13353-triangle-layer-name
Triangle tool: shape layers are named Triangle N, not Polygon N (#13353)
2026-11-12 21:21:04 +01:00
ljkxandClaude Opus 5.5 667a16dd47 Actions: keep make_from under the cognitive-complexity limit
The Frame from Layers branch pushed make_from to 31/30 once main's
Artboard mapping was merged in. Move the Make events another module
maps (type path, artboard, layer style, frame) into
delegated_make_from, tried in the same order as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 20:22:20 +01:00
Alan Rockefeller f75cfd5a56 Clone Stamp and Healing Brush clone from a source set in another open document (#10381)
* Clone Stamp and Healing Brush clone from a source set in another open document

Alt-clicking a clone source in one document and painting in another sampled the
painted document at the source point: a clone source slot held a point and a layer
but not the document. Slots now record the document (and its layer) they were set
in, and painting elsewhere samples that document, as in Photoshop.

- Engine: CloneSource gains `document` (serde default, so older slots read as
  "the document being painted"). Clone Stamp, Healing Brush, the live stroke, the
  Pattern Preview wrap and the brush-tip preview read the source document. Pixels
  are converted to the painted document's colour mode and depth like Edit > Paste
  (no ICC conversion, same as Paste). Current Layer / Current & Below use the
  layer the source was set on (that document's active layer if it was deleted);
  All Layers uses its composite.
- A source whose document was closed is an error asking for a new source, and
  stores no aligned anchor, instead of silently sampling the wrong document.
- cloneSource.set takes an optional `"document": index` (with `source`);
  cloneSource.list and set report each slot's document index.
- UI: the Clone Source panel names the source document (or says it was closed),
  the source crosshair isn't drawn over another document, and the brush preview
  cache includes the source document's revision.

Tests: engine tests for 8/16/32-bit with and without wrap, colour-mode conversion
(Gray > RGB16, RGB > CMYK), sampled layer, Healing Brush, live stroke vs commit,
preview, closed/invalid documents and cloneSource.set/list; a UI test that
Alt-clicks in one document and paints in another.

* Clone test: the aligned stroke past the smaller source document's edge leaves the destination unchanged

Review follow-up: with "aligned": false the stroke sampled inside the source, so it didn't test the edge its comment named, and nothing was asserted.

* Clone Stamp / Healing Brush: an empty Clone Source slot refuses to paint

clone_params fell back to ui.clone_source / ui.clone_offset when the active
slot was empty. Those coordinates carry no document, so after Alt-clicking in
one document and picking an empty slot in another, the stroke read the first
document's coordinates from the second one's pixels.

* fix: reject stale cross-document clone previews

* Clone Source: a copy opened after the source document closed isn't its source

A native copy keeps its document's ID, and a reopened document may keep its ID. A slot set in
a document that was then closed resolved that ID again once a copy was open, and painted from
the copy instead of reporting the closed source (CodeRabbit, clone_source.rs).

Session::close now marks the slots set in the closing document closed (CloneSources::forget_doc,
next to the other per-feature forget_doc calls). A closed slot refuses the stroke and its live
preview with the closed-source error, shows "Source: document closed" in the panel, reports no
`document` in cloneSource.list/set, and draws no overlay or crosshair, whatever document has the
ID now. Setting a new source clears it.
2026-11-12 18:00:54 +01:00
David Mann bc778cf4af Merge pull request #13442 from wanikhawar/fix/ellipse-path-menus-13235
Shape tools: Path operations, alignment and arrangement menus
2026-11-12 13:28:08 +01:00
David Mann 2b7977accb Merge pull request #9301 from DuBearte/feat/9269-black-white-auto
feat: Black & White Auto (#9269)
2026-11-12 13:27:10 +01:00
David Mann e165933772 Merge pull request #12430 from ljkx/atn-fit-image
Actions: map File › Automate › Fit Image (#10723)
2026-11-12 13:26:58 +01:00
ljkx 8943be1f4f engine, ui: Burn, Sponge, Blur and Smudge refuse Indexed Color and Bitmap (#12673, #13033, #12656, #12967)
The colour-mode check `mode_refusal` in retouch_cmds/dab.rs only knew
paint.dodge and paint.sharpen, so the other dab tools painted into Indexed
Color and Bitmap documents, where the reference application refuses with an
alert. Add their arms (both `dab_cmd` and the live stroke `LiveDab::begin`
call it, so nothing is previewed either), and name the tools in the canvas
`mode_tool_name` so a press opens the same alert with OK.

Multichannel and Duotone were not measured and keep today's behaviour.

Tests: one engine file per tool (refusal text from the command and the live
stroke, pixels and History unchanged; RGB/Gray/CMYK/Lab at 8/16/32 bits,
Multichannel and Duotone keep working) and a canvas alert test for all four.
The engine refusal tests fail without the fix.

Fixes #12673
Fixes #13033
Fixes #12656
Fixes #12967
2026-11-12 10:49:55 +01:00
ljkx b374e27b9d engine: Pencil Auto Erase probes a CMYK pick with the picked inks (#13060)
In a CMYK layer the stroke renderer paints a foreground picked as CMYK as
those exact inks (`StrokeRenderer::composite`, #4344), but `apply_auto_erase`
built its probe from the foreground's RGB stand-in converted back to CMYK.
For a rich black (or any ink mix the RGB doesn't round-trip to) the probe
never matched the stroke's own pixels, so a stroke starting on them painted
the foreground again instead of the background.

The probe now puts the picked inks in, under the same condition the
renderer uses (CMYK target, inks picked for this foreground). Commit and
live stroke share `apply_auto_erase`, so both are fixed.

Test: a rich-black pencil line in a CMYK document, then an Auto Erase
stroke starting on it paints the background, live and committed. It fails
without the fix.

Fixes #13060
2026-11-12 10:49:50 +01:00
ljkx ec55bed7b0 algo, engine, ui: Perspective Crop commits a quad mirrored on one axis (#12489)
`convex_quad` accepts a quad only when it is wound clockwise on screen, so a
Perspective Crop box flipped on one axis (an Alt+corner drag past the
opposite corner along x only), which is convex but wound counter-clockwise,
was drawn red and refused by `image.perspectiveCrop` and `quad_to_rect`. The
reference application commits it mirrored, each corner mapped as it lies.

Add `convex_quad_any_winding` (the same angle and area limits, either
winding; self-crossing, degenerate and non-finite quads stay invalid) and
use it for Perspective Crop only: the `corners` check and its error text,
`quad_to_rect`, and the overlay's validity check. The homography already
maps each corner onto its own rectangle corner, so the crop comes out
mirrored. Perspective Warp steps keep the clockwise-only `convex_quad`;
clicked corners are still sorted clockwise and commit upright; a box turned
180 degrees still commits upside down.

Tests: algo (a counter-clockwise quad maps corner to corner; bow ties,
collinear, sliver and non-finite quads stay refused), and the new
perspective_crop_mirrored_tests.rs (the measured Alt-drag case commits
mirrored and is drawn valid, the command takes counter-clockwise corners,
clicks commit upright, 180 degrees upside down, invalid quads stay red).
The mirrored cases fail without the fix.

Fixes #12489
2026-11-12 10:49:46 +01:00
Khawar Zamman Wani 4b16507738 Custom Shape: an operation adds the shape to the active shape layer
shape.create with addTo keeps a component's joined subpaths (holes)
joined, so a custom shape's hole doesn't become a component of its own.
2026-11-12 14:30:25 +05:30
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
David Mann eb3c99d653 Merge pull request #12237 from hectorviov/fix/perspective-crop-field-limits
Perspective Crop: W, H and Resolution clamp to the measured ranges with alerts
2026-11-12 03:01:42 +01:00
David Mann 54cde24340 Merge remote-tracking branch 'origin/main' into fix-9301 2026-11-12 02:45:44 +01:00
David Mann b554be38e7 Merge pull request #13303 from NaufalDzz/fix/issue-13244
Line tool: a drag is one History step named "Line Tool" (#13244)
2026-11-12 02:17:52 +01:00
David Mann 7755675ce7 Merge pull request #13342 from RickiNano/fix/13308-star-outer-corner-radius
Polygon tool: a rounded star rounds only its outer points (#13308)
2026-11-12 02:16:48 +01:00
Hector Villarreal bed2e22d8e Merge upstream/main into fix/perspective-crop-field-limits 2026-11-11 18:52:17 -06:00
David Mann 2bb1c3d0c6 Merge pull request #13141 from rmsff/fix/convert-point-drag-segment-12741
Convert Point: drag a segment as Direct Selection does
2026-11-12 01:35:41 +01:00
vangel76andClaude Sonnet 5.5 1190a1a88c Merge upstream/main into fix/smart-object-more-adjustments
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-11 22:39:48 +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