IT

Batch Image Reduce File Size on MacOS

Use the Library from pngquant. Create shell script resizethis.command in the folder you want. The suffix .command is for be able to execute by double click on the desktop.

find . -name '*.png' -exec ../pngquant/pngquant --ext .png --force 256 {} \;

For execute the resize all files end with .png with the pngquant, number of color and end with the filename.

find . -name '*.png' -print0 | xargs -0 -P8 -L1 pngquant --ext .png --force 256

this patterns will be forked to 8 core cpu threads working at the same time.

(Answered from StackOverflow)

Leave a Reply

Your email address will not be published. Required fields are marked *