Saturday, December 06, 2008

As a mobile developer, I often find myself in the situation where I have an image that I want to use, but it is not the exact size, or even aspect I need it to be.

Most of the time I can get by using Paint .NET to resize images. Paint.NET is a free image and photo editing program. If you don’t have it, download it. It rocks!

image

 

 

 

 

 

 

 

 

 

 

 

 

 

But sometimes it doesn’t matter what I do, I can’t get the image to the size I need. I have tried all of these resizing options:

  • Best Quality Resampling
  • Bicubic Resampling
  • Bilinear Resampling
  • Nearest Neighbor
  • Maintain Aspect Ration On and Off
  • Changing the Canvas Size manually to help things along

But again, sometimes it doesn’t matter what I do. I understand “Garbage In, Garbage Out”. I just hate it when I have “Awesome In, Garbage Out”.

 

Recently, I heard about Seam carving, or content aware image resizing as it is sometimes called. This is so smart, brilliant even.

Seam carving is an image resizing algorithm developed by Shai Avidan and Ariel Shamir. This algorithm alters the dimensions of an image not by scaling or cropping, but rather by intelligently removing pixels from (or adding pixels to) the image that carry little importance.

Now we know what the problem is, and we have learned about a great possible solution to this common problem, all that is left is to learn how to perform Seam Carving on our images. And that’s where SEAMonster comes in.

 

image

 

 

 

 

 

 

 

Download: Mike Swanson's Blog : SEAMonster: A .NET-Based Seam Carving Implementation

image

 

 

 

 

 

 

 

 

 

Here is a sample image that has been resized using both Bicubic and Seam Carve techniques. Notice how the Seam Carved version still has all the important “data”, and how Bicubic just squished everything equally?

I saw where Photoshop CS4 was adding Seam Carving, and there is a online flash implementation here: http://rsizr.com/


Saturday, December 06, 2008 10:40:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback

Theme design by Jelle Druyts

Pick a theme: