Epic Command Line Moment: Batch Convert Images with ‘sips’

I didn’t know about the OS X command sips and now I’m super happy about it. With it, I converted a bunch of PNGs to GIFs and I didn’t have to wrestle with anything at all.

mkdir gifs
sips -s format gif ./*.PNG --out gifs

Holy cow — it’ll let me resize things too and retain proportions. Woah, love this one:

#Resize a batch of images to 250px (largest side)
sips -Z 250 *

Note that it will modify your files “without apologies” — but thanks, sips!

For a one-off file, you need to specify the –out like this:

sips -s format gif back.PNG --out back.gif

Or you can just do this:

sips -s format gif back.PNG --out .

And it’ll name the image properly to the specified suffix.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s