Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Imagick 3 writeImages() function not working

Tags:

php

imagick

I can't find any bugs online but since switching to Imagick 3 from 2.1 I can't use the writeImages() function in the proper way. An image is saved, but it's not animated any more. I've set the frames up correctly because if I echo $gif I get the animation.

$gif = new Imagick();
$gif->setFormat("gif");

foreach ($files as $file) {
    $frame = new Imagick();
    $frame->readImage($file);
    $gif->addImage($frame);
    $gif->setImageDelay(1);
}

$path = "/any/path/will/do/animation.gif";
$gif->writeImages($path,true);
like image 937
joedborg Avatar asked Apr 19 '26 21:04

joedborg


1 Answers

Was a bug in PHP https://bugs.php.net/bug.php?id=61879

like image 89
joedborg Avatar answered Apr 22 '26 19:04

joedborg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!