Skip to content

v0.1.12

Choose a tag to compare

@lilith lilith released this 01 Apr 20:30
· 75 commits to main since this release

What's new

ISO 21496-1 gain map improvements

  • Explicit format selection: New parse_iso21496_fmt / serialize_iso21496_fmt functions with Iso21496Format enum (JpegApp2 or AvifTmap) for unambiguous wire format handling.
  • Continued-fraction encoding: Fraction::from_f64_cf and UFraction::from_f64_cf produce canonical ISO 21496-1 fractions (e.g. 1/64 instead of 15625/1000000), matching the algorithm used by libultrahdr.
  • Common-denominator parsing: Supports compact encoding (flag bit 3) used by libultrahdr.
  • Backward direction flag: Full roundtrip support for the backward direction bit in gain map metadata.

Bug fixes

  • Panic removal in ISOBMFF box_size handling and gain map parsing edge cases.
  • Clippy warning cleanup.

Dependency updates

  • zenpixels / zenpixels-convert bumped to 0.2.2
  • archmage, magetypes, enough, whereat, linear-srgb bumped to latest

Deprecations

  • Fraction::from_f64(value, denominator) → use Fraction::from_f64_cf(value)
  • UFraction::from_f64(value, denominator) → use UFraction::from_f64_cf(value)
  • parse_iso21496(data) → use parse_iso21496_fmt(data, Iso21496Format::JpegApp2)
  • serialize_iso21496(params) → use serialize_iso21496_fmt(params, Iso21496Format::JpegApp2)

The unsuffixed parse_iso21496 / serialize_iso21496 changed from AVIF tmap format to JpegApp2 format in this release. Use the _fmt variants with an explicit Iso21496Format to avoid ambiguity.