How to specify a method in pngcrush?

560 views Asked by At

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

1

There are 1 answers

0
Momo On BEST ANSWER

My bad ... I shouldn`t have used the -brute command and it should have worked :-)