You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.