Fixed generating thumbnails of GIF images
This commit is contained in:
parent
a2ff2d25ae
commit
cc6b7e41bc
1 changed files with 5 additions and 2 deletions
|
@ -44,8 +44,11 @@ class ImagickImageManipulator implements IImageManipulator
|
||||||
switch ($format)
|
switch ($format)
|
||||||
{
|
{
|
||||||
case self::FORMAT_JPEG:
|
case self::FORMAT_JPEG:
|
||||||
$imageResource->setImageBackgroundColor('white');
|
$matte = new \Imagick();
|
||||||
$imageResource = $imageResource->flattenImages();
|
$matte->newImage($imageResource->getImageWidth(), $imageResource->getImageHeight(), 'white');
|
||||||
|
$matte->compositeimage($imageResource, \Imagick::COMPOSITE_OVER, 0, 0);
|
||||||
|
$imageResource->destroy();
|
||||||
|
$imageResource = $matte;
|
||||||
$imageResource->setImageFormat('jpeg');
|
$imageResource->setImageFormat('jpeg');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue