Commit Graph
218 Commits
Author SHA1 Message Date
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
Dylan M. Taylor 3bae275d0a Refresh Base64 codec removal and retain plugin alphabet compatibility 2026-11-15 11:54:15 +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
David Mann 968ba560e5 Merge origin/main into PR #13124 2026-11-13 11:16:48 +01:00
vangel76 0a6655ffe6 Merge remote-tracking branch 'upstream/main' into HEAD 2026-11-13 00:05:44 +01:00
Ian ab01524630 Merge main and reconcile Clone Stamp source handling
Integrate the merged cross-document implementation while retaining picked-layer sampling, ICC and source coverage, preview strength, and offset fixes. Preserve upstream explicit preview mappings and closed-document state, and adapt regression fixtures and mode/layer lifetime expectations.
2026-11-12 13:21:56 -05:00
Dylan M. Taylor 41d4b162f2 Merge main into photo-cms-port 2026-11-12 00:57:42 +00:00
Ian 42616775b5 Avoid duplicate alpha checks in Normal retouch blending 2026-11-11 18:36:46 -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
Ian d209bb863e Keep healing source coverage and clone overlays consistent 2026-11-11 18:12:44 -05:00
Dylan M. Taylor f33bdad496 paint: two stroke tests check the result the stroke now returns
apply_color_replacement and apply_mixer_stroke return a Result since #11070.
Two tests that landed on main after that PR's CI ran still dropped it, so
clippy's unused-must-use lint fails the gate on main.
2026-11-11 22:31:50 +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
vangel76andClaude Sonnet 5.5 c0af6a1742 Merge upstream/main into perf/paint-stroke-budget
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-11 22:25:55 +01: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 56004e9460 Merge pull request #12259 from hectorviov/fix/color-replacement-anti-alias-off
Color Replacement: a hard tip edge with Anti-alias off
2026-11-11 14:53:28 +01:00
1b82d3397d Merge origin/main into #12259 (Anti-alias off reach test combined with main's Lab Color recolor)
Co-Authored-By: Hector Villarreal <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-11 13:33:52 +01:00
4b9678ff00 Merge origin/main into #12285 (keep both test modules)
Co-Authored-By: Hector Villarreal <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-11 13:33:52 +01:00
Tanish Manku 0e2d24db26 Merge pull request #10010 from artman67/faster-big-brushes
Brush: big imported brushes paint about twice as fast, with the same pixels
2026-11-11 00:12:31 -07:00
ljkxandClaude Fable 5.2 cd81562c4e Merge main into feat/smudge-tool-mode
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-11 01:33:13 +01:00
David Mann c4b4afc0a9 Merge pull request #12169 from DuBearte/fix/11886-airbrush-rate
Airbrush: about ten dabs a second while held, and a click lays two dabs
2026-11-11 00:50:39 +01:00
ljkxandClaude Fable 5.2 77609e3625 Merge main into feat/smudge-tool-mode
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-11 00:15:22 +01:00
Dylan M. Taylor 0ff76d6f0c fix(paint): cap the total steps one stroke emits (#11195) 2026-11-10 17:57:21 -05:00
ljkxandClaude Fable 5.2 aca4544af5 Smudge: Mode dropdown in the options bar (#12959)
The Smudge options bar gets Mode: (Normal, Darken, Lighten, Hue,
Saturation, Color, Luminosity; tooltip "Painting Mode"), first after the
brush controls. `paint.smudge` takes `mode` and refuses any other name;
the stroke sends it and Reset Tool sets Normal.

With a Mode other than Normal each dab's smudged colour is blended with
the pixel from before the stroke the way a paint colour would be, and
laid down through the tip's coverage. 8-bit RGB only: other colour modes
and depths were not measured and keep smudging as Normal. Blur and
Sharpen are unchanged.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-10 23:15:42 +01:00
Hector Villarreal 1beefac1ed Merge main into fix/mixer-load-solid-colors (conflicts as asked on the PR) 2026-11-09 23:46:36 -06:00
artman67andClaude Opus 5.5 55a417afb4 Merge main: keep main's bilinear texture wrap test beside fast_floor's
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 19:17:54 -05:00
David Mann 009b93c5ed Merge pull request #12381 from RickiNano/fix/bg-eraser-cmyk-inks-12352
Background Eraser: a CMYK document compares against the picked inks (#12352)
2026-11-09 20:24:59 +01:00
David Mann b479d94e21 Merge pull request #11895 from RickiNano/fix/11887-catch-up-on-end-default
fix(paint): Catch-up on Stroke End starts unchecked (#11887)
2026-11-09 20:24:32 +01:00
RickiNano 658609f82c Background Eraser: picked swatch inks compare at the stored precision (#12352)
Typed inks between two 8-bit levels (30% cyan is stored as 77/255) missed
the pixels filled with them at a low Tolerance and left partial alpha.
Round them as the foreground already is.
2026-11-09 16:25:28 +01:00
RickiNano 44a3c25a9e Background Eraser: a CMYK document compares against the picked inks (#12352)
Protect Foreground Color and Sampling Background Swatch converted the
foreground and background from their sRGB stand-ins, so a colour picked
as CMYK inks (100/0/0/0) came back as other inks and pixels painted with
exactly those inks were erased or missed. BgEraseSettings now carries the
picked inks, as BrushSettings::color_cmyk does, and a CMYK target compares
against them while the colour is still that sRGB colour. RGB, Gray and Lab
documents are unchanged.
2026-11-09 07:00:26 +01:00
RickiNano cf2f496660 Format the #11887 tests 2026-11-08 22:01:12 +01:00
RickiNano 080d10c500 Brush: Catch-up on Stroke End starts unchecked, as in Photoshop (#11887)
Smoothing::default() now has catch_up_on_end: false, so after Reset Tool
a smoothed stroke ends short of the release point unless the option is
turned on. Tests that relied on the old default set it explicitly.
2026-11-08 22:01:12 +01:00
Hector Villarreal 8275459508 Mixer Brush test: at Flow 50 an empty-layer dab is half the Flow 100 dab, at Mix 50 and Mix 90 (davidmann4's measurement on #11944)
davidmann4 measured the reference application on #11944: on an empty layer,
Wet and Mix change nothing, and the centre alpha is about 251 x Flow / 100
(126 at Flow 50, 251 at Flow 100, at Wet 80 with Mix 50 and Mix 90). This
test pins that row.
2026-11-08 14:42:07 -06:00
David MannandClaude Opus 5.5 f72fd4649e Merge origin/main into #12153: Protect Foreground narrows the graded Tolerance
main brought the graded erase (#11901), decontamination (#11902) and graded
Find Edges (#11904) into bg_erase.rs, and kept Protect Foreground Color on the
largest per-channel difference to the foreground. Resolved by narrowing the
Tolerance itself: with protection on, graded_weight runs on min(Tolerance,
distance from the sample to the foreground); a foreground equal to the sample
erases nothing. This replaces the distance stretch from before the merge.

Measured in the reference application with the issue's drag, foreground off in
two channels: (100,140,40) gives 0 32 75 112 156 196 238 255 (no protection),
(150,90,40) the block-5 row, (230,90,40) and (200,90,70) a Tolerance of 50
levels. So the narrowing uses the sample-match distance (largest increase plus
largest decrease), not the largest per-channel difference: the test on main
that kept the sampled colour for a two-channel foreground is replaced by these
rows. The reference rows of #11903 now match within 8 levels, 8- and 16-bit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 19:44:24 +01:00
Hector Villarreal 9390637f82 Mixer Brush: the load menu's and the setting's comments list Load Solid Colors Only and its key (eliets2 review on #12295) 2026-11-08 11:06:19 -06:00
Hector Villarreal 6040899fe6 Pin the white to the gap and full replacement at y 139 in the Anti-alias tests (eliets2 review on crates/paint/src/replace_anti_alias_tests.rs) 2026-11-08 11:02:46 -06:00
Hector Villarreal 3ff6865830 Color Replacement: a soft tip with Anti-alias off replaces fully over the same reach as with it on (eliets2 review on crates/paint/src/replace.rs, color_replacement_effect) 2026-11-08 11:02:46 -06:00
Hector Villarreal f7b4bba4ab Mixer Brush tests: the empty-layer dab is black, and the mixed click is red and black only, opaque (eliets2 review on #12285) 2026-11-08 10:44:47 -06:00
David Mann b11e866957 Merge branch 'fix/11904-bg-eraser-find-edges-graded' into fix/11902-bg-eraser-decontamination
# Conflicts:
#	crates/paint/src/bg_erase.rs
2026-11-08 15:14:07 +01:00
David MannandClaude Opus 5.5 1d5d94cf17 Background Eraser: document that Find Edges grades in this tool
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 15:13:28 +01:00
David Mann ec76a8f08a Merge branch 'fix/11901-bg-eraser-graded-alpha' into fix/11904-bg-eraser-find-edges-graded 2026-11-08 15:13:00 +01:00
David MannandClaude Opus 5.5 cbdce347f0 Background Eraser: Protect Foreground keeps the per-channel distance; tolerance doc
Only the sample match uses the measured increase-plus-decrease distance (#11901).
Protect Foreground Color keeps today's largest per-channel difference, as #11903
asks for its unmeasured cases. The tolerance doc describes the new distance and
the graded falloff.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 15:12:49 +01:00
David Mann a65a23f829 Merge remote-tracking branch 'origin/main' into fix/11901-bg-eraser-graded-alpha 2026-11-08 15:10:31 +01:00
Hector Villarreal ea3afd57a6 Mixer Brush: Load Solid Colors Only in the load menu (#11952)
The Current Brush Load menu gets a separator and the checkable entry Load
Solid Colors Only, off by default and kept with the Mixer Brush's own brush
(MixerSettings.solid_colors_only). With it on, Alt+click loads the one
colour under the hotspot (paint.mixerLoad) instead of the sampled tip image;
off, it loads the tip image as before.
2026-11-07 22:56:23 -06:00
Hector Villarreal d4db0608d8 Mixer Brush: a wet click on an empty layer is a full-strength dab (#11944)
When a dab picks up nothing (a transparent canvas under a clean pickup),
the reservoir is no longer cut to amount x (1 - mix x wet): the load is
deposited at full strength, as a dry dab. A click on a colour still mixes
it in as before.
2026-11-07 22:19:40 -06:00
Hector VillarrealandClaude Opus 5.5 1cf1e15da5 Keep Lab/16 Color Replacement on the RGB blend (CodeRabbit review on crates/paint/src/replace.rs:101)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 21:41:31 -06:00
Hector VillarrealandClaude Opus 5.5 04dd41c9b4 Look for the blended ring at x 58-60 (CodeRabbit review on crates/paint/src/replace_anti_alias_tests.rs:80)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 21:39:59 -06:00
Hector VillarrealandClaude Opus 5.5 fde11f647f Require the hard edge to start at x 58 (CodeRabbit review on crates/paint/src/replace_anti_alias_tests.rs:64)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 21:39:49 -06:00
Hector VillarrealandClaude Opus 5.5 900c410306 Keep the dab's flow and pressure on the hard edge with Anti-alias off (CodeRabbit review on crates/paint/src/replace.rs:191)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 21:39:44 -06:00
Hector Villarreal 7efd224081 Color Replacement: in Lab, Color keeps L and takes the foreground's a and b (#11922)
In a Lab document the Color mode no longer blends through RGB (which
changed the pixel's L): it keeps the stored L and moves a and b to the
foreground's, as in the reference application. Hue, Saturation and
Luminosity keep today's RGB blend.
2026-11-07 20:25:05 -06:00
Hector Villarreal f07586be70 Color Replacement: a hard tip edge with Anti-alias off (#11917)
With Anti-alias off, a pixel the Color Replacement tip reaches at all is
replaced fully instead of blended by its partial coverage, so the tip has
a hard edge as in the reference application. With Anti-alias on the edge
stays blended, and a colour boundary stays hard either way.
2026-11-07 20:17:48 -06:00