【发布时间】:2012-04-27 15:33:09
【问题描述】:
我在网上找不到任何错误,但自从从 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);
【问题讨论】:
-
这很奇怪,我无法复制这种行为。你试过
file_put_contents('animation.gif', $gif);之类的吗? -
嗨 Rob,我把它作为一个 bug 提出来了,现在已经修复 bugs.php.net/bug.php?id=61879