fixed some GIF thumbnails resulting in "corrupt" images.

in order to do this, Imagick::coalesceImages() is called if the image to process is gif and has frames. this method slows down things, but ensures a good thumbnail.
This commit is contained in:
Parziphal 2013-12-06 14:02:47 -05:00
parent 272fc76629
commit be797d2a17

View File

@ -22,6 +22,9 @@ abstract class Resizer
if (class_exists('Imagick', false)) {
$image = new Imagick($read_path);
if ($file_ext == 'gif' && $image->getNumberImages()) {
$image = $image->coalesceImages()->current();
}
$image->cropImage($crop_width, $crop_height, $crop_left, $crop_top);
$image->thumbnailImage($width, $height);