【问题标题】:Imagick 3 writeImages() function not workingImagick 3 writeImages()函数不起作用
【发布时间】: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

标签: php imagick


【解决方案1】:

是 PHP 中的一个错误 https://bugs.php.net/bug.php?id=61879

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-26
    • 2015-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多