---
title: v0.31.0 - 5th September 2022
slug: changelog/v0.31.0
---

* Drop support for Node.js 12, now requires Node.js >= 14.15.0.

* GIF output now re-uses input palette if possible. Use `reoptimise` option to generate a new palette.

* Add WebP `minSize` and `mixed` options for greater control over animation frames.

* Remove previously-deprecated WebP `reductionEffort` and HEIF `speed` options. Use `effort` to control these.

* The `flip` and `flop` operations will now occur before the `rotate` operation.

* Improve `normalise` operation with use of histogram.
  [#200](https://github.com/lovell/sharp/issues/200)

* Use combined bounding box of alpha and non-alpha channels for `trim` operation.
  [#2166](https://github.com/lovell/sharp/issues/2166)

* Add Buffer and Stream support to tile-based output.
  [#2238](https://github.com/lovell/sharp/issues/2238)

* Add input `fileSuffix` and output `alias` to `format` information.
  [#2642](https://github.com/lovell/sharp/issues/2642)

* Re-introduce support for greyscale ICC profiles (temporarily removed in 0.30.2).
  [#3114](https://github.com/lovell/sharp/issues/3114)

* Add support for WebP and PackBits `compression` options with TIFF output.
  [#3198](https://github.com/lovell/sharp/issues/3198)

* Ensure OpenSlide and FITS input works with custom libvips.
  [#3226](https://github.com/lovell/sharp/issues/3226)

* Ensure `trim` operation is a no-op when it would reduce an image to nothing.
  [#3223](https://github.com/lovell/sharp/issues/3223)

* Expose `vips_text` to create an image containing rendered text.
  [#3252](https://github.com/lovell/sharp/pull/3252)
  [@brahima](https://github.com/brahima)

* Ensure only properties owned by the `withMetadata` EXIF Object are parsed.
  [#3292](https://github.com/lovell/sharp/issues/3292)

* Expand `linear` operation to allow use of per-channel arrays.
  [#3303](https://github.com/lovell/sharp/pull/3303)
  [@antonmarsden](https://github.com/antonmarsden)

* Ensure the order of `rotate`, `resize` and `extend` operations is respected where possible.
  Emit warnings when previous calls in the same pipeline will be ignored.
  [#3319](https://github.com/lovell/sharp/issues/3319)

* Ensure PNG bitdepth can be set for non-palette output.
  [#3322](https://github.com/lovell/sharp/issues/3322)

* Add trim option to provide a specific background colour.
  [#3332](https://github.com/lovell/sharp/pull/3332)
  [@mart-jansink](https://github.com/mart-jansink)

* Ensure resized image is unpremultiplied before composite.
  [#3334](https://github.com/lovell/sharp/issues/3334)
