mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 04:08:14 +01:00
Allow animated WEBP's (#1375)
* Don't merge layers when image is animated * Update src/Drivers/Imagick/Encoders/WebpEncoder.php --------- Co-authored-by: Oliver Vogel <oliver@olivervogel.com>
This commit is contained in:
parent
115d2ad3be
commit
5451ff9f90
@ -21,7 +21,10 @@ class WebpEncoder extends GenericWebpEncoder implements SpecializedInterface
|
||||
$imagick = $image->core()->native();
|
||||
$imagick->setImageBackgroundColor(new ImagickPixel('transparent'));
|
||||
|
||||
$imagick = $imagick->mergeImageLayers(Imagick::LAYERMETHOD_MERGE);
|
||||
if (!$image->isAnimated()) {
|
||||
$imagick = $imagick->mergeImageLayers(Imagick::LAYERMETHOD_MERGE);
|
||||
}
|
||||
|
||||
$imagick->setFormat($format);
|
||||
$imagick->setImageFormat($format);
|
||||
$imagick->setCompression($compression);
|
||||
|
Loading…
x
Reference in New Issue
Block a user