I've read through man pngcrush
and it seems that there is no way to crush a PNG file and save it over the original. I want to compress several folders worth of PNGs so it would be useful to do it all with one command!
Currently I am doing pngcrush -q -d tmp *.png
then manually cut-pasting the files from the tmp
directory to the original folder. So I guess using mv
might be the best way to go? Any better ideas?
Since version 1.7.22,
pngcrush
has an overwrite option.Try
See Changelog for more information:
All on one line:
should do it.
(Though so far in my own tests, less than half of the pngs I tested
pngcrush
on were smaller afterwards, so color me unimpressed.)