Picture Soup Blog

The online destination for your [photo] imagination.

Photoshop CS4 Tip: Content Aware Scaling

with 4 comments

By Photoshopman a.k.a. Gary Small

When Photoshop CS4 was released, it was chock full of so many new features, it was hard to say which one was my favorite. As cool as most of them are, this one, in my opinion, arose out of necessity.

As a professional photographer who was raised on medium format, I got used to shooting square. Because of that, I was able to frame subjects in my viewfinder so I knew I would get a perfect 8×10 every time. Then along comes digital and I, along with many of my fellow pros, gave up our Hasselblads and Bronicas and went to 35mm DSLRs. The big downside to that is, it’s a very long, narrow rectangular format. I’ve found, more often than not, that many photographers would inadvertently fill the frame with the subject, only to find when they went to make an 8×10, they would have to either cut their subject’s feet off or do some serious Photoshopping in order to make it work into the 8×10 crop.

I’ve personally had instances where I had to take my Rectangular Marquee tool and select pieces of the image, in order to stretch the background to make the image fit the crop properly.

Then along comes Photoshop CS4 and a new feature, called “Content Aware Scaling” (CAS for short). This to me was a godsend. In a nutshell, CAS is a way of stretching or squeezing an image into a cropped format, without distorting the main subject of the picture. It’s very cool to see it in action, but takes a little understanding to get it to work properly.

The way it works, is it tries to identify what the main subject in an image is (for example, pictures of people would have a lot of flesh tone and in most cases, be at or near the center of the image.). After it does that, you would scale the image, much the way you would when you use Free Transform except that in this case, the part that was identified as the main subject is protected and Photoshop will stretch or squeeze the remaining pixels to scale the image the way you want it.

Sounds easy, right? Well, Photoshop doesn’t always get it right and as with most things, I’ve found that leaving any kind of adjustments on automatic usually yield less than stellar results. I’ve found that CAS needs a little help most of the time. We help it along by outright telling it what we want recognized as the main subject. [Screenshots showing the entire process step by step are at the end of this article —Editor] How? Well first, we bring up CAS by going to the Edit menu and choosing “Content Aware Scale” When you do this, you get a set of handles around the image that look identical to what you see when you use Free Transform. But, don’t do anything yet! Look all the way up towards the top of the work area at the Options Bar. Over to the right, there’s a little drop down box labeled Protect. This is where we can tell it what we want as our protected subject area. Now, hit the Esc key to get out of CAS for now, because we have some work to do first. Sorry, didn’t mean to be a tease!

CAS uses Alpha Channels to identify that protected area. So in order to do this, as you may have guessed, you have to first create an Alpha Channel. How do you do that? Well, for anyone who hasn’t taken one of my Photoshop classes, an Alpha Channel (which resides in the Channels Panel) is basically a saved selection. What I usually do, is take my Lasso tool, and draw a selection around the main subject of my image. I then go to the Channels Panel. That’s where you see the RGB composite and Red, Green and Blue channels that make up the image. Look all the way to the bottom of the panel and you’ll see some buttons. Click the second button from the left. This takes the selection and saves it as an Alpha Channel. The first one is appropriately named, Alpha 1, and so on. You’ll notice the thumbnail is a black/white picture of the shape of the selection you had previously made.

Now, go back to your image, deselect the selection you made, and click Edit>Content Aware Scale. Again, you’ll get the transform handles and the Option bar. NOW click the dropdown box labeled Protect, and you’ll see 2 choices: None and Alpha 1. Click Alpha 1 and you’ve chosen that selection you made to be the protected subject area. Now grab the adjustment handles and stretch or squeeze the image as needed. You’ll notice everything EXCEPT the area you originally selected transforms, or distorts. It’s very cool to watch and saves a lot of time and work.

(l.) Here is the original exposure. The image was shot too full. (c.) This is what happens when you crop the image to an 8x10. Obviously this is too tight, coming right to the top of her head and cutting into the bottom of her dress. (r.) The quality of the transformation depends on how complex the background is. In this image, you can see some parts of the chairs got distorted and jagged. However, the overall quality of the image was maintained and a nice 8x10 image was obtained with a minimum of effort. This entire process took me about 2 minutes to do from start to finish. (All photos © Gary Small)

One word of warning, if you don’t have much image area to work with, outside your protected subject area, Photoshop may have no choice but to distort some of the protected area anyway, or badly distort the remaining area and you could have unpleasant results. My best advice in situations like that is, when you shoot your images, shoot loose. Leave room for cropping or proper adjusting, and you will save valuable post-production time.

Step by Step Screenshots showing the process:

Here’s the original opened up in Photoshop. Let’s see how to use Content Aware Scaling to make an 8x10 without cutting into or distorting the main subject.

Step 1. Double-click the Background layer in the Layers panel to unlock it and change it to an editable layer (Layer 0)

Step 2. Go to the menu and click Image>Image Size. Then, making sure “Resample Image” is unchecked, change the height of the image (long dimension) to 10 inches.

Step 3. Now go back to the menu and click Image>Canvas Size. Change the width to 8 inches and click OK.

Here is the result of Step 3.

Step 4. Using the Lasso Tool, draw a rough selection around the main subject.

Step 5. Save the selection as an Alpha Channel by going to the Channels Panel and clicking the second button from the left at the bottom of the panel.

Step 6. Go to the Menu and choose Edit>Content Aware Scale.

Step 7. You will see what looks like a “Free Transform” box with handles around the image. You will also see the options bar on top (under the menu) change. Go to the Options Bar, and click the “Protect” dropdown, and choose “Alpha 1”. This will tell Photoshop to use the area you selected with the Lasso tool in Step 4 as the protected area and keep it from being distorted during the transformation.

Step 8. Now grab either the left or right side handle of the transformation box, and while holding the “Alt” (Windows) “Opt” (Mac), drag the transformation box to the side until you get to the end of the document window. Holding Alt/Opt down causes both sides to transform equally in opposite directions. In this case, dragging the right handle will cause the right side to stretch to the right and at the same time, the left side will stretch to the left. That’s it! You’re done.

♦ Gary Small a.k.a. Photoshopman is a Professional Photographer, Photoshop Guru and master of color management. Check out his work at http://www.jsmallphoto.com.

Advertisements

Written by photoshopman

April 6, 2010 at 1:59 pm

4 Responses

Subscribe to comments with RSS.

  1. […] This post was mentioned on Twitter by Diane Berkenfeld, Picture Soup. Picture Soup said: Photoshop CS5 may be coming down the pike, but we've got a great CS4 tip for you: http://wp.me/py5xM-ls […]

  2. I saw this application when they first came out with cs4 but never used it or knew where to find it once I bought cs4. Thanks for showing an easy step by step way to use it.

    Kimberly Chiaris

    April 7, 2010 at 1:14 pm

  3. Excellent. Thanks so much for the post. -Kate

  4. Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

    Silvana Pflugradt

    April 30, 2010 at 10:37 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: