Install it with:
brew install pngcrush
and use following command:
pngcrush -reduce -brute input.png output.png