FEW YEARS AGO

Thursday, November 22, 2012

How to Quickly Resize Multiple Photos in Mac OS X Using a Terminal Command




If you use a Mac and regularly need to resize batches of photos, there’s actually a tool built into your operating system that lets you do just that without having to open any image editing program. It’s called “sips”, which stands for scriptable image processing system. It’s extremely easy to use, but you’ll need to know how to use Terminal to take advantage of it.

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 *.EXTENSION
Where 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 *.jpg
That’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.
How to Quickly Resize Multiple Photos in Mac OS X Using a Terminal Command step11
Do this, and you’ll see an option for “New Terminal at Folder” when you right click the folder containing your images:
How to Quickly Resize Multiple Photos in Mac OS X Using a Terminal Command rightclick
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 

No comments:

Post a Comment