Fixed saving JPEGs with Imagick destroyed resource

This commit is contained in:
Marcin Kurczewski 2014-11-11 14:19:46 +01:00
parent b4050b7b1d
commit 584d06a7f1

View file

@ -47,7 +47,6 @@ class ImagickImageManipulator implements IImageManipulator
$matte = new \Imagick(); $matte = new \Imagick();
$matte->newImage($imageResource->getImageWidth(), $imageResource->getImageHeight(), 'white'); $matte->newImage($imageResource->getImageWidth(), $imageResource->getImageHeight(), 'white');
$matte->compositeimage($imageResource, \Imagick::COMPOSITE_OVER, 0, 0); $matte->compositeimage($imageResource, \Imagick::COMPOSITE_OVER, 0, 0);
$imageResource->destroy();
$imageResource = $matte; $imageResource = $matte;
$imageResource->setImageFormat('jpeg'); $imageResource->setImageFormat('jpeg');
break; break;