Commit Graph
6731 Commits
Author SHA1 Message Date
David Mann 8bc71f924b Merge main
# Conflicts:
#	crates/format/src/store.rs
2026-10-27 19:10:28 +01:00
aiongg a85d79167e Merge pull request #9877 from Silvertree2010/perf/export-speed
perf(save): faster .pcraft and PSD saves, byte-identical output
2026-10-27 13:42:11 -04:00
David MannandClaude Opus 5.5 199092edfd Integration: a failed favourite toggle shows as an error; preference count from the scorecard (#6526)
CodeRabbit on #9775: FontLibrary::finish wrote a failed type.font.favorite to the status bar as plain information; it now sets status_error like the other status writes. The regenerated scorecard counts 12 of 179 preferences that do nothing; ui-parity.md and gaps.md still said 178.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-27 18:18:49 +01:00
David MannandClaude Opus 5.5 11528118e7 Integration: Save As offers Netpbm as .pnm only (#3609)
CodeRabbit on #9775: the encoder picks P5/P6/P7/PFM from the image, not the name, so a .pbm, .pgm or .pfm picked in Save As held other data (an RGB document as P6 in a .pbm). Only the neutral .pnm is offered; File > Open still reads every Netpbm extension.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-27 18:18:48 +01:00
David MannandClaude Opus 5.5 3b964c0cdf Integration: video footage off the active artboard stays out of it; one depth check for copied layers (#4329)
CodeRabbit on #9775: newVideoLayerFromFile placed the layer while its content was still empty, so an active artboard always took it and clipped footage centred elsewhere; the first frame is now the content before placement, as in frames_to_layers (footage_off_the_active_artboard_stays_out_of_it fails without it). The merge also left a second check_group_depth ("Duplicate Layers") before main's "Copy Layers" one in layer.copyToDocument, so main's message could never show; it is removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-27 18:18:48 +01:00
David MannandClaude Opus 5.5 425b5efeed Integration: a painted fill reserves its buffers before it builds them (#3779)
CodeRabbit on #9775: paint.stroke with fill:true builds the coverage, its feathered copy, the selection read and the mask over the region, up to the whole canvas (file.new allows 300000 x 300000), with infallible allocations that abort the process when memory runs out. The peak is now reserved through the fallible allocator first, and the selection is read through it; fill_survives_allocation_failure fails without this (the error came from a later blend).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-27 18:18:48 +01:00
David MannandClaude Opus 5.5 88c19a59d4 Integration: the font menu shrinks to a search with no matches, as on main (#6526)
Main's #9849 lets dropdowns grow back after a short list, and its test
`clearing_a_query_that_matches_nothing_grows_the_menu_back` expects a
search with no matches to shrink the font menu. #6526's menu stayed at its
full 534 px: its font list never shrank (auto_shrink y off), and the
vertical separator between the class list and the font list took the row's
whole available height. The list now shrinks, and the line is drawn over
the laid-out row instead, so the menu ends with the class list.

The test now checks that the menu ends with the class list (it can't drop
below half with the class list beside the list), and a new test pins that
the wheel past the end of the list, or over the class list, never moves
the header, also in a window too short for the full menu.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-27 17:22:37 +01:00
David MannandClaude Opus 5.5 4a6c0d82d7 Integration: rustfmt the Character panel's preset menu after main's craft_ui::ComboBox switch (#3558)
Main's #9849 bans egui::ComboBox; the preset menu #3558 added now uses
craft_ui::ComboBox, three characters past rustfmt's 160-column limit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-27 16:43:34 +01:00
NetterSilverandClaude Opus 5.5 b23eabf60c Write the PSD merged image and 8-bit layer planes in place
merged_planes scanned each composite band twice on the calling thread
for alpha, encoded every range into per-channel Vecs one push at a time,
then copied them into the planes. The workers now write their slice of
every plane directly, check alpha as they go, and run a loop
monomorphised per sample type. The 8-bit deinterleave of layer pixels
used one thread per channel with a strided iterator; it now splits the
pixels into one band per core and writes each plane's slice in place.
Same arithmetic, same bytes; a test pins merged_planes against the
previous per-band implementation for RGB, Gray, Lab and CMYK at 8, 16
and 32 bits, with and without the matte.

bench_export .psd, 36 MP, 3 layers, 16 interleaved rounds of 7 reps
(median of medians / min), Ryzen 16 threads, Linux:
  709.4 / 413.7 ms -> 540.8 / 318.9 ms  (-24 % / -23 %)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 16:42:16 +01:00
NetterSilverandClaude Opus 5.5 86245d0719 Encode .pcraft previews while the bundle is prepared and compressed
A ZIP save encoded the thumbnail and the 1024 px composite preview as PNG
on the calling thread before any tile was compressed. The composite alone
is a ~200 ms single-threaded deflate on a 36 MP document, about 40 % of a
full save. The previews are now encoded on their own threads while the
document is collected and its new objects are compressed on all cores;
the bundle is assembled afterwards in the same order, so the bytes are
unchanged. Directory saves encode them up front as before. wasm stays
sequential.

bench_export, 36 MP, 3 layers, 16 interleaved rounds of 7 reps (median
of medians / min), Ryzen 16 threads, Linux:
  .pcraft            517.9 / 471.1 ms -> 319.3 / 287.8 ms  (-38 %)
  .pcraft with cache 360.1 / 334.1 ms -> 277.5 / 268.3 ms  (-23 %)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 16:42:16 +01:00
David Mann fa0e095941 Merge main
# Conflicts:
#	crates/ui-egui/src/tools/type_tool/fonts.rs
#	crates/ui-egui/src/tools/type_tool/ime_tests.rs
2026-10-27 16:26:20 +01:00
David Mann b731cdf9eb Merge PR #4329: Layers: New Group dialog and modifiers; new layers go into an open group and join its clip group
# Conflicts:
#	docs/ui-parity.md
2026-10-27 16:14:37 +01:00
bb88098343 Integration: new layers go into locked open groups; Stamp Visible above an open group (#4329)
A new layer with an open group active went above the group whenever the
group had any lock (all, pixels, transparency or position). The
reference application puts it inside, on top of the group's layers, even
when the group is locked with Lock All. Locks no longer keep New Layer,
New Group, adjustment and fill layers out. Layers that are edited right
after they are made (Type, Shape, Place's transform box, Paste, the
Gradient tool's live gradient, video layers, Render, Vanishing Point, a
new frame) take Place::AutoEditable and keep the PR's rule: they go
above a locked group, as before.

Stamp Visible with an open group active put the stamp inside the group,
where the group's opacity, mode or mask applied to the composite a
second time. The reference application puts it directly above the
group; with a layer inside the group active it still lands above that
layer, inside the group.

Co-authored-by: SckraT <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 16:03:49 +01:00
David MannandClaude Opus 5.5 3983593916 Integration: re-export active_type_path from vector_ui after main's tools/ move (#9321)
#9321's Direct Selection change calls crate::vector_ui::active_type_path, which
main's layout refactor (#9758) made a private path_ops item, so ui-egui did not
build after the batch's main merge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 15:53:57 +01:00
David Mann 33e3fa2f8e Merge PR #6526: Font menu: favourites, recent fonts, class and similar-font filters, live preview 2026-10-27 15:53:56 +01:00
David Mann a7102d3076 Merge PR #3558: feat(type): add editable font size, leading and tracking preset menus 2026-10-27 15:37:22 +01:00
aiongg 07bd794686 fix(ui): dropdown menus grow back after a search with no matches (#9849)
* refactor(ui): build every dropdown on craft_ui::ComboBox

Repin craft-libs to the revision with craft_ui::ComboBox, whose menu grows back
after its contents shrink while it is open (egui#5225), and ban egui::ComboBox
in clippy.toml.

* fix(type): the font menu grows back after a search

The search field is the ComboBox header and only the family list scrolls, so
the menu follows the list's height: no unfiltered height kept while searching.

* chore(deps): craft-libs 60d60d48 (dropdown fixes)

* chore(deps): craft-libs 6af63481 (dropdown fixes)

* chore(deps): craft-libs 4d7b82f7 (dropdown fixes)

* chore(deps): craft-libs 92d392cf (#387 merged)
2026-10-27 10:32:56 -04:00
4add96c84b Integration: Character panel presets as in the reference app, on main's layout (#3558)
Ports the size, leading and tracking preset chevrons onto main's split type
tool (tools/type_tool/panel.rs, next to num_field, which now names its scrub
icon) and fixes what review found:

- The lists differ from the reference app: Size is 6, 8, 9, 10, 11, 12, 14, 16,
  18, 24, 30, 36, 48, 60, 72, 150, 300 pt (the PR had 96, no 16/150/300);
  Leading is Auto plus the same list (one shared pub(crate) const); Tracking is
  -100..-5 | 0 | 5..200 with separators (the PR lacked -5/5 and separators).
- The PR's layout test was red on CI: the chevron ended ~20 px short of the
  column. The numeric field now gets the column width minus the chevron's
  exact button width, and the test is strict again (the chevron ends at the
  panel edge within 0.5 px, the field's suffix slot matches Transform's).
- In mm the labels read "2.1166668 mm" and a pick stored 12.000001 pt. Labels
  now have at most two decimals, a picked preset stores its point value
  directly, and "selected" uses a relative tolerance.
- The chevrons have accessible names (Font size / Leading / Tracking presets,
  translated in every complete catalog); tests find them by name.

New tests: the literal lists (fail on the PR's lists), the strict layout test,
mm labels and exact 12 pt, a preset while editing a span, and presets without
a type layer setting the defaults with no history step.

Co-authored-by: Ni-zav <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 15:32:41 +01:00
David MannandClaude Opus 5.5 6fcbedd229 Merge origin/main into pr-4329-fixup
Main moved the engine commands into crates/engine/src/cmd/ and the
dialogs and panels into submodules. The PR's placement calls follow
them, and main's new insert sites (new_adjustment in adjust_params.rs,
Place in file_cmds/open.rs, shapes in vector_cmds/shape.rs) use
layer_place::insert_new like the PR's originals. The New Group dialog
moves to dialogs/new_group_ui.rs; the Layers panel flyout's New Group…
opens it.

Main's Session::precheck now also checks layer.new.group's and
layer.new.groupFromLayers' new params (name, color, mode, opacity,
position), so precheck_agrees_with_execute holds. Main had since added
"New Group…" to every catalog: the PR's duplicate rows are dropped.
Main's newer tests that made a layer with an open group active now
open the group last, as the PR did for the older ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 15:22:03 +01:00
David Mann e7ccac4d0f Merge remote-tracking branch 'origin/main' into pr-3558-fixup
main moved crates/ui-egui/src/type_tool.rs under tools/type_tool/; the PR's change to it is ported in the next commit.
2026-10-27 15:14:16 +01:00
David Mann 9324f7e823 Merge PR #9262: feat: Artboard from Layers takes a size of your own (#9087)
# Conflicts:
#	crates/engine/src/cmd/artboard_cmds/tests.rs
#	crates/ui-egui/src/filter_dialog.rs
2026-10-27 14:59:48 +01:00
David Mann 0a17fe371a Merge PR #5405: feat(transform): show distort and skew cursor indicators when holding Ctrl/Cmd 2026-10-27 14:55:53 +01:00
760b9d1cc8 Integration: distort/skew pointers only where the drag distorts or skews (#5405)
Cmd armed the new Distort and Skew pointers in every transform mode, while the
drag did something else: in Rotate mode a Cmd-drag on a corner or edge rotates
but showed the dart or skew arrows; a Skew-mode corner with Cmd showed the dart
but slides along an edge; Distort mode with Cmd drew skew arrows on edges it
refuses. Cmd also hid the curved rotate arrow just outside a corner (the Alias
commit pointer showed) although a Cmd-drag there still rotates.

One helper, handle_indicator, now answers "what does this drag do" with the
same rules as the drag (drag_mods, mode_mods, apply_mode_drag), and both the
cursor and the drawn pointer use it. The pointer is drawn from the canvas's
cursor branch, so a guide, pan or zoom cursor over a handle no longer gets a
second pointer on top, and cursor() no longer hides the pointer while the box
is being applied (the overlay draws nothing then). During a drag the rotate
arrow shows only while the drag rotates (also a Rotate-mode handle drag), not
when a scaling corner strays past another corner. The warp split guide reads
sticky keys like the cursor does.

Co-authored-by: Catur Sura <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:52:45 +01:00
e3b2854838 Integration: font menu fix-ups after merging main (#6526)
- Character section: a style picked under a family's ">" with type layers
  selected set the layers but not the style for new type (the options bar
  did both). Pick "Inter > Thin" in Properties > Character: new type stayed
  Regular.
- Faux bold: a pointed tip moved r/sin(half its angle) along its bisector,
  uncapped (3.9 r at 30 degrees, an A apex grew a spike), and tips sharper
  than about 20 degrees did not move at all. Every tip now moves at most
  2r, continuously; inner corners (the crotch of a V) keep their exact
  miter.
- Faux bold: each point searched past runs of coincident points for its
  neighbours, O(n^2); a contour of 50 000 copies of one point took ~8 s per
  glyph. Neighbours now come from one O(n) pass over the runs.
- prefs.reset {"path":"type"} and Preferences > Type > Reset Section wiped
  the favourite fonts; they are kept now (type.favoriteFonts by name, or
  Reset All, still clear them).
- An expanded family whose own row scrolled out of view lost its style
  rows, so the list below jumped up.
- Show Similar Fonts re-sorted around each font an arrow step applied, so
  Down went back and forth between two fonts; the list now compares with
  the font current when the filter was turned on (or the menu opened).
- Docs: an uninstalled favourite is kept but not listed; FAUX_BOLD_RADIUS
  and the raster budget describe the thickened outline; the unused
  "Recent font list" rows are gone; docs/scorecard.md regenerated (the
  favourite fonts are one more setting).

Co-authored-by: D-monized <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:52:20 +01:00
9462fa130c Integration: Artboard from Layers dialog opens at the layers' size; refuse -0.4 (#9262)
The dialog remembered the last Width/Height: make a 1080x1350 board from one
layer, then open it for a 20x30 layer and press OK, and that layer got a
1080x1350 board too. It also opened at 0 and an empty Name. It now starts at
the selected layers' size and the next "Artboard N" every time, as in the
reference application. `{"height": -0.4}` rounded to 0 and kept the bounds;
negative sizes are now refused before rounding.

Co-authored-by: DuBearte <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:49:25 +01:00
David Mann e0d06d3fc4 Merge PR #3779: paint.stroke: fill: true fills the enclosed region (#3659) 2026-10-27 14:42:54 +01:00
David Mann c26e31ab52 Merge PR #3609: fix(app): add missing supported file formats to Save As file picker (#3400) 2026-10-27 14:42:51 +01:00
5a6473113e Integration: paint.stroke fill keeps picked CMYK inks and pads to the feather's reach (#3779)
fill_region called fill_cmds::blend_color_mask without the picked-inks
parameter main added, so the PR no longer compiled; it now passes the
brush's picked CMYK inks, as Edit > Fill and Edit > Stroke do, so a
colour picked as CMYK 100/0/0/0 fills a CMYK document with those inks
(where it covers fully; partial coverage blends through RGB, as there).

The soft fill's working bounds were padded by ceil(sigma)+2, but the
feather reaches ceil(3 sigma): a 40 px square filled with size 40,
hardness 0 ended in a hard step from ~0.1 to 0 at 1 sigma + 2 px. The pad
now comes from selection::feather_reach.

Tests through paint.stroke: fill_soft_edge_has_no_step,
fill_paints_a_cmyk_pick_with_the_picked_inks,
fill_works_on_cmyk_and_16_and_32_bit.

Co-authored-by: scott <[email protected]>
Co-authored-by: echelon <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:40:45 +01:00
48b42979c8 Integration: Netpbm Save As row leads with .pnm, Open lists .pnm/.dib, save test (#3609)
Picking Netpbm for a bare name (Untitled) took the row's first
extension, .pbm, though the codec writes P6/P7/PF from the image, never
a 1-bit PBM: an RGB document saved as x.pbm holding P6 data. The row now
starts with .pnm. File › Open didn't list .pnm or the new .dib alias, so
a file Save As had just written was hidden in the Open dialog; both are
now in All Formats and their own type. The test checks every new type
and alias is offered, the Netpbm row's first extension, that Open lists
every extension Save As writes, and what Save As writes to .pnm (P6) and
.hdr (#?RADIANCE), as asked in review.

Co-authored-by: buivanvu94 <[email protected]>
Co-authored-by: tanish2k09 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:38:26 +01:00
David Mann f66744c76e Merge origin/main into pr-5405-fixup
Main moved crates/ui-egui/src/transform_tool.rs to tools/transform_tool/ and split it
into submodules; the PR's cursor, overlay and test changes are ported to pointer.rs,
draw.rs and tests.rs unchanged (distort_refused becomes pub(super) for them).
2026-10-27 14:36:00 +01:00
David Mann f3e422f7ae Merge remote-tracking branch 'origin/main' into pr-3609-fixup
# Conflicts:
#	apps/photocraft/src/services.rs
2026-10-27 14:29:13 +01:00
David Mann 77f7914271 Merge PR #9455: raw: develop the default rendering band by band, without the f32 RGB frame 2026-10-27 14:28:29 +01:00
David Mann 19d0be04b1 Merge branch 'main' into pr-3779-fixup
# Conflicts:
#	crates/engine/src/cmd.rs
2026-10-27 14:27:41 +01:00
David Mann 3a689f217c Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/file_cmds.rs
#	crates/engine/src/retouch_cmds.rs
#	crates/engine/src/vector_cmds.rs
#	crates/io/src/psd_export.rs
#	crates/io/src/psd_import.rs
#	crates/io/src/smart_map.rs
#	crates/psd/src/layer.rs
#	crates/raster/src/lib.rs
#	crates/ui-egui/src/camera_raw_ui.rs
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/filter_dialog.rs
#	crates/ui-egui/src/gpu_canvas.rs
#	crates/ui-egui/src/panels.rs
#	crates/ui-egui/src/retouch_ui.rs
#	crates/ui-egui/src/transform_tool.rs
#	crates/ui-egui/src/vector_ui.rs
#	docs/gaps.md
2026-10-27 14:26:26 +01:00
0b09eb43a5 Integration: per-band AHD balancing, memory-capped fused bands (#9455)
`for_bands_grouped` always split the bands into `min(workers, jobs)` static
chunks, so on the default develop (jobs == workers) a worker held up on the
shared pool kept a fixed share of the bands waiting, where main's
`chunks_mut_limited` runs one rayon task per band. Now, when every worker may
hold a scratch, each band is its own task and borrows a scratch from a pool
(`par::chunks_mut_pooled`, at most one per worker, dropped as soon as no
waiting band can use it); the grouping stays for memory-limited jobs.

The fused bilinear/MHC, X-Trans and LinearRaw paths ran one band per worker
with no memory cap: a 262144 x 455 Bayer frame with bilinear needed 2.92 GB
at 15+ workers and failed with LimitExceeded under the default 2 GiB.
`working_memory` now caps those bands like AHD's and the fused paths use the
returned jobs. The fused LinearRaw and X-Trans band buffers are `band.min(h)`
rows, as charged (CodeRabbit, develop.rs:414).

Tests: a_slow_band_does_not_hold_up_the_bands_after_it and
fused_bands_at_once_are_capped_by_the_memory_limit fail without the fix;
for_bands_keeps_at_most_jobs_scratches_alive, chunks_mut_pooled_makes_one_state_per_worker_at_most,
multi-band and short X-Trans/LinearRaw fused-vs-full cases.

Co-authored-by: Valentin Klein <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:24:57 +01:00
David Mann 89489082cc Merge PR #8923: fix(ui): Remove Tool trail tints all a stroke removes; brush trails follow hardness (#8916) 2026-10-27 14:01:28 +01:00
David Mann 8534e877dc Merge PR #9450: raw: AHD demosaic with reused planar scratch, about 1.6x fewer instructions 2026-10-27 13:58:31 +01:00
ac9b374fab Integration: Remove trail shows thin strokes on big documents (#8923)
The trail mask is at most 1024 px on its long side, so on a big document
one mask pixel stands for k x k document pixels, and the Remove trail
sampled only each block's centre. A thin stroke that fell between the
centres (2 px on 6000x4000, k = 6; 4 px on 12000x8000, k = 12) showed no
tint at all, though every pixel it touched is removed. In reach mode a
mask pixel now takes the largest coverage of its whole block, clipped to
the document. Blocks no coverage tile reaches are skipped
(StrokeRenderer::touches), so releasing a whole stroke on a 30000x20000
document restamps in 0.22 s instead of 23 s.

Also pins the waiting strokes' kept tint where a later stroke restamps
its rectangle off its own path (fails with the base max removed).

Co-authored-by: Hartmut Nörenberg <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:57:20 +01:00
David Mann 281f8e95f5 Merge PR #8704: fix(codecs): check header dimensions against the file size before allocating 2026-10-27 13:52:36 +01:00
David Mann c14a707d2a Merge PR #6583: PSD/PSB open without reading the whole file: channel data read as decoded, in bands into tiles (#5106)
Merged at the fix-up commit before its main merge (362947695d); the
conflicts with the batch are resolved here: psd_import.rs keeps both
sides' tests, tiff_layers.rs takes ImageData::new.
2026-10-27 13:50:37 +01:00
c65b7d93d6 Integration: file-size bound fits DWA EXR, RLE BMP and GIF screens (#8704)
The new plausibility check refused valid files that main opens:
- EXR DWAA/DWAB parts: they go past 2^16:1 (a flat 8192x4320 DWAB frame
  with 12 alpha-scheme mattes is 29,948 bytes, 75,629:1; run-length
  channels zlib-packed on top reach about 132,000:1). DWA parts now get
  2^18:1, so a header of a few hundred bytes can ask for about 100 MB,
  not gigabytes.
- BMP RLE8/RLE4: end-of-line, end-of-bitmap and delta escapes leave pixels
  unwritten, so no ratio bounds a valid file (an EOB-only 4000x4000 RLE8 is
  1,080 bytes). Skipped like HDR.
- GIF: the decoder's size is the logical screen, which needs no data (a
  4000x4000 screen with a 1x1 frame is 35 bytes). The first frame must be
  backed, and the screen only past 256 MiB, so a 35-byte GIF still can't
  declare a 30000x30000 screen.
The declared-size products saturate: a Radiance header of 2^31 x 2^31
read without limits overflowed u64 in debug builds.

Co-authored-by: FinnNk <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:46:11 +01:00
362947695d Integration: a source read error in the layer records fails the open (#6583)
The lazy parse took any error from read_layer_info on a Layr/Lr16/Lr32
global block as a damaged block and dropped the layers. A failed read of
the source (PsdError::Read: a dropped network share, a file rewritten
while it opens) then let a 16/32-bit layered file open silently from its
merged image, with no damage warning, and a save replaced its layers.
A read error now fails the parse, as reading the whole file would.

The new test fails each read of a clean parse once, in turn, and checks
the parse either fails with the read error or matches from_bytes; with
the fix reverted, read 20 of the Lr16 sample drops the layers silently.

Found by CodeRabbit's review of the PR.

Co-authored-by: ptrinh <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:28:32 +01:00
041aac9ecb Integration: folder batches skip raws that open only as the preview (#9097)
Listing every photocraft_raw extension also picked up CR3, ORF, RAF, RW2,
SRF and SR2. The raw decoder can't read CR3, compressed ORF and RAF, or RW2
raw formats other than 3, 4 and 5 yet; import then falls back to the
embedded JPEG preview with only a warning, so a folder batch would process
the thumbnail silently. The folder list now takes the raws whose usual files
decode (DNG, CR2, NEF, NRW, ARW, PEF), and the test pins both sides.

Port of the reviewed fix-up 202ce9c2a (davidmann4/photocraft pr-9097-fixup)
to this batch's file layout: same changed lines, in file_cmds.rs instead of
main's later file_cmds/paths.rs split.

Co-authored-by: .CooCoo <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:28:27 +01:00
David Mann f35e2307de Merge PR #9097: Batch: folder sources take every format PhotoCraft opens 2026-10-27 13:27:35 +01:00
David Mann f811db8f65 Merge PR #9321: feat: type on a path follows its path when the path is edited (#9114) 2026-10-27 13:12:53 +01:00
NetterSilverandClaude Opus 5.5 90efa9a114 Add an export benchmark for .pcraft, PSD and flat formats
`cargo run --release -p photocraft-io --example bench_export` builds a
36 MP photo document (the opened photo, a painted layer, a soft
half-transparent layer) and times `photocraft_io::export` for .psd,
.pcraft (with and without the per-document export cache the app's Save
uses), TIFF, PNG and JPEG: median and min of --reps runs. --out DIR
writes each format's bytes so two builds' output can be compared.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 12:29:59 +01:00
aiongg 7ac7b8b106 refactor(selection): take the feather reach from the blur (#9802)
The feather's ⌈3σ⌉ truncation radius was written out in the blur and again in two engine callers: the windowed marquee and lasso feather (#9794) and the canvas-edge padding of Select › Modify › Feather. selection::feather_reach returns it from the blur's own σ rules, and both callers use it, so a change to the blur's reach can't leave them behind. Output is unchanged; a test pins that the feather leaves everything past its reach at zero.
2026-10-27 01:07:05 -04:00
aiongg 805ed134e4 Merge pull request #9697 from wanikhawar/perf/selection-morphology
Expand, Contract and Border: crop to the selection, up to 40× faster on small selections
2026-10-27 00:56:40 -04:00
aiongg a27436adcb Merge main into perf/selection-morphology
Resolves the move of crates/engine/src/selection_cmds.rs to cmd/selection_cmds.rs: the two hunks apply at the new path, and modify_window.rs with its tests moves under cmd/selection_cmds/.
2026-10-27 04:27:45 +00:00
Khawar Zamman Wani 55b8df82fc perf(selection): window marquee and lasso feather masks (#9794)
* perf: window marquee and lasso feather masks to drawn bounds

* perf: benchmark small feathered tool selections on a 24 MP canvas
2026-10-27 00:12:47 -04:00