Answer the question
In order to leave comments, you need to log in
How to resize and save an animated GIF with ImageMagick?
This example doesn't work GIF is not animated
$imagick = new Imagick($_FILES['file']['tmp_name']);
$format = $imagick->getImageFormat();
if ($format == 'GIF') {
$imagick = $imagick->coalesceImages();
do {
$imagick->resizeImage(500, 500, Imagick::FILTER_BOX, 1);
} while ($imagick->nextImage());
$imagick = $imagick->deconstructImages();
$imagick->writeImages($name, true);
}
$imagick->clear();
$imagick->destroy();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question