将多个GIF添加到一个背景中

时间:2017-07-26 04:39:21

标签: imagemagick imagemagick-convert

我试图"玩"相同的gif,同时,在同一个单一图像的多个区域。 通过IM v6的文档阅读,没有这方面的例子。我还尝试过将单独的转换链接起来'没有任何运气的复合命令。

是否可以在一个命令或多个命令中执行此操作?

1 个答案:

答案 0 :(得分:1)

在ImageMagick中,您可以使用null:和-layers composite将多个动画组合到一个背景图像上。但每个动画必须具有相同数量的帧和延迟。例如,使用新行字符\的unix语法(用Windows替换为^):

enter image description here

convert -size 512x512 xc:black \
null: morph_anim_1pt.gif -gravity northwest -geometry +50+50 -layers composite \
null: morph_anim_1pt.gif -gravity southwest -geometry +50+50 -layers composite \
null: morph_anim_1pt.gif -gravity southeast -geometry +50+50 -layers composite \
null: morph_anim_1pt.gif -gravity northeast -geometry +50+50 -layers composite \
morph_anim_1pt_animation.gif

enter image description here

请参阅http://www.imagemagick.org/Usage/anim_mods/#composite