如何使用ImageMagick缩小gif图像的尺寸? [英] How can I reduce the dimensions of gif images with ImageMagick?
问题描述
magick.exe convert <flags>
中的哪个标志会减小图像的尺寸?
What flag in magick.exe convert <flags>
will reduce the dimensions of my image?
这是我正在使用的命令:magick.exe input.png[0] -depth 8 -type Grayscale -dresize 400x300
.
This is the command I'm using: magick.exe input.png[0] -depth 8 -type Grayscale -dresize 400x300
.
源图像文件名后的[0]
表示要剥离所有动画gif的第一帧.
The [0]
after the source-image filename is meant to strip the first frame of any animated gifs.
如何减小输出gif大小?我的文件大小太大:我的输出必须小于100k.除了减小尺寸以外,任何其他方法也都可以使用.
How can I do reduce my output gif sizes? My file sizes are too large: my outputs need to be less than 100k. Any methods other than reducing the dimensions are also welcome.
推荐答案
convert test.gif -fuzz 10% -layers Optimize result.gif
添加-fuzz 2%可以产生更好的优化效果,但是效果仍然不是很好.在-fuzz 15%时,它将帧优化的差异隔离到我之前提到的可见色带更改. 在25%的差异几乎只是文字更改.
Adding a -fuzz 2% produced a better optimization, but still not very good. At -fuzz 15% It isolated the differences for frame optimization to just the visible color band changes I noted before. At 25% the differences were almost to just the text changes.
最后在30%的模糊因素下(忽略低于该数字的颜色变化,它是否已优化为仅文本变化?
Finally at a massive 30% fuzz factor (ignore color changes below that figure, did it optimize to just the text changes.
这篇关于如何使用ImageMagick缩小gif图像的尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!