289 Commits
Author SHA1 Message Date
davidmann4andautocraft-bot[bot] f8fc15bbf6 Merge pull request #18395
Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
2026-12-02 01:07:07 +00:00
David Mann 03934fd0d9 Merge PR #13855: Gradient Fill layers and Gradient Overlay keep Photoshop's gradient 2026-11-30 23:55:19 +01:00
Dan 0ac3db44f2 Tests: retain all 199 autosave race repetitions 2026-11-30 22:44:35 +00:00
David MannandClaude Opus 5.5 800e3ddf66 Color Lookup layer Properties: radio rows for 3DLUT File, Abstract and Device Link, a Dither checkbox and the .cube orders (#18364)
The panel lays out as the reference application's: three radio rows with their dropdowns, the Dither
checkbox, and Data Order / Table Order radio pairs while a .cube is the LUT. The layer keeps the orders its
.cube was read in (LutSource), and an edit naming only an order reads the kept file again in the new
orders. The Abstract and Device Link rows ask for an ICC profile and say that applying one is not supported
yet (#14428), or that the file is the wrong kind of profile; the layer keeps its LUT.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 20:40:05 +01:00
Dan 3b37790849 Tests: speed up concurrent autosave recovery listing (#15937) 2026-11-30 17:24:55 +00:00
qvest-ssels f4fe8e0bc1 Merge main into fix/gradient-fill-overlay-source-13557
# Conflicts:
#	crates/engine-core/src/cmd/convert_gradient_tests.rs
#	crates/engine-core/src/cmd/gradient_fill_cmds/source.rs
2026-11-27 11:12:56 +01:00
David Mann ec236094ca Merge #16638 into the merge queue batch
fix(tools): a pattern from an Indexed image keeps painting (#13071)
2026-11-25 13:28:24 +01:00
f2ac09d2ec Fix-up for #11756: Align Edges as the reference application renders it
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.

The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.

- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
  so caches, the compositor, previews and extents agree; the fill/stroke split
  under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
  drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
  quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
  useAlignedRendering, older align_edges still read) on every shape tool and the
  Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
  rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
  Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
  extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
  two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).

Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 13:02:42 +01:00
hnoerenberg 818a4a010d feat(doc): patterns record the colour mode they were defined from
Edit > Define Pattern composites the area in the document's pixel format, which stores an Indexed Color document expanded to RGB. Nothing on Pattern said where the tile came from, so a pattern taken from an Indexed image was indistinguishable from an RGB one, and a tool that cares about the difference had nothing to read.

The new field names the source mode. The pixels, the id and what the pattern library lists stay as they were. A pattern read from a file records no source: a .pat or PSD block says what its pixels are, not which document they came from. The library index and .pcraft carry the field, so a defined pattern keeps its source across a restart or a save; files written before it read as no source.
2026-11-24 11:22:16 +01:00
superplay2021 47790f5e0d Merge latest main and resolve Align Edges conflicts 2026-11-23 21:25:02 +02:00
David Mann 6554712c61 Merge pull request #16529 from davidmann4/batch-19-prs-restored
Batch: 19 PRs with fix-ups (#12219, #11835, #14491, #15187, #8222, #15796, #15085, #15308, #15311, #15435, #14650, #15921, #15515, #15632, #15948, #15653, #14493, #14492, #14748)
2026-11-23 19:27:50 +01:00
skylartaylor 5cd4bc3d1c Merge main into nightly/windows-flavor (picks up #16483) 2026-11-23 05:57:20 +01:00
Higgs32584andClaude Opus 5.5 b0e95488da Merge upstream main into fix/8047-channel-mixer-cmyk
Keeps both test modules in crates/format/tests/it/main.rs: main's camera_raw_roundtrip and this PR's channel_mixer_cmyk.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 12:56:48 -05:00
David Mann 71495f89e5 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-22 12:23:08 +01:00
Dylan M. Taylor f3f382697f test(raw): pin pre-cutover Camera Raw SmartFilter and filter baseline (#587) (#16028)
* test(raw): pin pre-cutover Camera Raw SmartFilter and filter baseline (#587)

* test(format): avoid json! macro recursion limit in camera_raw_roundtrip (#587)

* test(format): wrap SmartSource::Embedded bytes in Arc (#587)

* test(engine): use select.deselect in camera_raw_baseline_pin (#587)

* test(raw): capture legacy RAW Open and Camera Raw Filter pixel baselines (#587)

* test(raw): lock Camera Raw Filter baseline pixels and capture RAW Open values (#587)

* test(io): lock legacy RAW Open baseline pixels (#587)

* test(io): capture RAW Open camera WB legacy baseline pixels (#587)

* test(io): lock RAW Open camera WB legacy baseline pixels (#587)
2026-11-21 19:59:28 -05:00
David Mann afacff50ea Merge PR #15143: fix(format): respect chosen chunk size in read probes 2026-11-22 00:25:40 +01:00
skylartaylor 753a81f637 Preserve bounded prerelease writer information in newer-file errors
Keep actual format compatibility as the decision; no format bump or file migration. Shared build override identifies the writer; bounded escaped diagnostics retain ordinary full tags. Three real manifest regressions authored, unrun; applicable crate validation pending.
2026-11-21 09:47:38 +01:00
Higgs32584andClaude Opus 5.5 3356714009 Merge upstream main into fix/8047-channel-mixer-cmyk
Resolve the conflict in crates/engine/src/adjust_params.rs: keep this
branch's generic mixer_row (RGB rows of 4, ink rows of 5) and main's
rounding to whole percentages before clamping (#14414).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-20 18:57:10 -05:00
qvest-ssels 0a4ad3e483 Merge remote-tracking branch 'origin/main' into fix/gradient-fill-overlay-source-13557
# Conflicts:
#	crates/engine/src/cmd/color_cmds.rs
2026-11-20 07:51:38 +01:00
superplay2021 31de878f08 Merge latest main and resolve Align Edges conflicts 2026-11-20 04:44:04 +02:00
David Mann a1b93266a9 Merge #14481 into the merge queue batch
Color Table: recolour by index, black past a shrunk table (#14342)
2026-11-19 22:27:46 +01:00
Michael Higgins 9888613806 Merge branch 'storytold:main' into fix/8047-channel-mixer-cmyk 2026-11-19 10:19:01 -05:00
aiongg 5e6d342b36 Merge pull request #15718 from FredApps/fix/15708-deterministic-spill
Give scratch tests a deterministic volume capacity
2026-11-19 09:58:09 -05:00
aiongg a8f95bd16d Document layer index and index-ordered selection (#15704)
Document.layers is a LayerTree that builds an id index on first lookup and drops it on any mutable access. Layer lookups and selected_layers use the index instead of walking the document.
2026-11-19 10:07:19 +00:00
FredApps 236bc84a5e Give scratch tests a deterministic volume capacity 2026-11-19 08:01:25 +01:00
David Mann 2cda31cd8d Merge remote-tracking branch 'origin/main' into test-speed/15652-unclaimed-slow-tests
# Conflicts:
#	crates/gpu/tests/it/camera_raw.rs
2026-11-19 00:31:06 +01:00
David Mann 3f9495d2e6 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-18 23:10:10 +01:00
David Mann 1fb5b51051 Merge remote-tracking branch 'origin/main' into test-speed/15652-unclaimed-slow-tests
# Conflicts:
#	crates/ui-egui/tests/it/batch_export_options.rs
2026-11-18 22:14:41 +01:00
David MannandClaude Opus 5.5 493d2df62f Tests: trim the loops of the unclaimed slow tests that reach no new code (#15652)
Each removed variant takes the same branch as one that stays, or is covered without the app or
oracle cost by a named lower-level test; the commit's comments say which for every test.

ui-egui: floating-document zoom (10 frames after Enter, not 60), Wide Angle (one depth per mode,
alpha kept), Brush panel sections (only those Brush Settings draws; Brushes ignores the section),
Camera Raw GPU (8 and 32 bits), enable rules (one app per world, a copied style for Paste only),
Content-Aware Move preview (selection just past the coarse budget, smaller canvas).
algo/compose/engine/gpu/format: Pixelate (Lab, cell 100, seed 37, tile 1), box blurs (Gaussian
40), Smart Blur (multichannel layouts cover every arm; Low and High), FFT sharpen gate (one
depth), panorama batching (budgets at every split instead of a 47-step sweep), bevel and chisel
threads (2 and 16), fused tone tiles (256 x 256, the U16 table threshold), live dabs (8 and 32
bits), Camera Raw GPU sizes (1600 x 240 wide case; the proxy-size per-pixel run lives in the
clarity test), directory bundle (two modes; zip_cases has the matrix).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 22:14:12 +01:00
aiongg 0081fd10e1 Tests: merge single-file integration test binaries into one binary per crate
Each crate's top-level tests/*.rs files become modules of tests/it/main.rs, and a new xtask check (test-binaries) refuses a new single-file test binary.
2026-11-18 19:11:27 +00:00
qvest-ssels a8c5d1b07a Merge remote-tracking branch 'origin/main' into fix/gradient-fill-overlay-source-13557
# Conflicts:
#	crates/io/src/blocks/tests.rs
#	crates/ui-egui/src/dialogs/layer_style.rs
#	crates/ui-egui/src/tools/gradient_ui.rs
#	crates/ui-egui/src/tools/gradient_ui/properties_panel.rs
2026-11-18 15:55:53 +01:00
Zaxaerith 5ebc3b4cc9 fix(format): drop unused photocraft-formats dependency (#15468) 2026-11-18 20:22:34 +08:00
Higgs32584andClaude Opus 5.5 25ced89e43 Merge upstream main into fix/8047-channel-mixer-cmyk
main (#15449) moved the adjustment editors onto the craft UI framework and deleted basic.rs, which held this PR's CMYK Channel Mixer editor. The framework ChannelMixer has red, green and blue rows only, so a CMYK mixer is now kept out of it: values::from_params refuses a mixer with ink keys (CMYK_MIXER_UNAVAILABLE), the Properties panel shows that message and edits nothing, and Image > Adjustments > Channel Mixer refuses to open in a CMYK document with the same reason. A CMYK editor in craft-libs is the follow-up.

ui_tests.rs keeps main's tests; the test of the deleted egui editor is replaced by cmyk_channel_mixer_is_kept_out_of_the_rgb_editor, and the every-kind Properties test expects the refusal for a CMYK mixer. The Tokens::mixer_rgb/mixer_ink fields added for the deleted editor are dropped (no user left).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 11:47:59 -05:00
superplay2021 b76163ff1f Merge latest main and reconcile RAW adapter fixes 2026-11-16 12:56:05 +02:00
qvest-ssels e3d8178baa Merge remote-tracking branch 'origin/main' into HEAD 2026-11-16 07:30:32 +01:00
David Mann 5e5f2dc8d9 Merge main into fix/8047-channel-mixer-cmyk 2026-11-15 20:30:30 +01:00
Mex e61766d32c fix(format): respect chosen chunk size in read probes
Cap EOF and growth probe reads at the normalized chunk size. Add a bounded-reader regression covering zero, short and full probe sizes and missing, partial and exact length hints.
2026-11-15 15:12:58 +01:00
superplay2021 e5f7ba37b9 Merge latest main and reconcile RAW and format fixes 2026-11-15 15:06:56 +02:00
Dylan M. Taylor 2a0e50526f Merge main CI repairs while preserving shared RAW and SVG adapters
Reconcile contributor #14595 fixes with #15036: retain bounded SVG refusal reclassification and shared preflight, distinguish corrupt reads from save I/O failures, preserve RAW calibration and stricter regression cases. Keep newer descendant shared pin and main GPU/test support fixes. Hosted validation required.
2026-11-15 07:43:37 -05:00
Sven Lafebre e2cb5a0cf5 Color Table: keep each pixel's index where it is known
Indexed Color documents store RGB pixels, so Color Table found each
pixel's index again as the nearest entry, and entries of one colour
lost their own pixels (#14342). The document now keeps each pixel's
index (Document::color_indices) where it is known: recorded when a
palette PNG is opened, by Image > Mode > Indexed Color and by Color
Table itself. Color Table uses it while the layer still has exactly the
recorded tiles; after any other change it maps by nearest colour as
before. A known index past a shrunk table stays black until the table
grows back over it.

The native format saves the indices only while they hold for the layer
as saved, and pairs them with the loaded layer on open.
2026-11-15 10:50:12 +01:00
Terra854 274c99f94d Complete shared-format migration and fix RAW/SVG review findings 2026-11-15 15:05:47 +08:00
superplay2021 d7a993ac7a Merge main and fix SVG and native-format CI regressions 2026-11-14 23:30:08 +02:00
David MannandClaude Opus 5.5 4371b60459 format: fix the .pcraft store tests left red by the craft-libs bundle migration
- refuse a symlinked or non-file manifest.json before any object is written
  (craft-pcraft-bundle only refuses it when it publishes the manifest)
- a directory save reports craft-pcraft-bundle's Io errors as I/O, not as a
  corrupt bundle (a locked manifest said "corrupt .pcraft bundle")
- a full_composite member naming another entry refuses the bundle, as
  craft-pcraft-format already does for thumbnail and composite
- the permission tests make the tiles/blobs/composite folders they restrict;
  an empty document's save no longer creates them

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-14 15:49:55 +01:00
superplay2021 3db0c99fe5 Merge main and fix Align Edges integration 2026-11-14 14:08:31 +02:00
Hasan-Zayni 3a7e13cd33 format: report a ZIP member over its read bound as LimitExceeded
craft-libs' bundle reader returns Error::Zip(EntryTooLarge) for a member past its read bound; map it through zip::map_read_error so it surfaces as LimitExceeded, not Corrupt. The directory cleanup test now creates tiles/ and blobs/ itself, since an empty document's save no longer makes them.
2026-11-14 13:07:06 +03:00
Dylan M. Taylor 4ab4b0ad07 format: align store tests with craft-pcraft-bundle 2026-11-14 04:07:44 +00:00
Dylan M. Taylor b0e0bcc6c4 Merge pull request #14236 from storytold/codex/photocraft-format-migration
Move remaining file formats and codecs to craft-libs (#778)
2026-11-13 23:03:16 -05:00
Gabriel Heuser 239a1c49c9 Merge branch 'main' into fix-pixel-aligned-shape-strokes 2026-11-13 23:31:44 +02:00
qvest-ssels 66dc04d47b Merge remote-tracking branch 'origin/main' into fix/gradient-fill-overlay-source-13557 2026-11-13 18:29:06 +01:00
qvest-ssels 8f974de5fe Gradient Fill layers and Gradient Overlay keep Photoshop's gradient (#13557)
A PSD gradient fill (GdFl) or Gradient Overlay (GrFl) with Smoothness
above 0, a method other than Classic or Lab stops (an overlay also with
midpoints off the middle) keeps Photoshop's own gradient next to the
dense stops baked from it: colour stops, midpoints, Smoothness, method
and opacity stops, in the GradientInterpolation record the overlay
already had (now with midpoints and opacity stops) and in a new
Fill::Gradient `interpolation` field. The compositors still render the
baked stops.

The Properties gradient editor, the on-canvas widget and the Layer
Style page show and edit those stops; gradient.fill.set/stop edit them
and bake again (geometry edits leave the bake exact), and
gradient.fill.set takes `method` and `smoothness`. A preset replaces
the record. A PSD save writes the kept gradient (Intr, the method
enum) while the render stops still match it, so read, write, read
keeps it; .pcraft keeps it too and older files still load.
2026-11-13 16:49:22 +01:00