如何在 pngcrush 中指定一个方法?
我正在优化包含 10000 张 png 图像的整个图像目录。我确实使用了 brute 来测试,对于前 100 个,方法 11 是最好的压缩方法。 您知道 pngcrush 使用大约 130 种不同的方法来尝试图像,这确实花费了太长时间。 我确实尝试输入 -brute -m 11,但这会让它从 11 开始并向上。 我只需要应用方法11。
这是我的脚本:
#!/bin/sh
for png in `find $1 -name "*.png"`;
do
echo "crushing $png"
pngcrush -brute -m 11 "$png" temp.png
mv -f temp.png $png
done;
知道如何解决这个问题并仅应用方法 11 吗? 顺便说一句, pngcrush 最适合我的图像,因此请不要建议像 pnggauntlet 或 pngoptimizer 这样的优化器。
谢谢大家 亲切的问候
I am optimising a whole directory of images with 10000 png images. I did use the brute to test and for the first 100 it was method 11 is the best for compression.
You know that pngcrush uses like 130 different methods to try on an image and this is really taking too long.
I did try to input -brute -m 11, but this will let it start from 11 and go up.
I only need method 11 to be applied.
Here is my script :
#!/bin/sh
for png in `find $1 -name "*.png"`;
do
echo "crushing $png"
pngcrush -brute -m 11 "$png" temp.png
mv -f temp.png $png
done;
Any idea how to work around this and only apply method 11 ?
btw pngcrush works best with my images so please don`t suggest optimisers like pnggauntlet or pngoptimizer.
Thank you all
Kind Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的错......我不应该使用 -brute 命令,它应该有效:-)
My bad ... I shouldn`t have used the -brute command and it should have worked :-)