image v0.25.8: plugin API, Exif writing, faster blur and more!

131 points Shnatsel 22 comments

image is the #1 image manipulation crate. The highlights of this release are:

  • Added hooks for third-party implementations of format decoders to register themselves with image
    • if you register a handler for .wtf format, image::open("img.wtf")?; will Just Work.
    • You can see a real-world example for JPEG XL format here.
  • Added support for many more TIFF format variants, including the often requested Fax4 compression.
    • TIFF famously stands for Thousands of Incompatible File Formats, so this doesn't cover every possible TIFF file.
  • Various improvements to decoding WebP, AVIF, PNG, GIF, BMP, TGA, PNM.
  • Improved performance of gaussian blur and box blur operations, contributed by @awxkee
    • Blur in image balances performance with safety and complexity. More complex implementations such as libblur should perform even better, at the cost of complexity and some unsafe.
  • Initial support for ICC profiles and color management, backed by moxcms.
    • So far only CICP is honored and only by color conversion functions, but this lays the groundwork for the support to be expanded in the future.
  • You can now embed Exif metadata when writing JPEG, PNG and WebP images.
  • When saving a DynamicImage, the pixel format (e.g. 16-bit RGBA) will be automatically converted into a pixel format the format supports (e.g. 8-bit RGBA) instead of returning an error.
    • This was a commonly encountered issue with the API with no easy workaround. Structs that specify a format explicitly like GenericImage are unchanged and still return an error on pixel format mistmatch.
  • Various other API additions and improvements, see the full changelog for details.