Preserving transparency

As you may recall, I mentioned we'd be talking more about the Lock Transparency check box, first mentioned in the "Locking layers" section and highlighted in Figure 12-32. Well, sure enough, the time has come to do exactly that. When selected, this check box prevents you from painting inside the transparent portions of the layer. And although that may sound like a small thing, it is in fact the most useful Lock option of them all.

Figure 12-32: The Lock Transparency check box enables you to paint inside the layer's transparency mask without harming the transparent pixels.

Suppose I want to paint inside the girl shown in Figure 12-32. If this were a flat, non-layered image, I'd have to draw a selection outline carefully around her hair and arms, as I did back in Chapter 9. But there's no need to do this when using layers. Because the girl lies on a different layer than her background, a permanent selection outline tells Photoshop which pixels are transparent and which are opaque. This is the transparency mask.

The first example in Figure 12-33 shows the girl on her own with the background hidden. The transparent areas outside the mask appear in the checkerboard pattern. When the Lock Transparency check box is turned off, you can paint anywhere you want inside the layer. Selecting Lock Transparency activates the transparency mask and places the checkerboard area off limits.

Figure 12-33: The layered girl as she appears on her own (left) and when airbrushed with the Lock Transparency check box turned on (right).

The right image in Figure 12-33 shows what happens after I select Lock Transparency and paint around the girl with the airbrush. The foreground color is set to white. Notice that no matter how much paint I might apply, none of it leaks out onto the background.

Although this enlightening discussion pretty well covers it, I feel compelled to share a few additional words about Lock Transparency:

Tip You can turn Lock Transparency on and off from the keyboard by pressing the standard slash character, /, right there on the same key with the question mark.

♦ Remember, you can only fill the opaque pixels in a layer, whether Lock Transparency is on or off. Use Ctrl+Shift+Backspace to fill with the background color and Shift+Alt+Backspace to fill with the foreground color.

♦ The Lock Transparency check box is dimmed when the background layer is active because this layer is entirely opaque. There's no transparency to lock, eh? (That's my impression of a Canadian explaining layer theory. It needs a little work, but I think I'm getting close.)

And finally, here's a question for all you folks who think you may have Photoshop mastered. Which of the brush modes (explained in Chapter 5) is the exact opposite of Lock Transparency? The answer is Behind. To see what I mean, turn off Lock Transparency. Then select the paintbrush tool and choose the Behind brush mode in the Options bar. Now paint. Photoshop applies the foreground color exclusively outside the transparency mask, thus protecting the opaque pixels. So it follows, when Lock Transparency is turned on, the Behind brush mode is dimmed.

The moral? Behind is not a true brush mode and should not be grouped with the likes of Multiply and Screen in the Options bar. If you ask me, the better solution would be a Lock Opacity check box in the Layers palette. Alas, Adobe's engineers seem to have better things to do, such as add three other Lock check boxes, none of which have the slightest thing to do with locking opacity. But just because I've been complaining about the Behind "brush mode" for the last, oh gosh, seven years doesn't mean that I'm bitter or anything. Heavens no. I like to be ignored! It robs my life of meaning, which is precisely what I'm looking for. In fact, I think I'll go and end it all right now. And for what? A check box. That's all I want. A small and unobtrusive check box, possibly with a picture of my face next to it and a little caption reading, "Yes, Deke, you were right. Can you ever forgive us for being such knot-heads?" I mean, really, am I asking too much?

So, in conclusion, Lock Transparency is your friend; Behind is the tool of Satan. Too bad so few things in the world are this black and white.

Photoshop Secrets

Photoshop Secrets

Are You Frustrated Because Your Graphics Are Not Looking Professional? Have You Been Slaving Over Your Projects, But Find Yourself Not Getting What You Want From Your Generic Graphic Software? Well, youre about to learn some of the secrets and tips to enhance your images, photos and other projects that you are trying to create and make look professional.

Get My Free Ebook

Post a comment