首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使pngcrush覆盖原始文件?

如何使pngcrush覆盖原始文件?
EN

Ask Ubuntu用户
提问于 2011-02-16 02:15:24
回答 1查看 9.9K关注 0票数 18

我读过man pngcrush,似乎无法粉碎PNG文件并将其保存在原始文件之上。我想压缩几个文件夹值的PNG,所以用一个命令来完成这一切都是有用的!

目前,我正在执行pngcrush -q -d tmp *.png,然后手动将文件从tmp目录剪切到原始文件夹。所以我想使用mv可能是最好的方式?有更好的主意吗?

EN

回答 1

Ask Ubuntu用户

发布于 2014-07-13 17:42:14

从1.7.22版本开始,pngcrush有一个覆盖选项。

试一试

代码语言:javascript
复制
pngcrush -ow file.png

有关更多信息,请参见Changelog

代码语言:javascript
复制
Version 1.7.22  (built with libpng-1.5.6 and zlib-1.2.5)
  Added "-ow" (overwrite) option.  The input file is overwritten and the
    output file is just used temporarily and removed after it is copied
    over the input file..  If you do not specify an output file, "pngout.png"
    is used as the temporary file. Caution: the temporary file must be on
    the same filesystem as the input file.  Contributed by a group of students
    of the University of Paris who were taking the "Understanding of Programs"
    course and wished to gain familiarity with an open-source program.
票数 30
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/26569

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档