Skip to content

4.40.0: Adaptive minimal-fetch and HEIC/AVIF iloc fixes

Choose a tag to compare

@mattiasw mattiasw released this 29 May 13:36
· 34 commits to main since this release

Added

  • New includeOffsets option (with expanded: true) returns a metadataRange
    object, {start, end, complete, blocks: [{type, start, end}, ...]}, describing
    exactly where metadata sits in the file, so you can persist just the
    metadata-bearing prefix instead of the whole image. Supports JPEG, PNG, WebP,
    HEIC, AVIF, JPEG XL (container), GIF, and standalone XMP/XML. (#121)
  • New length: 'auto' option adaptively fetches only the bytes that contain
    metadata via HTTP Range requests (or filesystem reads / File.slice locally),
    reporting the minimal slice as metadataRange.buffer, bytes read as
    metadataRange.fetched, and IO-call count as metadataRange.requests.
    Requires expanded: true and includeOffsets: true.

Fixed

  • HEIC/AVIF: correctly read Exif and XMP from iloc items using
    constructionMethod 1 (idat); these were previously read from the wrong file
    offset, producing garbage tags or none. constructionMethod 2 items are now
    skipped cleanly instead of returning garbage.
  • HEIC/AVIF: multi-extent Exif and XMP items are now parsed end-to-end;
    previously only the first extent was read, dropping any tags that spilled into
    a second extent.