Batch Resize Images in Mac OS

To resize all the images to maximum height of 640px
sips -Z 640 *.jpg
To resize all the images to maximum width of 400px
sips --resampleWidth 400 *.jpg

To resize SVG files in Mac OS, you can use the rsvg library install it with:
brew install -v librsvg
and then run it with the following shell line:
for i in *; do rsvg-convert $i -w 100 -h 100 -f svg -o `echo new/$i`; done
This takes all the svg files in the folder, resizes it and copies the result into new/ folder

Comments

Popular posts from this blog

Timeline on Latex

Exporting Skype Chat/Skype Contacts to csv file using the shell script and sqlite3 (usually already installed on mac)

trim() not supported by IE7 and IE8