Commit Graph
1142 Commits
Author SHA1 Message Date
Dylan M. Taylor 2d74ae4aab io: retain note popup normalization and target layered TIFF tests 2026-11-15 15:14:57 -05:00
Dylan M. Taylor e879da042c fix: preserve bounded annotation text and unchanged legacy bytes 2026-11-15 14:22:37 -05:00
Dylan M. Taylor 3c3976e4b9 Merge current main while preserving shared annotation codec 2026-11-15 14:13:07 -05:00
Dylan M. Taylor 3f29649ff4 test(io): handle fallible palette PSD conversion results 2026-11-15 10:10:39 -05:00
Dylan M. Taylor 57c79bc82f Merge pull request #15100 from storytold/refactor/linked-shared-records
io: cut PSD linked-record parsing and editing over to craft-psd
2026-11-15 09:50:43 -05:00
Dylan M. Taylor 14bcf7962e test(io): document bounded annotation smart-source fallback 2026-11-15 09:29:05 -05:00
Dylan M. Taylor db0ff2778e io: delegate PSD annotations to shared bounded codec 2026-11-15 09:27:42 -05:00
Brandon Thomasandwstock 4bd0727b9f test(io): retain original annotation writer as parity oracle
Source: PhotoCraft aa87012a and saturation correction 0d6e58e2. Frozen test-only writer; application adaptation follows separately.

