Content-aware image resizing on Mac OS X
October 27th, 2007
Don't know how widely know this is, but I was amazed by this video on YouTube of Image Resizing by Seam Carving. I searched and found a Mac OS X implementation called Seamus by Wim Lewis. (There's a few of my own notes about compiling if you read the rest of this article.)
UPDATE: I e-mailed Wim, and while he has no plans to update Seamus (although he has added the ability to save the shrunk image if you grab the latest source), he did point me at rsizr which is a great implementation in Flash (wow, never thought I would say that).
Here's a sample of what seam-carving does (using Seamus, photo is somewhere on the Dorset coast):
Before

After

Installation
To run it, you will need to install the NetPBM tools. This can be done with MacPorts:
% sudo port install netpbm
The pre-built app is PowerPC-only. It's easy enough to rebuild, but you have to change the Architectures build setting on the seamus target to $(NATIVE_ARCH) (right click Targets > Seamus, then click Build tab) if you've got in Intel Mac.
After that it's pretty straightforward if you follow the docs provided with the app.

Leave a Reply