将图片合并成gif_将GIF与Gificle合并

将图片合并成gif

Merge GIFs

Creating a GIF from a video is fairly simple at this point, as I pointed out in Convert Video to GIF or GIF to Video, but working with multiple GIFs is something many people would like to do.  The top GIF manipulation library for years has been Gifsicle, so I looked toward Gifsicle for merging multiple animated GIF images.

正如我在“ 将视频转换为GIF或将GIF转换为视频”中指出的那样,此时从视频创建GIF非常简单,但是许多人都希望使用多个GIF。 多年来,顶级的GIF操纵库一直是Gifsicle,因此我期望Gifsicle合并多个动画GIF图像。

Before you merge your GIFs, however, you'll want to ensure that they're the same size.  Gifsicle has a --crop option which crops images to a given size:

但是,在合并GIF之前,您需要确保它们的大小相同。 Gifsicle具有--crop选项,可将图像--crop为给定大小:


gifsicle --crop 300x300 ....


If you have GIFs of different sizes (i.e. you don't crop), the earlier GIF may show up behind subsequent GIFs, making for a sloppy image.

如果您具有不同大小的GIF(即您没有裁剪),则较早的GIF可能会显示在后续GIF的后面,从而产生马虎的图像。

Additionally you may receive a gifsicle: warning: too many colors, using local colormaps error.  To work around that error, you'll want to add --colors 256 parameter when merge the GIFs.

另外,您可能会收到以下图片:警告:使用本地颜色图错误,颜色过多 。 要解决该错误,合并GIF时需要添加--colors 256参数。

So let's assume you have GIFs of the same size and you're ready to create your merged GIF.  The following command will achieve the desired result:

因此,假设您拥有相同大小的GIF,并且已经准备好创建合并的GIF。 以下命令将达到预期的结果:


gifsicle --crop 370x275 --colors 256 --merge first.gif second.gif -o merged.gif


You can use any number of GIFs and the outcome is a solid, single GIF.  If you're a performance nut, you'll want to optimize the GIF as well!

您可以使用任意数量的GIF,结果是一个坚实的单一GIF。 如果您对性能不满意,还需要优化GIF

Gifsicle continues to amaze me and I look forward to using the utility more.  GIFs by nature are mostly for fun these days and Gifsicle makes that easy!

Gifsicle继续让我赞叹不已,我期待更多使用该实用程序。 如今,自然界中的GIF大多是好玩的,而Gifsicle则很容易!

翻译自: https://davidwalsh.name/merge-gifs

将图片合并成gif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值