Close Show/hide page

{zero point nine} personal experiments, etc.

Seam Carving in AS3, with source

Thumbnail - Click me Click to run demo

Seam carving is a recently unveiled technique by Shai Avidan and Ariel Shamir to intelligently resize images (YouTube; white paper).

Like Hector Yee (whose writeup was very useful), I decided to try an implementation, but in Actionscript 3.

The attached demo only resizes images vertically, not horizontally. I wish I could have, but didn't bother including a dynamic image loader. It's also, well, very pokey, but the code is readable and the output seems accurate. If you can stand the wait, press [M] a few times to load up the seam calculation queue.

If you're interested in a more fully-realized online demo of seam carving, here's one that's been done in Java.

Update: Additionally, as it turns out, Patrick Swieskowski has already put up an online seam carving Flash demo here.

View or post a comment