What happens when you need to fit an image to a space with a different shape than the original? Maybe you're trying to fit a rectangular image to a square box on the internet, for example. Your choices come down to either cropping or scaling the image.
It doesn't matter if you're a photographer, graphic designer, or web designer: if you work with images, scaling is an essential part of your workflow. Web designers might scale an image to make it web-friendly, finding the trade-off between quality and page load times. For photographers, scaling images is often about delivering the correct file size to a client for their usage. Graphic designers are always massaging images to match their designs, scaling and cropping images to fit the publication.
Frustratingly, both of our choices have flaws: cropping leaves important pixels out of the image, and scaling distorts the image. Luckily, Photoshop has a "best of both worlds" approach with the content-aware scale tool.
In Photoshop CS4, Adobe introduced content-aware scaling. This tool feels a little like magic, and helps us scale images intelligently. No longer do you have to choose between cropping an image or distorting with scaling when you have to place an image.
A New Alternative: Guided Content-Aware Scaling
Content-aware scaling guesses which pixels can be removed from an image. It looks for common areas with potential pixels to "give up" when scaling.
Here's the thing: content-aware scaling isn't perfect. Photoshop is guessing which pixels can be scaled, and the logic isn't always correct. The results can distort important parts of the image that shouldn't have been adjusted. The finished image can be distorted and important features are disturbed.
You can use a technique that I call guided content-aware scaling to improve the accuracy of the tool. Basically, this technique will show Photoshop which pixels you are okay with giving up and scaling.
First, make a selection around the pixels you want to protect. Then open the Channels tab, and click the circle-in-square icon to Save selection to channel. This makes a layer called Alpha 1. Deselect (Command-D), and go to Edit > Content-Aware Scale (Command-Shift-Alt-C). Select Alpha 1 from the Protect dropdown. Now pull and stretch to make the content-aware scale.
Recap & Keep Learning
The guided content-aware scaling technique takes a powerful tool and gives it some rules for which pixels should be protected.
- You'll often be using content-aware scaling to fit an image into a different shape than it originally occupied. This is because of aspect ratios, and this tutorial by Andrew Gibson will help you understand the concept.
- If you've never used the content-aware tools before, this tutorial from 2009 is a great introduction.
- Users of content-aware scaling are often trying to fit an image in a space for the web. This tutorial on How to Export JPGs for the Web has some suggestions for resizing for web-friendly images.
How are you using content-aware scaling? Have you tried guiding Photoshop while using the tool? Let me know about your experiences with this tool in the comments.
- Adobe PhotoshopIntroduction to the Content Aware Features of Adobe PhotoshopKirk Nelson
- Adobe PhotoshopPhotoshop in 60 Seconds: Content Aware Fill in PracticeKirk Nelson
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post