Commit Graph
2150 Commits
Author SHA1 Message Date
Trevor Brown 25d56bb49c Merge upstream/main into fix/web-jpeg-oversized-xmp 2026-11-14 08:32:33 -05:00
Dylan M. Taylor d15bf1f35b Merge pull request #1288 from despotak/fix/12473-jpeg-past-2-30
image-codecs: jpeg_info, a JPEG's frame and held coefficients from its markers
2026-11-14 07:42:05 -05:00
Dylan M. Taylor 94777dcf7f Merge pull request #1298 from dylanmtaylor/codex/jpeg-baseline-encoder
jpeg: add optimized baseline encoder
2026-11-14 07:30:54 -05:00
aiongg ea1c84290d image-codecs: list InkSet and ExtraSamples on TiffPage (#1307)
* image-codecs: list InkSet and ExtraSamples on TiffPage

* image-codecs: TiffPage InkSet and ExtraSamples as enums

* image-codecs: InkSet::InkNames, and Invalid for undefined tag values
2026-11-14 07:18:01 -05:00
Dylan M. Taylor 1118899c28 Merge pull request #1299 from dylanmtaylor/codex/rtf-unicode-compat
craft-rtf: preserve legacy Unicode escape handling
2026-11-14 07:15:01 -05:00
Dylan M. Taylor 4b81cbae60 Merge pull request #1296 from dylanmtaylor/codex/docx-invalid-ilvl
fix(docx): ignore malformed list levels
2026-11-14 07:00:18 -05:00
Trevor Brown db474747d0 image-codecs: wrap the encode_jpeg_rgb8 doc comment like the rest of the file 2026-11-14 06:44:08 -05:00
Trevor Brown a2722537fc image-codecs: the web JPEG encoder trims or leaves out an XMP packet past one segment
encode_jpeg_rgb8 wrote the XMP packet straight into an APP1 segment, so a packet past the limit failed the whole encode. It now builds the segment with the shared jpeg::xmp_segment, as the other JPEG paths do, and jpeg_xmp_fits tells callers whether the XMP will be written.
2026-11-14 06:43:36 -05:00
Dylan M. Taylor 7e4ff41f16 Merge pull request #1284 from storytold/codex/docx-underline-off
wordmodel: honor explicit underline off values
2026-11-14 06:35:21 -05:00
Dylan M. Taylor 9ce392cb6a jpeg: document baseline encoding 2026-11-14 11:21:01 +00:00
Dylan M. Taylor 55901e1d1a jpeg: assert encoded chroma sampling factors 2026-11-14 11:17:30 +00:00
Dylan M. Taylor 1a950613f9 Merge remote-tracking branch 'origin/main' into codex/jpeg-baseline-encoder 2026-11-14 11:13:33 +00:00
41fb227542 feat(ps): add bounded shared PostScript EPS reader (#1276)
* feat(ps): add craft-ps with an EPS reader (read feature)

The reading half of craft-ps (#115): a clean-room PostScript interpreter
that runs an EPS and returns what it paints as a one-page vector PDF of
its bounding box, colours kept, so apps can draw and export EPS as a
placed PDF. Moved from DesignCraft (storytold/designcraft, where it was
written for placed EPS), with its app-specific names made neutral.

Written from the PostScript Language Reference (3rd ed.), the EPS
specification, the Type 1 Font Format and Adobe TN 5012/5176/5177.
Covers the language, paths, clipping, strokepath, device/Separation/
DeviceN/Indexed/ICCBased/Lab colour, images with lazily decoded filters,
shadings 1-7 and patterns, and Type 1/3/42/CFF/CID text through CMaps,
horizontal and vertical.

Bounded: each operator charges work proportional to its operands
against the step limit as it goes, every byte read or decoded counts,
copies count against the memory cap; defaults 50 M steps / 1 GiB, and
20 M / 256 MiB on wasm32. No panics (deny lints, fuzzed in debug
builds). 34 tests, the Type 42 one on a TrueType font built in the
test. No new external crates: pdf-writer, miniz_oxide, weezl, skrifa
and kurbo are already locked at these versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* clippy(ps): document stateful decoder complexity

* fix(ps): bound huge arc angle normalization

* fix(ps): preserve EffectCraft EPS text and limits parity

* fix(ps): address interpreter review findings

* fix(ps): preserve composite glyph paint order

* fix(ps): address interpreter review findings

* fix(ps): bound filter buffers and preserve file aliases

* fix(ps): make predictor allocation fallible

---------

Co-authored-by: markus.doebele <markus.doebele@top21.sh>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:10:27 -05:00
Dylan M. Taylor 4fa98367f8 rtf: preserve legacy invalid Unicode handling 2026-11-14 11:10:12 +00:00
Dylan M. Taylor 1cc7a21416 jpeg: add optimized baseline encoder 2026-11-14 11:05:21 +00:00
Dylan M. Taylor 4baa7d81ca fix(docx): ignore overrides without a list level 2026-11-14 10:57:01 +00:00
Dylan M. Taylor 7ac384839d fix(docx): ignore malformed list levels 2026-11-14 10:45:23 +00:00
Dylan M. Taylor b473c24097 wordmodel: honor explicit underline off values 2026-11-14 10:05:58 +00:00
ChristosandΝύξ 🌑 b270477c25 image-codecs: count the coefficients of a frame whose first scan lacks components
zune-jpeg also holds every coefficient beside its output when an 8-bit
sequential frame's first scan lacks some of its components: no row is
finished until the scans that bring the others. jpeg_info now reads the
first scan's component count and reports these as held_coefficients
(was progressive_coefficients). The #12473 map rewritten with one
component per scan was admitted at 12.6 GB without this, and
OOM-killed in a 14 GB cgroup.

Co-Authored-By: Νύξ (Nyx, AI) 🌑 <nyx@despotak.is>
2026-11-14 12:05:41 +02:00
ChristosandΝύξ 🌑 b3558f6821 image-codecs: test jpeg_info with four and two components
Four components read as CMYK. Two, a layout decode doesn't return,
give None.

Co-Authored-By: Νύξ (Nyx, AI) 🌑 <nyx@despotak.is>
2026-11-14 12:05:41 +02:00
ChristosandΝύξ 🌑 44dfda20d7 image-codecs: count the coefficients an 8-bit progressive decode keeps
zune-jpeg keeps every coefficient of an 8-bit progressive frame (SOF2)
beside its output: 2 bytes per sample, per component at its sampling.
That is 9.85 GB for a 48,000 x 34,200 4:4:4 file, more than the decoded
image. JpegInfo::progressive_coefficients reports them from the frame
header, so a caller can admit the decode against its real peak.

Co-Authored-By: Νύξ (Nyx, AI) 🌑 <nyx@despotak.is>
2026-11-14 12:05:41 +02:00
ChristosandΝύξ 🌑 7ff39bfda8 image-codecs: read a JPEG's frame from its markers (jpeg_info)
For storytold/photocraft#12473: PhotoCraft lifts its 2^30 px JPEG cap
only after admitting the decode against free memory, and for that it
needs the frame before decoding. jpeg_info reads it from the markers
alone: the stored size, the layout decode returns, and
whole_coefficients, set when decode hands the file to craft-jpeg
(arithmetic-coded, lossless or 12-bit frames), whose working set is
several times the decoded image. None without a frame of 1, 3 or 4
components.

This was part of storytold/photocraft#12604 until
storytold/photocraft#14236 moved the codecs here.

Co-Authored-By: Νύξ (Nyx, AI) 🌑 <nyx@despotak.is>
2026-11-14 12:05:40 +02:00
Dylan M. Taylor f0f4758c01 image-codecs: preserve PNG HDR metadata and PQ output (#1249)
* image-codecs: preserve PNG HDR colour metadata and PQ output

* image-codecs: keep PQ PNG dimension checks overflow-safe

* image-codecs: test empty PQ PNG input rejection

* fix(png): preserve HDR color metadata semantics
2026-11-14 04:08:23 -05:00
Dylan M. Taylor b423529943 Merge pull request #1247 from storytold/codex/craft-xfl-sfx
fix(xfl): support self-extracting archive offsets
2026-11-14 03:49:55 -05:00
Dylan M. Taylor cca7733f21 perf(xfl): cache candidate directory validation 2026-11-14 07:30:14 +00:00
Dylan M. Taylor 506610767b Merge pull request #1266 from storytold/codex/docx-measure-clamp
docx: clamp large measurements in f64
2026-11-14 02:21:06 -05:00
Dylan M. Taylor f5ccaba5d3 Merge pull request #1265 from storytold/codex/docx-notes-fallback
docx: read conventional footnote and endnote parts
2026-11-14 02:20:44 -05:00
Dylan M. Taylor 899e396b9e Merge pull request #1272 from storytold/codex/idml-value-compat-main
fix(idml): preserve transforms and text variable values
2026-11-14 02:17:53 -05:00
Dylan M. Taylor e1c84a471c fix(xfl): validate shifted EOCD candidates 2026-11-14 07:13:44 +00:00
aiongg b1b4602a71 designcraft-format: linked assets, proxy previews, streaming write (format 5) (#1264)
* designcraft-format v5: linked assets, proxy previews, streaming write_to

* Skip bytes of linked assets, latch writer errors, charge failed proxy reads
2026-11-14 02:12:23 -05:00
Dylan M. Taylor 9dcbd90c7d Merge pull request #1275 from storytold/codex/docx-wordcraft-parity
fix(docx,wordmodel): style revisions, lnNumType guard, deterministic Paragraph Debug
2026-11-14 01:11:52 -05:00
Dylan M. Taylor 9ea7a82027 fix(docx,wordmodel): preserve style revisions, lnNumType countBy guard, and deterministic Paragraph Debug 2026-11-14 06:11:36 +00:00
Dylan M. Taylor 9444213901 Merge remote-tracking branch 'origin/main' into codex/idml-value-compat-main 2026-11-14 06:08:45 +00:00
Dylan M. Taylor 32e802fa08 Merge remote-tracking branch 'origin/main' into codex/docx-measure-clamp 2026-11-14 06:06:54 +00:00
Dylan M. Taylor c2a5eca2e3 Merge remote-tracking branch 'origin/main' into codex/docx-notes-fallback 2026-11-14 06:06:51 +00:00
Dylan M. Taylor 8a184f715b Merge remote-tracking branch 'origin/main' into codex/craft-xfl-sfx 2026-11-14 06:04:56 +00:00
Dylan M. Taylor 52e1329ce3 Merge pull request #1261 from dylanmtaylor/codex/image-codecs-metadata-cutover
image-codecs: delegate metadata edits to craft-metadata
2026-11-14 01:04:11 -05:00
Dylan M. Taylor 07e89ad30a fix(idml): preserve transforms and text variable values 2026-11-14 05:51:17 +00:00
Dylan M. Taylor 6c894be829 Merge pull request #1180 from dylanmtaylor/codex/craft-idml-geometry
craft-idml: strict bounded path geometry reader
2026-11-14 00:46:14 -05:00
Dylan M. Taylor e58cd131af test(svg): use tree-depth limit for referenced depth 2026-11-14 05:17:03 +00:00
Dylan M. Taylor d2fd4fb09e Clamp OOXML measurements before f32 conversion 2026-11-14 04:54:11 +00:00
Dylan M. Taylor 0559e4214e Read conventional footnote and endnote parts 2026-11-14 04:48:57 +00:00
Dylan M. Taylor 9481cecd22 docs: clarify shared resolution precedence 2026-11-14 04:24:37 +00:00
Dylan M. Taylor c526df24f3 image-codecs: delegate metadata edits to shared crate 2026-11-14 04:22:36 +00:00
Dylan M. Taylor 1c6ac2e086 fix(xfl): honor the ZIP64 entry-count sentinel 2026-11-14 04:02:41 +00:00
Dylan M. Taylor b77af389f3 Merge pull request #1245 from storytold/codex/anicraft-envelope
feat(anicraft-format): extract native JSON envelope
2026-11-13 23:01:08 -05:00
Dylan M. Taylor f9f9e11fd9 Merge pull request #1244 from storytold/codex/docx-conventional-part-fallback
craft-docx: keep conventional parts without relationships
2026-11-13 22:55:28 -05:00
Dylan M. Taylor a6b246ebef fix(xfl): support self-extracting archive offsets 2026-11-14 03:49:42 +00:00
Dylan M. Taylor e2dc681a3a Merge pull request #1197 from dylanmtaylor/codex/photocraft-psd-zlib-stream
PSD: expose incremental zlib stream encoding
2026-11-13 22:39:04 -05:00
Dylan M. Taylor fd708734aa Merge pull request #1182 from storytold/codex/photocraft-file-caps
Add shared format capability catalog
2026-11-13 22:38:59 -05:00