With this article I want to do three things:
Provide you with an interactive
content-aware resizer so that you could play around with resizing your own images Explain the idea behind the
Seam Carving algorithm Explain the
dynamic programming approach to implement the algorithm (we’ll be using TypeScript for it)
Using the algorithm it’s possible to resize an original image
(center) without distorting important features in the image (left) unlike regular resizing which squeezes the image (right).
the resulting JS Image Carver you can see the algorithm in action.
Unless you’ve been asleep in a ditch
(with no wireless internet) you’ll have heard about Seam Carving and would’ve been wondering how long it will take for the ActionScript community to get in line.
Well, it didn’t take long.
Seam carving allows an image to be resized non-uniformly, so you can change the height to width ratio in the image without cropping, but also without distorting important features in the image (such as faces).
Seam carving: content-aware image resizing →