Photoshop Daily - Free resources for the Photoshop community

Insider Info: Content-Aware Scaling

by Julie Bassett. 22 Jul 2009

With the release of Photoshop CS4, one of the big buzz phrases that surrounded it was ‘Content-Aware Scaling’, an algorithm licensed by Adobe to use in CS4

With the release of Photoshop CS4, one of the big buzz phrases that surrounded it was ‘Content-Aware Scaling’, an algorithm licensed by Adobe to use in CS4.

The idea behind it is that you might not always have the exact images that you want to incorporate into a project. For example, the proportions could be all wrong, but the content of the image is just right. Rather than just giving up and looking for another image, Content-Aware Scaling enables you to protect the content that you want to keep in the image and scale the image without affecting these areas. For example, you might want to turn a standard image into a panoramic without sacrificing the main subjects, be it a background or people. And it takes almost no time to do, which means that it saves you hours of searching for a new image or trying to painstakingly rework an existing image by hand.

This hasn’t come out of nowhere, however. The seam-carving algorithm was developed by Shai Avidan (Mitsubishi Electric Research Labs) and Ariel Shamir (The Interdisciplinary Center and MERL) for content-aware image resizing, but it has only been since its integration into Photoshop CS4 that it has come to the public’s attention. The feature is designed to let you rescale and recompose at the same time, analysing the image while you are resizing it. If no area has been specified, then it will intelligently keep the most visually interesting areas. It can intelligently recognise skin tones, so that people are automatically preserved when resizing. However, if you want to select an area for yourself that you want protecting, it’s as simple as making and saving a selection.

There are two ways of using Content-Aware Scaling, depending on whether you want to define an area yourself or let Photoshop analyse the image for the most important areas.

If you want Photoshop to make the decisions, then all you need to do is select any unlocked layer in a document and select Edit>Content-Aware Scale. You will then get corner handles come up the same as if you were using Free Transform or the Crop tool. Drag it into your new scale and Photoshop will protect the areas of the image that it thinks are important.

This isn’t always going to work as you expected, though, so it pays to make a selection first, using any of your preferred selection tools. Save your selection when you have made it (Select>Save Selection) and the saved selections for any image will then appear in the Protect drop-down menu in the top toolbar when using Content-Aware Scaling.

Insider Info: Content-Aware Scaling

Choose your selection: If you have created a selection, you can choose to preserve it from the Protect drop-down menu

However, you do need to bear in mind that this isn’t a foolproof solution, and there are going to be times when it’s just not going to be possible to massively rescale your image without affecting the composition. The other thing to bear in mind is that there is a lot going on in the background with this technology, so it isn’t quite as instantaneous as you might expect. On our iMac, there was noticeable lag when we were making adjustments, which can be frustrating when you’re trying to make tiny adjustments again and again.

Still, it does a generally good job that will save you plenty of time on complex resizing projects and is certainly worth a play with.

Insider Info: Content-Aware Scaling

Before: We wanted to reduce the image size here without losing any scale in the penguin itself, so we created a selection of it first

Insider Info: Content-Aware Scaling

After – Free Transform: If we were just to Free Transform the image to the scale that we wanted, this is what would happen

Insider Info: Content-Aware Scaling

After – Content-Aware Scaling: The difference between using this and cropping is that the penguin has been preserved, but Photoshop has also recognised other elements (like the bits on the ground) and kept them, too

  • Tell a Friend
  • Our Twitter provides the latest photoshop news, tutorials, features and reviews, while our Facebook fan page is the best place to communicate with other Advanced Photoshop fans.

    2 Comments »

    • Sig said:

      pictures won’t load in Chrome
      some came in in IE 8 but way distorted ratio – super tall and skinny so hard to see what it should look like.

    • Sig said:

      hey, way cool. After posting the page refreshed (yes, I had done that several times, even copying the url and pasting in a new browser window with always the same results). And after the refresh, everything showed up. thanks so much for this article.

    What's your opinion?

    Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

    Be nice. Keep it clean. Stay on topic. No spam.

    * Required fields