我在网上找不到任何错误,但自从从 2.1 切换到 Imagick 3 后,我无法以正确的方式使用 writeImages() 函数。图像已保存,但不再是动画。我已经正确设置了帧,因为如果我 echo $gif
我会得到动画。
$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);
最佳答案
是 PHP 中的一个错误 https://bugs.php.net/bug.php?id=61879
关于php - Imagick 3 writeImages() 函数不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10353534/