Commit Graph
25 Commits
Author SHA1 Message Date
Dylan M. Taylor c2a69bbdc6 Preserve unmarked CMYK JPEG samples 2026-11-14 13:23:47 +00: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
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
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 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 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 49056e5408 image-codecs: align JPEG tests with progressive support 2026-11-14 03:21:46 +00:00
Dylan M. Taylor 1532c43674 Align EXIF thumbnail test with shared metadata 2026-11-13 07:33:07 -05:00
Dylan M. Taylor 38560a9ab6 Preserve malformed error for truncated oversized EXR 2026-11-13 06:51:57 -05:00
Dylan M. Taylor a07481b416 Bound EXR pixel area and SVG image recursion 2026-11-13 06:27:24 -05:00
Dylan M. Taylor d4685b2257 Retain GIF frame bounds when payload is truncated 2026-11-13 05:56:21 -05:00
Dylan M. Taylor 6417d6b90a Preserve shared format boundary behavior 2026-11-13 04:49:49 -05:00
Dylan M. Taylor 34f2d55dc0 Match Apple HEIF chroma reconstruction 2026-11-13 04:36:58 -05:00
Dylan M. Taylor 3fea43cf83 Match Apple HEIF chroma reconstruction 2026-11-13 04:36:50 -05:00
Dylan M. Taylor afe51ed11e Probe maximum raster frame allocation bounds 2026-11-13 01:51:42 -05:00
Dylan M. Taylor fdfb188855 Use array chunks for raster pixels 2026-11-13 01:24:36 -05:00
Dylan M. Taylor a47b78256c Expose shared embedded ICC extraction 2026-11-13 01:15:30 -05:00
Dylan M. Taylor 85145d8dfd Expose shared raster source and tone inspection 2026-11-13 00:58:35 -05:00
Dylan M. Taylor 3bdf0eaadd Format shared image codec crate 2026-11-13 00:17:35 -05:00
Dylan M. Taylor 9430f2807e Add shared image codec facade 2026-11-13 00:17:04 -05:00