byte-codec@1.4.0
·
200 commits
to main
since this release
1.4.0 (2026-09-06)
Features
- byte-codec: encode indexed-colour PNGs when the palette is small enough (3693ff9)
Bug Fixes
- byte-codec: bound encodePng's pixel count, not just each dimension (fcd60a9)
- byte-codec: default a missing PNG sample to 0 in detectPalette, matching writeTruecolorPng (dd08e0b)
- byte-codec: encode both indexed and truecolour, keep whichever is smaller (2e56095)
- byte-codec: reject a PNG width or height at or above 2^31 (6b1d6f9)
- byte-codec: reject a zero-dimension image outright instead of an invalid truecolour fallback (c956c70)
- byte-codec: reject NaN and fractional PNG dimensions, not just non-positive ones (6f38a41)
- byte-codec: reject the indexed path for a zero-dimension image (6128620)
- byte-codec: stop encodePng emitting an invalid zero-length tRNS chunk (c89d64f)
Documentation
- byte-codec: cite libpng's real source instead of an in-file verification that doesn't exist (7268133)
- byte-codec: correct PNG_MAX_PIXELS comment's sensor and timing claims (00a6dec)
- byte-codec: describe encodePng's indexed-colour output (66f175f)
- byte-codec: document encodePng's throw-on-invalid-dimensions behaviour (b507acd)
- byte-codec: fix a fabricated libpng quote and a PNG-spec misattribution (6105940)
- byte-codec: fix a reintroduced IHDR spec-section citation (96b3759)
- byte-codec: note encodePng's double-encode cost for indexed-eligible images (d55c978)
Tests
- byte-codec: cover a short data or alpha plane through the indexed PNG path (62d3334)
- byte-codec: cover generic PNG round-trips and cross-check IDAT against Node's own zlib (e57fca0)
- byte-codec: cover NaN and fractional dimensions in the invalid-dimension regression test (491dc18)
- byte-codec: give the 256-colour indexed-selection test a longer timeout (a9d2eb8)