Commit Graph
2130 Commits
Author SHA1 Message Date
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
Dylan M. Taylor ecee693322 Merge pull request #1171 from dylanmtaylor/codex/photocraft-format-library
Add shared image codec facade
2026-11-13 22:38:50 -05:00
Dylan M. Taylor 2bc600186f Align IDML story test with typed destinations 2026-11-14 03:30:34 +00:00
Dylan M. Taylor 2239b0afb0 Merge pull request #1246 from storytold/prc-compressed
craft-prc: rebuild compressed tessellations whose normals are recalculated (#778)
2026-11-13 22:27:44 -05:00
Dylan M. Taylor f72b69699f craft-prc: rebuild compressed tessellations whose normals are recalculated (#778) 2026-11-14 03:27:29 +00:00
Dylan M. Taylor d9284894ba Merge pull request #1243 from dylanmtaylor/codex/eps-postscript-numeric-operators
craft-eps: share PostScript numeric operators
2026-11-13 22:26:11 -05:00
Dylan M. Taylor 49056e5408 image-codecs: align JPEG tests with progressive support 2026-11-14 03:21:46 +00:00
Dylan M. Taylor c82c83043a Update lockfile after main merge 2026-11-14 03:12:15 +00:00
Dylan M. Taylor 0b1688098a fix(anicraft): preserve invalid envelope diagnostic 2026-11-14 03:12:01 +00:00
Dylan M. Taylor 840d156fbf Merge current main into image codec extraction 2026-11-14 03:10:53 +00:00
Dylan M. Taylor 7f59e8f3f5 fix(docx): preserve case-insensitive main part fallback 2026-11-14 03:04:54 +00:00
Dylan M. Taylor 427fa15899 Merge pull request #1223 from storytold/codex/anicraft-xfl-format
Add bounded XFL FLA package reader
2026-11-13 22:01:31 -05:00
Dylan M. Taylor 9a2dafbf7d Move native format identity into shared crate 2026-11-14 02:47:40 +00:00
Dylan M. Taylor 5df4b49f8c feat(anicraft-format): extract versioned JSON envelope 2026-11-14 02:46:10 +00:00
Dylan M. Taylor fbbebecf27 Preserve conventional Word part fallback 2026-11-14 02:28:04 +00:00
Dylan M. Taylor 964ccae812 craft-eps: share PostScript numeric operators 2026-11-14 02:26:40 +00:00
Dylan M. Taylor 545155124f feat(xfl): parse native edge attributes (M4) (#1232) 2026-11-13 21:12:36 -05:00
Dylan M. Taylor de7640a006 feat(xml): preserve strict end-tag parsing as an option 2026-11-13 21:11:56 -05:00
alehelandClaude Opus 5.5 7c652beec4 craft-audio: review fixes, round 1 (#446)
- `Encoder::with_application` checks the channel count before clamping
  the bitrate, so 86 channels or more return `Error::Channels` instead
  of panicking in `clamp`. Tested with 86 and 255.
- The ffmpeg oracle test skips a missing `opus`/`libopus` decoder
  through the testkit's `skip`, so `CRAFT_MEDIA_REQUIRE_ORACLES=1` fails
  it.
- README: the encode example pads at least the pre-skip after the audio
  before rounding up to a frame, so the encoder delay is flushed; the
  MP4 note says an explicit edit replaces the `media_start` edit and
  gives its fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:09:46 -05:00
alehelandClaude Opus 5.5 bdf8cb2a19 craft-audio: Opus encoder
EffectCraft's `effectcraft-opusenc` as `opus::encoder` (and
`opus::Encoder`) behind `opus-encode`: SILK, hybrid and CELT, 48 kHz,
20 ms frames, mono or stereo. The constructors and `encode_float`
return `Result` instead of panicking. `Bandwidth` is one type for the
decoder and the encoder, and the two `Mode` enums convert into each
other. `encode` now turns on `opus-encode`.

The encoder tests (modes, ffmpeg's two Opus decoders as oracles) and
`TrackDecoder` on Opus without an `OpusHead` come with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:09:46 -05:00
Dylan M. Taylor 33958638b2 Validate XFL archive end record candidates 2026-11-14 02:06:54 +00:00