Content-Aware Image Resize
Make a photo narrower, wider, shorter or taller without squashing what matters. Seam carving removes or duplicates the least noticeable paths of pixels, so empty sky, water and background shrink while people, buildings and objects keep their shape. Paint areas to protect, or mark an object to remove it completely.
Last updated:
How to use the Content-Aware Image Resize
- Open an image by dropping it on the box. A sample beach photo is loaded and resized so you can see the effect immediately.
- Set the new size with the Width and Height sliders or type exact pixel values.
- Protect important areas (optional): pick the green Protect brush and paint over faces, people or objects that must not be distorted.
- Remove an object (optional): paint it with the red Remove brush and press Remove object (keep size), or combine it with a new size.
- Press Resize image, compare with the Normal resize tab, then Download result.
How seam carving works
- Energy map: every pixel gets a cost from the brightness differences with its neighbours. In classic (gradient) mode this is |I(x+1,y) − I(x−1,y)| + |I(x,y+1) − I(x,y−1)|. Protected pixels get a huge positive cost and pixels marked for removal a huge negative one.
- Cheapest path: dynamic programming builds a cumulative cost map row by row, M(x,y) = e(x,y) + min(M(x−1,y−1), M(x,y−1), M(x+1,y−1)), and the seam is traced back from the smallest value in the last row. It always moves at most one pixel sideways per row, so it stays connected.
- Forward energy: instead of the pixel's own gradient, each step is charged the new edge it creates once the seam is removed: |I(x+1,y) − I(x−1,y)| plus |I(x,y−1) − I(x∓1,y)| when the seam moves diagonally. This keeps lines and edges straighter.
- Repeat: the seam is deleted, the image becomes one pixel narrower and the process repeats. Height changes run the same algorithm on the transposed image.
Seam carving vs. other ways to change size
| Method | What happens | Best for |
|---|---|---|
| Normal resize (scaling) | All pixels shrink equally; changing the aspect ratio stretches or squashes everything | Keeping the same aspect ratio |
| Cropping | Cuts off the edges; nothing is distorted but content at the borders is lost | Subjects in the middle, empty edges |
| Seam carving (this tool) | Removes low-detail paths anywhere in the image; subjects keep their shape | Landscapes, wide backgrounds, subjects spread across the frame |
| Seam insertion | Duplicates low-detail paths to widen or heighten the background | Making room for text or fitting a new aspect ratio |
Tips for clean results
- Protect faces and straight objects: people, text, logos, buildings and horizons are where seams cause visible bends.
- Change one dimension at a time when you can, and stay within about 30 percent for photos with lots of detail.
- Combine with cropping: carve away the empty middle, then crop the edges for the final framing.
- Remove small objects such as a stray person, sign or bird by painting slightly beyond their outline with the Remove brush.
- Start with Fast working size to try settings quickly, then switch to High for the final download.
Frequently asked questions
What is content-aware resizing?
Content-aware resizing (also called seam carving, liquid rescale or content-aware scale) changes the size of an image by removing or adding seams instead of scaling every pixel equally. A seam is a connected path of one pixel per row (or per column) running across the image. The algorithm repeatedly finds the seam whose pixels are least noticeable, usually through smooth areas like sky, water or plain walls, and deletes it, so the important content keeps its proportions.
How does the tool decide which pixels are important?
Each pixel gets an energy value based on how much the brightness changes around it: edges and detail have high energy, smooth areas low energy. Dynamic programming then finds the top-to-bottom path with the lowest total energy. In Forward energy mode the cost is the new edge that would be created when the neighbours on both sides of the seam are joined, which avoids many of the jagged breaks that the classic gradient energy can produce.
When does seam carving not work well?
It struggles when the image has no unimportant areas: crowded scenes, close-up portraits, dense textures or straight lines across the whole picture (horizons, fences, building edges) can bend or break. Use the Protect brush on faces and key objects, reduce by smaller amounts, or crop instead. Removing more than about 30 to 40 percent of a dimension usually shows artifacts.
Can I make an image bigger with it?
Yes, up to twice the width or height. The tool finds the lowest-energy seams and duplicates them, averaging each new pixel with its neighbour, so the background is extended while subjects keep their size. Large enlargements are done in steps of at most 50 percent so the same seam is not copied over and over.
How does object removal work?
Pixels painted with the red Remove brush get a strongly negative energy, so every seam is forced through them. Seams are removed until no marked pixels remain, choosing vertical or horizontal seams depending on which needs fewer. With Remove object (keep size), seams are then inserted again to bring the image back to its original dimensions.
Why is the result smaller than my original photo?
Seam carving recalculates the whole image for every seam, so large photos are processed at a working size (1200 px on the longest side by default) to keep it fast. Choose High or Original size (up to 3000 px) in Working size for a larger result; processing takes longer.
Are my images uploaded?
No. Decoding, seam carving and encoding all happen in your browser with JavaScript and the Canvas API. Your photo never leaves your device.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.