我有一些JPEG文件,我想创建一个GIF动画。但是,此代码不起作用。你能看到问题是什么吗?PHP Imagick创建GIF动画
// animation
$animation = new Imagick();
$animation->setFormat("GIF");
// frames
foreach($tmpJpegPath as $jpepPath) {
$frame = new Imagick($jpepPath);
$frame->thumbnailImage(176, 144);
$animation->addImage($frame);
$animation->setImageDelay(100);
$animation->nextImage();
}
// save gif animation
$animation->writeImages('./animation.gif', true);
确定它具有开箱即用的jpeg支持吗?它究竟如何“不起作用”?错误? – ficuscr
@ficuscr如果你的意思是$ jpepPath是我的jpeg文件的路径。那就对了。 – sweb
问题解决了...... imagick必须> = 3.1.0RC1 – sweb