Skip to content

v1.6.0

Latest

Choose a tag to compare

@SRWieZ SRWieZ released this 20 Oct 12:20
· 1 commit to master since this release

ThumbHash encoding is now 2.4× faster in our PHP 8.4 benchmarks, with faster decoding and PNG generation too.

Added

  • PHPBench benchmarks for encoding, decoding, and PNG data URL generation, available via composer bench (#23).
  • Regression tests for byte-identical data URLs and valid PNG output.

Changed

  • Speed up ThumbHash encoding with a separable DCT, decoding with precomputed cosine tables, and PNG generation with native PHP functions (#23). Contributor benchmarks on PHP 8.4 without JIT show average speedups of 2.4×, 1.3×, and 1.5×, respectively.
  • Update GitHub Actions dependencies and add a five-day Dependabot cooldown.

Compatibility: Public method signatures and the ThumbHash format are unchanged; existing hashes remain decodable. Newly encoded hashes may differ slightly at floating-point rounding boundaries. Direct callers of rgbaToDataURL() should pass a zero-indexed RGBA list in pixel order: non-list arrays may behave differently, and string input now throws a TypeError.

Thanks to @daun for the performance improvements.

Full Changelog: v1.5.1...v1.6.0