gif循环播放_防止动画GIF循环播放

本文介绍了如何使用gifsicle工具来控制动画GIF的循环播放,包括如何防止GIF循环以及如何设置GIF循环播放的次数。通过这些方法,你可以精确地管理GIF的播放行为。
摘要由CSDN通过智能技术生成

gif循环播放

Prevent GIF Looping

We all know animated GIFs put the "fun" in "functional." I've recently written incredible posts with regard to animated GIF images, including:

我们都知道动画GIF将“有趣”置于“功能”中。 我最近写过 难以置信 有关动画GIF图像的帖子,包括:

One bit of information that has eluded me is how to control the loop count of an animated GIF.  Say you have an animated GIF and you only want to limit the number of times the GIF can loop, or even prevent looping of the GIF -- it's super simple with gifsicle!

让我难忘的一点信息是如何控制动画GIF的循环计数。 假设您拥有动画GIF,而您只想限制GIF可以循环播放的次数,甚至可以防止GIF循环播放-gifsicle超级简单!

防止GIF循环 (Prevent GIF Looping)

gifsicle provides a --no-loopcount option when you process a GIF:

当您处理GIF时,gifsicle提供了--no-loopcount选项:


gifsicle herrera-wtf.gif --no-loopcount > herrera-wtf-once.gif


The resulting GIF plays once and then stops:

产生的GIF播放一次,然后停止:

Prevent GIF Looping
Click the image above to restart it.

单击上面的图像以重新启动它

循环播放GIF {x}次 (Loop a GIF {x} Times)

Another gifsicle command line option, --loopcount, allows for you to set any number as the loop count of the image:

另一个gifsicle命令行选项--loopcount允许您设置任何数字作为图像的循环计数:


gifsicle jack-slow.gif --loopcount=3 > herrera-wtf-four-plays.gif


The --loopcount is set to 3, meaning the GIF actually plays 4 times (original, then 3 loops).

--loopcount设置为3 ,这意味着GIF实际上播放了4次(原始,然后是3个循环)。

Why you'd want a GIF to loop at any specific amount is unknown to me, but the ability to prevent looping is certainly useful, if only to cut down on how expensive the animation is!

我不知道为什么要让GIF以任何特定的大小循环播放,但是防止循环播放的功能肯定有用,即使只是为了减少动画的价格!

翻译自: https://davidwalsh.name/prevent-gif-loop

gif循环播放

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值