Imagick 3 writeImages () function not working

I can’t find any errors on the network, but since the transition to Imagick 3 of 2.1, I can’t use the writeImages () function correctly. The image is saved, but it is no longer animated. I set the frames correctly, because if I do 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);
+3
source share
1 answer
+1
source

All Articles