Picture Soup Blog

The online destination for your [photo] imagination.

Author Archive

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.

Written by photoshopman

April 6, 2010 at 1:59 pm

Color Spaces Simplified

with 2 comments

By Gary Small

 

This map compares how much of the color spectrum (that large oval in the far back) different color spaces cover. ProPhoto RGB covers the most of the spectrum, Adobe RGB is the second largest, and sRGB is the smallest. Also shown is the color limits of the Epson 2200 printer (printing on Matte paper). Image by Jeff Schewe.

Greetings. Here’s a question I hear quite often. What color space should I choose when shooting? The answers I’ve heard have been so varied that it can oftentimes leave you more confused than when you first asked! I will try and simplify it here for you and hopefully it will reduce some of the confusion.

First of all, what is a color space? Well, to put it simply, think of a color space as a container, holding all the colors that were used to display or print a particular image. Some color spaces use more colors, some use less.

Put another way, think of when we were kids and we played with those boxes of crayons. Some of us had the box with only 8 colors. Some had 32 and some had the big box with 64 colors and the built-in sharpener. But you may have noticed that even if you had that big box of crayons, not only didn’t you use all of the colors in the box, but typically you found yourself using many of the same few colors over and over again. That’s the idea behind choosing and using a color space. We try to choose one that contains the colors we will use most often.

The human eye is capable of seeing the most colors. Presently, no mechanical device has been able to reproduce all of the colors our eyes are capable of seeing. So any color space you use will always contain fewer colors than our eyes can see; so we have no trouble there. The place we get into trouble is in reproducing colors across various media. For example, some colors we can view on a monitor cannot be reproduced by an inkjet printer and somehow that has to be dealt with.

Without getting overly technical, the most commonly used color spaces are, sRGB, Adobe RGB (1998), and ProPhoto RGB. The difference between all of these is the number of colors each one uses.

sRGB is the narrowest of all the color spaces and was developed for the web, with the idea of being a universal color space. In other words, any images that would be displayed on a web page would be rendered in this color space. It uses the fewest colors, which keeps images smaller and more efficient.

On the other end of the scale, ProPhoto RGB is the widest color space and uses the most colors out of all of them. It is typically thought by many pros that this is the color space to work in; because you wouldn’t have to worry that a color or color range you want to work with won’t be available to you.

Somewhere in the middle is Adobe RGB (1998). This was considered a good balance between the extremely narrow sRGB and the very wide and robust ProPhoto RGB.

Most digital cameras nowadays will give you a choice of choosing either Adobe RGB (1998) or sRGB. I am not going to tell you absolutely which color space you should choose because everybody works differently. I hope to be able to help you make an informed decision on your own, once you’ve read this article.

To help you, you must first and foremost, think about what will be done with the finished images you are producing. Since most output devices reproduce fewer colors than are contained in the wider color spaces, any images produced in a wider color space will have to be converted before being sent to that device. The simplest idea to think about is, if you are shooting images that will only be going onto a web page and will never be printed, sRGB would be the color space to work in, since that’s the color space used on the web. If you are printing on an inkjet printer, believe it or not, it too has a narrow color space that very closely resembles sRGB. So you’d probably do well with it there, too. If you are going to output onto more complex imaging devices which work with larger amounts of colors, you might consider working in a wider color space like Adobe (1998).

More things to consider:

When you work in one color space and need to output to a device that works in a different color space, a translation must occur. Let’s say you are working (or shooting) in Adobe (1998) and printing onto an inkjet printer that works in sRGB. You’re going from a wider to a narrower color space. What that means to you is, there are more possible colors in the image you shot with your camera than the printer can possibly reproduce. So when translating the colors for the printer (think of a funnel), the colors that aren’t reproducible on the printer have to be converted into different colors that that printer can reproduce. They will be translated into colors that will try to simulate the original colors as closely as possible, but will not always match. So there’s always a chance you will lose some of the original colors your image had when you captured it. This is when you hear terms like “clipping” and “out of gamut”. This refers to dealing with colors outside the range of that device and how to handle them. But again, I don’t want to get overly technical here.

My best advice is, keep it simple. Try to work as closely to the color space that you will be outputting to. If you don’t know where you’re outputting or may be outputting to various places, you may want to choose a wider color space. Although there are many who feel that you should just work in the widest color space possible and go from there, I feel that is not always the best choice or the most efficient. But that’s just my opinion. When photographing social events, like weddings, I usually shoot on sRGB, because the images are going onto the web for the family and guests to view, as well as being printed on printers that work within that color space. When I shoot commercial images, I tend to work in a wider color space, like Adobe (1998), because the clientele tends to be more critical and the subtlety of the colors may be more important.

Of course, I always encourage people to experiment and see what results work best for you. But I believe this should give you a good place to start. Hope this helps. Happy shooting!

PHOTOSHOP Features: Drag Brush Resizing

with 4 comments

By Gary Small a.k.a. Photoshopman

Have you ever stopped to think how many ways you can resize your brushes when you use the painting tools (Paintbrush, Healing Brush, Clone Stamp, Eraser, and History Brush) in Adobe Photoshop?

  • You can go to the Options bar and click on the little drop down arrow and move the slider to resize.
  • Or you could go to the Brushes Panel, where there are many options for modifying your brushes.

Up through Photoshop CS3, my favorite trick for brush resizing had been the keyboard shortcut using the left and right bracket keys, [ and ]…where the left bracket key makes the brush smaller and the right bracket key makes the brush bigger. In addition to that, you could also change the brush hardness (or softness) by holding the Shift key with the bracket keys… Shift + left bracket key to make the brush softer and Shift + right bracket key to make the brush harder.

Then along comes Photoshop CS4, and with it, a whole new and comprehensive method for quickly and easily resizing your brushes.

  • Give this a try: On the Mac, hold down the Control and Option keys, then drag the mouse to the right to increase the diameter of the brush or to the left to decrease the diameter of the brush. In Windows, hold the Alt key and the right mouse button down and drag left to decrease and right to increase diameter of the brush.

You can also use drag resizing to change the hardness or softness of your brushes. On the Mac, hold the Control, Option and Command keys down and drag the mouse to the right to get a harder edge and to the left for a softer edged brush. In Windows, hold down the Alt and Shift keys while holding the right mouse button down and drag the mouse as above.

As someone who does a lot of retouching, this has just become my favorite shortcut in Photoshop.

  • Now let’s take this idea a step further. If you use a tablet, like the Wacom Intuous 4, you’ll really appreciate this method of brush resizing. I don’t know about you, but when I’m using a tablet and I have the stylus positioned over the area I want to retouch, the last thing I want to do is lift my pen up and move away to go over to a menu or keyboard to resize the brush to fit what I’m doing. What I did with my pen and tablet is as follows: The Wacom Intuous pens have 2 side buttons. I programmed one of them to be a right mouse click (yes I use Windows!). So now while I’m retouching, I just hover my pen over the area I’m working at, hold down the Alt key on my keyboard, and at the same time, hold the programmed side button on my pen and, while hovering (not pressing the pen onto the tablet) I move the pen to the right to make the brush bigger or to the left to make it smaller, same as rolling the mouse. It works great and is very convenient. You would be amazed at how this one simple shortcut has sped up my retouching and increased my productivity.

♦ Look for regular contributions by Gary Small a.k.a. Photoshopman to the PictureSoup blog. Gary is a Professional Photographer, Photoshop Guru and master of color management.