1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-17 12:18:14 +01:00

Add optimizeImageLayers call to GifEncoder

This commit is contained in:
Oliver Vogel 2023-10-01 16:07:41 +02:00
parent 2f2f80cd77
commit 41efb89373

View File

@ -26,6 +26,7 @@ class GifEncoder extends AbstractEncoder implements EncoderInterface
$imagick->setImageFormat($format);
$imagick->setCompression($compression);
$imagick->setImageCompression($compression);
$imagick->optimizeImageLayers();
$imagick = $imagick->deconstructImages();
return new EncodedImage($imagick->getImagesBlob(), 'image/gif');