Co-authored-by: wstock <[email protected]>
2026-11-15 09:27:42 -05:00
Dylan M. Taylor a7cae622cd merge: retain latest main adapters with shared linked records 2026-11-15 08:54:27 -05:00
FredApps 4ff1927338 fix(svg): enforce decoded text budget during embedded image retries 2026-11-15 14:29:35 +01:00
David Mann 5bdbcc1181 Merge pull request #14595 from davidmann4/fix/14592-main-green
main CI green: SVG, .pcraft store, raw and flaky-test fixes in one PR (#14592)
2026-11-15 13:28:31 +01:00
Dylan M. Taylor d94f9701af io: remove local PSD linked parsing and editing in favor of craft-psd 2026-11-15 06:26:19 -05:00
Brandon Thomas e6c9763ead test(io): freeze original linked-record implementation for parity
Test-only oracle from PhotoCraft abb30dff47 crates/io/src/linked.rs. The original parser/writer is by Brandon Thomas (536a7346fb); includes subsequent contributor fixes from source history. This module is compiled only through cfg(test).
2026-11-15 06:26:19 -05:00
skylar taylor-barrick c162cb6d63 Bound SVG test failure diagnostics without weakening assertions (#15014)
* test(io): bound SVG fixture failure diagnostics

* test(io): keep diagnostic regressions bounded on failure
2026-11-14 23:08:28 -06:00
FredApps fa8228698b Merge current main; retain strict SVG depth boundary regression 2026-11-15 01:46:11 +01:00
FredApps 50ceabe439 fix(io): reject decoded SVG budget overflow with corrected codecs 2026-11-15 01:41:54 +01:00
Dylan M. Taylor 72feedae59 svg: update deepest chain test for non-strict embedded SVG omission 2026-11-15 00:33:25 +00:00
Dylan M. Taylor fd105cccc4 Pin hardlink write-over behavior in the workspace (#14833)
* io: assert the embedded-SVG depth boundary is blank

The deepest-chain test treated any Ok raster as an accepted chain. At MAX_EMBEDDED_SVG_DEPTH + 1 the bounded non-strict path intentionally omits the image and returns a transparent canvas, so the test asserted the opposite of the documented behavior. Check that the over-limit image is blank instead.

* automation: pin hardlink write-over behavior

A hardlink inside a granted root shares the inode of its other name, so reads can see that content. Document that a write-over atomically replaces the directory entry inside the root and leaves the other name untouched, with a Unix regression test.
2026-11-14 17:31:37 -05:00
Dylan M. Taylor 6297515031 chore: cut over remaining resvg and roxmltree usages to craft-svg and craft-xml (#14320)
* chore: cut over remaining resvg and roxmltree usages to craft-svg and craft-xml

* Cut over remaining photocraft-io TIFF tests, rawinfo example, and move exr to dev-dependencies

* chore: remove unused zune-jpeg workspace dependency

* style: cargo fmt
2026-11-14 13:49:42 -05:00
David Mann 658963415a Merge branch 'pr-14397' into fix/main-green 2026-11-14 15:22:29 +01: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
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
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
Dylan M. Taylor 13fe2864af Fix CI formatting, clippy, scorecard, and format routing regressions 2026-11-14 04:52:59 +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 02ae5fd404 affinity: warn on converted artboard outlines 2026-11-14 00:29:55 +00:00
Dylan M. Taylor 8c7544ed2a Use craft-affinity from craft-libs; remove crates/affinity 2026-11-14 00:16:50 +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
Dylan M. Taylor 8e78a9c1fe Merge switch-craft-svg: use craft-svg for SVG sniffing, SVGZ and draw-memory check (#13417) 2026-11-13 23:59:37 +00:00
Dylan M. Taylor 8f5aad2360 Merge switch-craft-kra-ora-xcf: use craft-kra, craft-ora, craft-xcf and craft-pdn (#13415) 2026-11-13 23:55:49 +00:00
Trevor BrownandClaude Sonnet 5.5 87ee062e41 Merge remote-tracking branch 'upstream/main' into fix/13350-triangle-fills-box
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-13 05:53:44 -05: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 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 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
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
Trevor BrownandClaude Sonnet 5.5 303be52228 Triangle tool: the triangle fills its box, as its own live kind (#13350)
A new live shape kind, LiveShape::Triangle { rect, corner_radius }, draws an isosceles triangle that fills the dragged box (apex at the top centre, then bottom right, bottom left). The engine no longer turns a triangle into an inscribed 3-sided polygon. Triangles saved before this are 3-sided polygons and keep that geometry.

The .pcraft manifest stores a live triangle in a new optional triangle_live field beside live (as arrow_live does), so older builds open the file and show the saved path. PSD export writes no vogk for a triangle, as for polygons.

Arms the new kind forces: live_kind, the axis-aligned transform, params, the corner radius widgets and the Properties Shape section (Corner radius only). Shift keeps today's equilateral triangle, sent as its tight box.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Model-Effort: Opus 5.5 drove; Fable 5.2 briefed; Sonnet 5.5 wrote at medium
2026-11-12 19:27:36 -05:00
David Mann 721d5f521c Merge branch 'main' into fix-12010-gradient-alpha-method (merge queue) 2026-11-13 00:58:35 +01:00
vangel76andClaude Sonnet 5.5 0c4eccefb2 test(io): size the Affinity shape-cache test's pixel budget in whole tiles
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-13 00:14:41 +01:00
vangel76 70f9048bb9 Merge remote-tracking branch 'upstream/main' into HEAD 2026-11-13 00:13:33 +01:00
vangel76 e2bd73c406 Merge remote-tracking branch 'upstream/main' into HEAD 2026-11-13 00:09:01 +01:00
Dylan M. Taylor 5092e62512 Merge remote-tracking branch 'origin/main' into switch-craft-svg
# Conflicts:
#	Cargo.lock
2026-11-12 07:55:24 +00:00
Dylan M. Taylor 8f780afad2 Merge remote-tracking branch 'origin/main' into switch-craft-kra-ora-xcf
# Conflicts:
#	Cargo.lock
2026-11-12 07:54:52 +00:00
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
Dylan M. Taylor 09687493bc svg: a doubly compressed embedded SVG leaves only that image out, as before 2026-11-12 04:51:45 +00:00
Dylan M. Taylor d7f3793b63 Use craft-kra, craft-ora, craft-xcf and craft-pdn from craft-libs for the format code 2026-11-12 04:51:45 +00:00