Releases: ksubileau/color-thief-php
Releases · ksubileau/color-thief-php
v2.0.1
v2.0.0
New features
- PHP 8 compatibility (see #48 and #50, thank @Agapanthus).
- Add support for reading WebP images (see #45, thank @mreiden).
- Add support for multiple output color formats (RGB, hexadecimal, integer, array or instances of
ColorThief\Color
class). - Add support for image adapter selection. You can now choose which image extension to use between GD, Imagick or Gmagick, or provide a custom image adapter.
Bug fix
- Fix bug where
getPalette()
does not always return the requested amount of colors (see #5).
Breaking changes
- Drop support for PHP 5.x, 7.0 and 7.1, now require 7.2+.
- Reworked exceptions so that all exceptions now inherit from
ColorThief\Exception\Exception
. Migrating from 1.x may require tweaking exception handling in calling code to avoid unhandled exceptions or preserve error handling logic. See 1bf90f4 for details.
Noticeable changes
- Switch to MIT license.
- Fileinfo extension is now required.
- Reworked some internal image loading logic.
v1.4.1
v1.4.0
v1.3.1
v1.3.0
v1.2.0
v1.1.0
- Add support for Imagick and GD resources. In addition to the path or URL of the image, now you can also directly pass the GD resource or Imagick instance to the getColor and getPalette methods (see #10).
- Fix fatal error whith solid white images. An exception is now thrown in this case, allowing the caller to catch it (see #11).
- Fix possible undefined offset under certain circumstances.
- Change error handling policy : throw exceptions in case of errors instead of return false.