Commit Graph
13182 Commits
Author SHA1 Message Date
Dylan M. Taylor 72feedae59 svg: update deepest chain test for non-strict embedded SVG omission 2026-11-15 00:33:25 +00:00
David MannandClaude Opus 5.5 1d32304ad8 raw: the ignored ORF test names its reason without a local file
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-14 17:19:58 +01:00
David Mann 412c750076 Merge PR #12156 2026-11-14 17:18:22 +01:00
David Mann d83168a92d Merge PR #13437 2026-11-14 17:18:22 +01:00
David Mann c131664ea7 Merge PR #13409 2026-11-14 17:18:21 +01:00
David Mann 3cb9bfa7ed Merge PR #9911 2026-11-14 17:18:21 +01:00
David Mann 0b52926b42 Merge PR #10865 2026-11-14 17:18:20 +01:00
David Mann 018134aaef Merge PR #14451 2026-11-14 17:18:19 +01: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
David MannandClaude Opus 5.5 82fe7a4818 Pin craft-libs to craft-libs#1300: directory saves collect leftovers best effort after the manifest commit
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-14 15:49:55 +01:00
David Mann 6372c11319 Merge branch 'pr-14452' into fix/main-green 2026-11-14 15:22:29 +01:00
David Mann 658963415a Merge branch 'pr-14397' into fix/main-green 2026-11-14 15:22:29 +01:00
David Mann 3e0c3c3490 Merge branch 'pr-14385' into fix/main-green 2026-11-14 15:22:28 +01:00
FredApps 0d3b1e8523 Merge pull request #11699 from ZIDAN44/fix/11353-wheel-gesture-ownership
Wheel: a panel scrolled past a dropdown, slider or font field keeps scrolling (#11353)
2026-11-14 15:21:12 +01:00
David Mann cb4cb9a593 Merge pull request #14370 from RickiNano/fix/automation-write-guard-14355
automation: write guard no longer replaces text and office files (#14355)
2026-11-14 15:00:15 +01:00
David Mann 7838fe09bd Merge pull request #14403 from RickiNano/fix/main-ci-craft-libs-fallout
Fix two main CI failures left by the craft-libs format migration
2026-11-14 14:59:51 +01:00
RickiNano fe8c93d198 perf(ui-egui): build the panel-state stamp ids once (#13120) (#13262)
remember_panel_state ran format! for each of the 7 panel stamp ids every frame. Build them once in a LazyLock from the same strings, so the persisted stamps keep their ids, and test that the cached ids equal the format!-based ones.
2026-11-14 14:36:28 +01:00
RickiNano 94d6d1aa79 Count tool: Marker Size and Label Size alert when typed out of range (#11768) (#13530)
* Count tool: Marker Size and Label Size alert when typed out of range (#11768)

A value typed past 1..10 (Marker Size) or 8..72 (Label Size) becomes the
closest one, and leaving the field opens the reference's alert: "An integer
between 1 and 10 is required. Closest value inserted." (8 and 72 for Label
Size). The fields take digits only, so "2.6" reads as 26. One typed entry
is one History step; scrubs and arrow steps keep theirs.

* Count tool: an IME commit into a size field drops . and , too (#11768)

The size fields dropped decimal points from typed and pasted text only, so
"2.6" committed by an IME reached the parser and stored 3, not 10.
2026-11-14 14:35:05 +01:00
RickiNano c65e70d87a Lens Correction batch: a Grayscale 8-bit source comes out RGB 8-bit (#13990) (#14026)
File > Automate > Lens Correction now converts a Grayscale 8-bit scratch
document to RGB before the correction, so every File Type writes RGB 8-bit,
as the reference application does. RGB 8/16-bit, Grayscale 16-bit and CMYK
sources keep today's mode and depth.
2026-11-14 14:31:45 +01:00
FredApps b044610e5d Merge pull request #4931 from FredApps/docs/canvas-rotation-4911
Add 15-degree rotate-left/right canvas shortcuts
2026-11-14 12:16:43 +01:00
FredApps 59c82a73ce Merge pull request #3597 from FredApps/feat/3592-multi-layer-transform
Free Transform several selected layers together (#3592)
2026-11-14 12:16:38 +01:00
RickiNano b9e3107535 raw: the look-fit fixture comment names its 12-bit encoding scale 2026-11-14 11:33:17 +01:00
Hasan-Zayni 204f6555ab Bring the photocraft-raw integration tests back in line with craft-raw
Only DNG samples are lifted to the saturation plateau again, as before the
craft-raw migration. The testgen fixtures write what cameras write (Model in
IFD0, bit-packed deflate, word-aligned RAF rows, rotated RW2 fields), and the
tests follow craft-raw's behaviour: float DNG data, crop clipping, opcodes
handed to development, measured NEF layouts, RGGB Bayer RAF. Tests of
retired behaviour are removed; the ORF cut-in-IFD0 guard is kept ignored.
2026-11-14 13:14:03 +03: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
RickiNano aa24d3ec66 svg: charge refused rechecks too, and stop classifying once over budget
Review on #14385: a second unpack refused for size returned without
charging the recheck allowance, so each later oversized SVGZ could repeat
a near-budget inflation.

Every second unpack is now charged at least what it unpacked (its whole
limit when refused for size or damaged), so all of them stay within one
byte budget per drawing, and nothing more is classified once the drawing
is over budget.
2026-11-14 10:34:14 +01:00
RickiNano 920bf7f7c3 svg: classify byte refusals by craft-svg's own unpack, rechecks within one budget
Review on #14385: craft-svg limits an embedded SVG's bytes before it
decodes them, so a Latin-1 document fits and is charged its longer UTF-8
text; the wrapper counted that as an unread charge and then let a later
refusal pass. And after an unreadable image, every later refused image
was unpacked again against almost the whole budget.

note_byte_refusal now unpacks within what craft-svg has left, as it does:
accepted is not a refusal, whatever it is charged. Only a size refusal
after unread charges is unpacked again, within the budget less the
drawing's content and within one budget of rechecks per drawing; past
either, the drawing is over budget.
2026-11-14 10:22:17 +01:00
RickiNano 5abe121ef5 svg: an embedded SVG past the whole byte budget fails after an unreadable one too
Review on #14385: once an unreadable embedded SVG had been charged the
rest of the byte budget, every later image refused for bytes was left
out, including one too large for the whole budget on its own.

The bounded resolver now counts what craft-svg charged images it could
not unpack (and readable ones those charges starved), and checks each
image against the budget less only the drawing's own content. An image
past that still fails a non-strict parse; one refused only because of
those charges is left out.
2026-11-14 10:08:03 +01:00
RickiNano 2c8fab58ef ui-egui, raw: fix the two main CI failures left by the craft-libs format migration
- ui-egui: the typed TIFF open path is taken on TIFF magic bytes again, not on a
  `.tif` name. `photocraft_formats::detect(name, ..)` falls back to the extension,
  so any `.tif` file bypassed the import service (#14236);
  `files_dropped_with_no_document_open_all_open` caught it.
- raw: `recovers_a_known_matrix_and_curve` pins its fixture's white level to the
  12-bit range. craft-raw's NEF reader ignores a WhiteLevel tag and read the
  synthetic image's flat brightest patch (2370) as a saturation plateau, which
  skewed the fitted tone curve.
2026-11-14 10:06:04 +01:00
Hasan-ZayniandClaude Sonnet 5.5 2dcf69e9af svg: opening a file leaves out an embedded image over a budget instead of refusing the file
Since the craft-svg migration, parse_with failed the whole drawing whenever the
resolver refused an embedded image for the raster-pixel or byte/nesting budget.
The resolver already leaves such an image out of the tree, so the drawing can
still open, as it did before. The bounded smart-object path keeps refusing.

Fixes three tests in photocraft-io --test it: embedded_png_with_a_huge_claimed_size_is_not_decoded,
gzip_compressed_embedded_svg_decompresses_once_with_a_size_cap,
an_embedded_svg_gets_only_the_nesting_depth_the_drawing_left.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-14 11:51:34 +03:00
RickiNano 6b28346f2b svg: note each embedded SVG refusal's reason instead of inferring it
Review on #14385: inferring the reason from craft-svg's totals refused a
drawing with a damaged embedded SVGZ (charged the whole byte budget like
a nested gzip), and one with a chain at the cap beside an image only too
deep in XML.

The bounded resolver now repeats craft-svg's first two checks for each
embedded SVG, in its order: the chain depth, then unpacking within what
the byte budget has left. Only a refusal at the chain cap or for bytes
fails a non-strict parse; an image that can't be unpacked is left out,
and so are images refused for bytes after it spent the budget.
2026-11-14 09:49:09 +01:00
RickiNano cc349b165f svg: bounded parse refuses embedded SVG chains past the byte or nesting budget (#14356)
craft-svg counts an embedded SVG refused for the byte budget, the chain
depth, the shared XML depth or gzip inside gzip as one svg_limit image,
and charges it whatever the byte budget had left. c2689ba21 let a
non-strict bounded parse leave all of them out, so a chain of embedded
SVG images past the 16 MiB budget rendered with its innermost images
dropped instead of being refused.

The bounded resolver now also notes gzip-in-gzip images, and a non-strict
parse is refused when the byte budget is spent (unless a nested gzip
spent it) or the chain reached MAX_EMBEDDED_SVG_DEPTH. An image only
nested too deeply in XML, or holding gzip inside gzip, is still left out.
2026-11-14 09:28:27 +01:00
RickiNano 9d80876f70 automation: write guard counts only codecs this build writes
`written_kind` and `holds_image` accepted any format the codec registry
knows, so an existing PCX, XPM, DICOM or HEIF file (by name), or any file
starting with an XPM header, could be replaced although PhotoCraft only
reads those formats. Require the codec's write capability in both.
2026-11-14 09:19:52 +01:00
RickiNano 175a02deda automation: write guard no longer replaces text and office files (#14355)
#14236 moved `written_kind` and `holds_image` from the image codec
registry (`photocraft_codecs`) to `photocraft_formats`. That registry
also maps txt/md/csv/rtf and office files, and sniffs RTF, PDF and zip
containers by their bytes, so the #9439 guard let a save or render
replace an existing notes file. Use the codec registry again and drop
the `photocraft-formats` dependency that only these two lines used.

Fixes #14355
2026-11-14 09:00:45 +01:00
Dylan M. Taylor 5b27ff6fe3 Merge pull request #14286 from storytold/codex/fix-ci
Fix Open As forced format routing when bytes match another codec
2026-11-14 00:44:24 -05:00
Dylan M. Taylor c2689ba214 svg: fix bounded non-strict embedded SVG limit handling and test assertions 2026-11-14 05:42:55 +00:00
Dylan M. Taylor 3636faa008 io, engine: respect forced Open As extension before magic-byte sniffing 2026-11-14 05:25:02 +00:00
dotCooCoo 1da45bf412 Merge main into fix/font-family-options-test-settles 2026-11-13 20:58:50 -08:00
Dylan M. Taylor fc7e37650d Merge pull request #14268 from storytold/codex/photocraft-ci-fix
Fix CI formatting, clippy, scorecard, and format routing regressions
2026-11-13 23:53:17 -05:00
Dylan M. Taylor 13fe2864af Fix CI formatting, clippy, scorecard, and format routing regressions 2026-11-14 04:52:59 +00:00
dotCooCoo 1bd15f9862 Merge main into fix/type-bar-ids-stable-on-font-load 2026-11-13 20:48:07 -08:00
Dylan M. Taylor 7d29291ee0 Merge pull request #14248 from storytold/codex/photocraft-store-test-fix
format: align store tests with craft-pcraft-bundle
2026-11-13 23:08:10 -05: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
Dylan M. Taylor cf73e749c4 Merge pull request #14220 from storytold/photocraft-craftlibs
Migrate CMS, Affinity, KRA/ORA/XCF/PDN, and SVG formats to craft-libs (#778)
2026-11-13 22:13:00 -05:00
David Mann f143ce5849 Merge pull request #14097 from TrevorBrown-dev/fix/open-as-error-names-the-file-14049
Open As: an error names the file that was chosen and the format asked for (#14049)
2026-11-14 01:54:10 +01:00
David Mann 922e2ae29c Merge pull request #14088 from TrevorBrown-dev/fix/open-recent-after-smart-object-14053
File menu: Open Recent comes after Open as Smart Object (#14053)
2026-11-14 01:53:42 +01:00
David Mann faa588f7d9 Merge pull request #13985 from RickiNano/feat/copyright-title-13821
File Info: a Copyrighted document shows © before its name in the tab and window title (#13821)
2026-11-14 01:39:31 +01:00
David Mann 31fdfd2afa Merge pull request #14083 from ljkx/fix/14029-new-document-history-state
New Document: the first History state is New, not Open (#14029)
2026-11-14 01:39:15 +01:00
David Mann 36fa50e0e6 Merge pull request #13751 from rmsff/fix/direct-selection-options-bar-13219
Direct Selection: share the Path Selection options bar
2026-11-14 01:38:55 +01:00
David Mann 25f83a2135 Merge pull request #13697 from rmsff/fix/path-selection-cursor-13295
Path Selection: its own arrow cursor instead of the crosshair
2026-11-14 01:38:40 +01:00