有没有类似 pngcrush 的 GIF 工具?
pngcrush 在减小 PNG 文件的大小方面做得非常好。我想知道 GIF 是否有类似的情况,我们仍在应用程序中使用它(无法快速修复)。
Google Page Speed 声称我们的 GIF 图像可以大量优化,但没有推荐一种方法。我在网上搜索,找不到工具或库。
有谁知道优化这些 GIF 文件的直接方法吗?
pngcrush does a very good job at reducing the size of PNG-Files. I was wondering if the was something similar for GIFs, which we still use in our applications (can't fix that quickly).
Google Page Speed claims that our GIF images could be optimized by a large amount, but doesn't recommend a way. I searched the web and couldn't find a tool or library.
Does anyone know a straight forward way to optimize those GIF-Files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我刚刚遇到这个问题并发现 Gifsicle (正如 Daidai 提到的)。它包含在 Ubuntu 存储库(可能还有其他 Linux 发行版)中,并且该网站有适用于 Windows/Mac 的端口。
要优化一组图像,可以使用以下命令:
I just ran across this problem and found Gifsicle (as mentioned by Daidai). It's included in the Ubuntu repos (and probably other Linux distros) and the website has ports for Windows/Mac.
To optimize a set of images, you can use this command:
gifsicle http://www.lcdf.org/gifsicle/
gifsicle http://www.lcdf.org/gifsicle/
如果它们是静态 GIF,那么将它们转换为 PNG,然后对其运行 pngcrush 通常会提供良好的优化。另请注意使用 TweakPNG 检查它们并删除任何不必要的部分。
对于 GIF 动画,任何像样的编辑软件(虽然我不能说出任何软件的名字)都应该已经执行了一些可用的优化。无论如何,与 PNG 不同,没有太多需要优化的地方。
我知道一个叫“Animagic GIF”的老软件,但它至少已经被废弃了十多年了……也许你还能在某个地方找到它。我很确定它可以保存优化的 GIF。它还具有进一步的“优化”功能,但我认为这会降低图片质量(减少颜色),因此只需坚持定期保存即可。
If they are static GIFs, then converting them to PNGs and then running pngcrush on them will usually provide a good optimization. Also take care to inspect them with TweakPNG and remove any unnecessary parts.
For animated GIFs any decent editing software (although I can't name any) should already perform the few optimizations that are available. There isn't much to optimize anyway, unlike PNGs.
I know of an old piece of software called "Animagic GIF", but it's been abandoned for over 10 years at least... maybe you can still find it somewhere. I'm pretty sure that it saves optimized GIFs. It also has a further "optimize" feature, but I think that degrades picture quality (reduces colors), so just stick to regular save.
您可以将其转换为 HTML5 视频,就像 http://gfycat.com 一样。他们声称尺寸非常小(这基本上是事实,所以除了是一种非常有效的解决方案之外,它也是一个非常酷的解决方案)
You could convert it to HTML5 video, just like http://gfycat.com does. They claim really small sizes (and it is mostly true, so besides being a very efficient solution it is also pretty a pretty cool one)
Trout 的 GIF 优化器相当不错。
Gif 缩小器 是一个在线工具,可以减少 gif 中的颜色数量。
Trout's GIF Optimizer is quite good.
Gif Reducer is online tool that reduces the number of colors in a gif.