如何在imagemagick中制作两次动画gif循环?

时间:2014-11-21 16:59:52

标签: imagemagick

我需要制作一个动画gif,在停止前两次播放所有帧。这似乎是一件简单的事情,但由于某些原因,当我将-loop标志设置为2时,它会播放三次,而当我将其设置为1时,它只播放一次。这样:

#this will play once then stop
convert -size 300x600 -delay 50 frame1.png  -delay 50 frame2.png -loop 1 animation.gif;

#this will play three times then stop
convert -size 300x600 -delay 50 frame1.png  -delay 50 frame2.png -loop 2 animation.gif;

如何让它玩两次?

1 个答案:

答案 0 :(得分:3)

我想说这是ImageMagick中的一个错误。作为解决方法,我只建议您列出两次框架并将-loop设置为1,如下所示:

convert -size 300x600 -delay 50 frame1.png frame2.png frame1.png frame2.png -loop 1 animation.gif