Simply put copies of all the photos you’d like to resize into a directory, navigate to that directory within Terminal, and run the command:
sips -Z PIXELS *.EXTENSIONWhere PIXELS is the maximum number of pixels you’d like the width or height to be, and EXTENSION is the file type you’re working with (e.g. jpg, png, gif).
For example, if you’d like to shrink a large batch of JPEG images down to 620px in width/height, you would run the following command in Terminal (assuming the present working directory contains the files):
sips -Z 620 *.jpgThat’s it. The tool quickly resizes all the images in the directory down. Be aware that this overwrites the original files, so you’ll want to make sure you’re only doing this to copies of photos, not the originals themselves.
To save time, there’s way way to easily open up Terminal in the directory containing the photos you’d like to resize. It’s a right click option that you’ll need to enable: go to System Preferences->Keyboard->Keyboard Shortcuts->Services->Files and Folders and making sure New Terminal at Folder is checked.
Do this, and you’ll see an option for “New Terminal at Folder” when you right click the folder containing your images:
sips can do much more than the simple batch resizing outlined in this post. Check out the command’s manual for all the different functions and options you can use to edit photo files from the comfort of command line (e.g. cropping, editing the color profile, padding, flipping, rotating, etc…).
(via Lifehacker via MacLife)
Read more at http://www.petapixel.com/2012/11/21/how-to-quickly-resize-multiple-photos-on-a-mac-using-a-terminal-command/#GbTRg1CVd0l0lRSq.99