我读过man pngcrush,似乎无法粉碎PNG文件并将其保存在原始文件之上。我想压缩几个文件夹值的PNG,所以用一个命令来完成这一切都是有用的!
目前,我正在执行pngcrush -q -d tmp *.png,然后手动将文件从tmp目录剪切到原始文件夹。所以我想使用mv可能是最好的方式?有更好的主意吗?
发布于 2014-07-13 17:42:14
从1.7.22版本开始,pngcrush有一个覆盖选项。
试一试
pngcrush -ow file.png有关更多信息,请参见Changelog:
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.https://askubuntu.com/questions/26569
复制相似问题