- build: fail on unreadable folders/entries (only a missing pending/ is empty);
detect a step by its declaration, not a substring
- container: commit part state only after the write; honour cancellation
before each part and between pieces of a long one; count written parts in
room(); bound the initial read to the approved length; enforce per-part
limits when reading; check both thumbnail part limits before writing
- lib: crate-root deny lints; parse the legacy prefix on its own
- newer: retained container.json needs a container; index list anchors;
report a retained field an edit replaced
On panic = "abort" targets (wasm32) the catch_unwind fallback can't run, so
frames whose first component is sampled below the frame's largest factors
go to craft-jpeg before zune-jpeg is called.
zune-jpeg allocates its whole output before reading a scan, so
decode_jpeg_inks now applies decode's scan-data guard (one byte for every
2048 pixels, counted on scan data, not APP padding) first. The comparison
test's noise is computed in u64, so it doesn't overflow on 32-bit targets.
Addresses CodeRabbit on #1777: ByPolygonVertex/ByControlPoint material IDs use the
polygon's first corner instead of the polygon number; an earlier texture candidate
is tried before a later cached one; regression test for strict colours reading the
validated layer.
Addresses the CodeRabbit review on #1692: odd-width raw RGB rows carry a pad byte,
and BI_BITFIELDS is only BGRX with the matching masks (new from_avi_bitfields).
GridCraft's native workbook format, moved from storytold/gridcraft at
1d0b311b: the `.json`/`.scjson` extensions (crates/engine/src/io.rs), the
reader and its error text (io.rs), and the pretty writer with newer macros kept
unread and appended to `macros` as the file held them
(crates/engine/src/macros/mod.rs json_bytes).
The Workbook model, the index rebuilds after a read, and macro reading stay in
GridCraft. The consumer's golden test shows saved bytes are unchanged.
Part of #778.
Problem: DNG opcode lists were ignored, so lens shading gain maps
(phones and many cameras), bad pixel maps, vignette and distortion
corrections and trims that a file asks for were silently left out,
and an opcode a reader must apply could not be refused.
Fix (DNG 1.7.1.0 chapter 7): a big-endian opcode list parser (at most
256 opcodes, every count checked against the parameter bytes before
allocating) and the opcodes WarpRectilinear, WarpFisheye,
WarpRectilinear2 (with the skip rule), FixVignetteRadial,
FixBadPixelsConstant / List, TrimBounds, MapTable, MapPolynomial,
GainMap, DeltaPerRow / Column and ScalePerRow / Column. OpcodeList1 runs
on the stored samples (0-65535), OpcodeList2 on the linear values
before white balance (the fused normalise splits only then),
OpcodeList3 on the demosaiced camera values; values are clipped after
each opcode. Unknown opcodes or ones newer than 1.7.1.0 are skipped
when optional and an error naming them when mandatory; preview-only
opcodes are skipped on the reduced-resolution path, and a mandatory
OpcodeList3 keeps full resolution. Interpretations where the spec
leaves room are recorded in the README. Files without opcode lists
develop exactly as before.
Tests: unit tests per opcode with known results (tables, polynomials,
deltas, scales, gain map interpolation and edge replication, vignette,
warps reproducing a ramp, fisheye, the skip rule, bad pixels, trim,
hostile parameters) and whole-file tests of each list's stage, the
optional flag, the preview path, and 3000 mutations under catch_unwind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>