Jon Simpson

The depths of OS X: SIPS

18 Jun 2005 — apple, macosx, scripts, image processing

Recently, I needed to write some scripts to deal with large numbers of websites that needed screencapped, thumbnailed and uploaded. Not wanting to attempt to get Windows to perform this task, I obviously looked to my Powerbook’s bash scripting capabilities to get the job done. In doing this, I was stopped in my tracks by a need to resize and change the format of images without user intervention. Of course, the first thing I started looking for was a build of imagemagick, but a few posts on mac specific bulletin boards pointed to a cleaner solution.

That solution is sips. The “scriptable image processing system” by self-description and a tool built right into Mac OS X, using all of the format support and output support available to the OS.

sips -s format jpeg test.png --out test.jpg
sips -s format jpeg --resampleWidth 100 test.png --out test_small.jpg

This powerful tool is quite obscure, and infrequently mentioned a lot, so I figured I’d flag it to the attention of anyone who may care. OS X users can type man sips to get a whole load of useful information about parameters and additional options.


RANDPOP » Blog Archive » Spitzen Mac Freeware: Photo Drop

Trackback, 13 Jun 2007

Hey, thanks for the reminder!

I came across your post while looking for some help with ImageMagick (which is great - if you have X11 installed on your machine; I don’t, and I won’t install it for a single (command line!) program). Thanks to you, I have an alternative! Great!

Wolf, 06 Jun 2008