# Seam Carving for Content-Aware Image Scaling

DevFeed: [Seam Carving for Content-Aware Image Scaling](<https://devfeed.tech/articles/seam-carving-for-content-aware-image-scaling-40306.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/03/04/seam-carving-for-content-aware-image-scaling/>)

Published: 2013-03-04T22:19:19Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [scaling](<https://devfeed.tech/topics/scaling.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [pixel](<https://devfeed.tech/topics/pixel.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [calculus](<https://devfeed.tech/tags/calculus.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [image](<https://devfeed.tech/tags/image.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [photoshop](<https://devfeed.tech/tags/photoshop.md>), [processing](<https://devfeed.tech/tags/processing.md>), [programming](<https://devfeed.tech/tags/programming.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [seam-carving](<https://devfeed.tech/tags/seam-carving.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

## AI overview

This tutorial explains seam carving, a content-aware image-rescaling method that removes or adds pixels the viewer is least likely to notice. It introduces the motivation, mathematical background, and a working implementation for reducing and enlarging images.

## Source excerpt

The Problem with Cropping Every programmer or graphic designer with some web development experience can attest to the fact that finding good images that have an exactly specified size is a pain. Since the dimensions of the sought picture are usually inflexible, an uncomfortable compromise can come in the form of cropping a large image down to size or scaling the image to have appropriate dimensions. Both of these solutions are undesirable.