Skip to content

v0.3.0

Choose a tag to compare

@pi0 pi0 released this 25 Sep 21:23
· 7 commits to main since this release

🚀 Enhancements

  • tiff: Support BigTIFF (4e754b0)
  • ktx: Support KTX 2.0 (7a766b9)
  • Support JPEG XL (c9e5e6b)
  • ⚠️ Report the largest image of multi-image files (ccd03d3)
  • jpg: Support lossless and arithmetic-coded frames (94c7ec7)

🔥 Performance

  • Compare box types and segment markers as numbers instead of decoded strings (5e2eea3)

🩹 Fixes

  • svg: Ignore an <svg> tag inside an XML comment (#78)
  • icns: Reject truncated and zero-length entries (8a1da94)
  • ico: Validate image count against input length (d5806a3)
  • tiff: Read big-endian LONG tag values correctly (ec7ab13)
  • heic, avif: Apply clean aperture crop and validate boxes (3a69171)
  • jpg: Skip extraneous bytes between segments (cda47ea)
  • icns: Skip non-icon entries (cde19af)
  • Throw on truncated input instead of returning NaN sizes (92fc71e)
  • j2c: Subtract the image offset from the reference grid size (db4da5e)
  • svg: Parse viewBox values separated by commas or extra whitespace (871ded8)
  • Propagate NaN from signed readers on truncated input (6f1ecc3)
  • Reject zero width and negative sizes (4a6da3d)
  • tiff: Harden IFD parsing (c136a90)
  • jpg: Stop at start of scan and skip stuffed bytes when resyncing (31fe1f0)
  • jxl: Read container codestream boxes without copying or requiring the whole box (a79283b)
  • icns: Add missing icon types and correct ic12 size (bfd5919)
  • svg: Only match root at first tag to avoid quadratic backtracking (198a89d)
  • pnm: Read header lines lazily to avoid quadratic shift() and whole-input decode (2c6374a)
  • svg: Correct pica (pc) unit conversion to 16px (fc522ba)
  • svg: Keep viewBox precision and round derived size to nearest pixel (d7b8fe9)
  • pnm: Parse header tokens separated by any whitespace and comments (777135e)
  • jpg: Inspect the first segment marker after SOI (d0a2ea1)
  • jpg: Read EXIF IFD0 offset from the TIFF header (61ff67d)
  • bmp: Read OS/2 v1 core header size as 16-bit and reject negative width (4f8b659)
  • ktx: Honor the KTX 1.1 endianness field for big-endian files (d581fc9)
  • avif: Detect AVIF from ftyp compatible brands and avis sequences (3c56c47)
  • icns, heic: Bound memory on repeated icon entries and ispe boxes (72684e7)
  • svg: Find the root tag with a byte scan instead of a backtracking regex (9a90ba2)
  • Reject image sizes that are not safe integers (b605abf)

💅 Refactors

  • jp2: Locate the ihdr box instead of assuming box order (7e652be)

📦 Build

  • ⚠️ Migrate to obuild and drop cjs build (3e97b7b)

🌊 Types

  • Width and height are always numbers (336a3c2)

✅ Tests

  • Add invalid webp and empty file fixtures from image-size (9a25070)

🤖 CI

⚠️ Breaking Changes

  • ⚠️ Report the largest image of multi-image files (ccd03d3)
  • ⚠️ Migrate to obuild and drop cjs build (3e97b7b)

❤️ Contributors

  • Pooya Parsa (@pi0)
  • Mochammad Fadhlan Al-Ghiffari (@MFA-G)