Adorama Camera
Adorama Learning Center
Digital Darkroom, Post-Processing & Printing
Photoshop Layers: Beyond the Basics, Part I
Back to Digital Darkroom, Post-Processing & Printing page

Photoshop Layers: Beyond the Basics, Part I

Everything you need to know to start mastering pixel layers

By

One of the most popular Photoshop features, explained




A lot of people think layers are too complicated, but if you can make a pastrami sandwich, you can work with layers. And you should, because they are one of the most powerful features of Photoshop. I'll show you some of the magic using images I shot recently on Alcatraz.

I gave a brief introduction to layers in my tip Layers: The Basics in the 100 in 100 feature, Day 56. Now we're going to look at layers in depth.

I'm using Adobe Photoshop CS3 but most image editing programs support layers. Of course, menus will be different in different programs and versions. And I'm speaking Windows; if you use a Mac substitute Command for Ctrl, Option for Alt and Control-click for right click.

Two kinds of layers

There are two kinds of layers: pixel layers and adjustment layers. Adjustment layers let you make changes to the appearance of an image without actually altering its pixels. This both preserves your original image and lets you modify the effects later without causing degradation of the image. Pixel layers (which are usually simply called layers) let you make alterations to actual image information on a separate layer, preserving your original image, and allow you to combine elements from different images.

Open the Layers Palette

To work with layers, you need the Layers palette visible. If it isn't, go to the menu bar and click Window > Layers, as shown in the figure below. As you can see there, I like to group the Layers palette with Channels and History and close the ones I rarely use, leaving the Histogram and Info palettes open. Closed palettes can always be re-opened from the Windows menu.



Every image starts as a Background layer, which you see in the Layers palette above. This is a pixel layer; it contains image information. Adjustment layers, which you can see in the figure below, sit on top of pixel layers and alter things like colors and tonalities non-destructively.



In addition to several adjustment layers, you can have several pixel layers in an image, by duplicating an existing layer, by creating a blank layer to paint or clone onto, or by importing elements from another image. I'll show you how to create these layers below.

Each layer affects those below it as though you are looking down through the stack from the top. A pixel layer in the default Normal mode blocks whatever is below it. Visualize a print laid on top of another print. Some of the prints could have transparent cutout areas that let the layers below show through. An adjustment layer is like looking down at those prints through a filter on steroids.

Each additional full-sized pixel layer increases the file size by the number of megabytes in the original Background-only image. Adjustment layers cause only a small increase.

Many things you do with layers can be done from one of three menus: the Layers menu (on the menu bar at the top of the screen), the flyout menu you get by clicking on the icon in the upper right of the layers palette (circled in red in the figure above) or by right-clicking on the layer to bring up a context-sensitive menu. (The three choices don't all give the same options.) Many operations can also be carried out by graphical methods such as dragging and dropping, as you will see below.

You control which layer you are working on by clicking it in the Layers palette. This makes it active (highlighted in blue.)

You can rename any layer by clicking on its name in the Layers palette and typing a new name. But don't rename the Background unless you know what you are doing as that changes some of its properties.

You can turn the visibility of a layer on and off with its eyeball thumbnail. If a layer (of either kind) is turned off it won't have any effect on the image. It is as though it isn't there. This provides a way to have several versions of an image in the same master file.

You can reduce the opacity of a pixel or adjustment layer with the slider in the upper right of the Layers palette.

You can change the order of a layer in the stack by simply dragging it up or down.

You can delete a layer by dragging it to the trash bin in the lower right of the Layers palette, or from the menus.

You can use the Move Tool to move pixel layers horizontally and vertically and you can resize them under the Edit > Transform menu.

You can merge layers. Even though I advocate keeping the layer structure preserved as much as possible, sometimes it is desirable to merge two or more layers. Highlight the layers by clicking on the first one and Ctrl-clicking on the others. Then go to the menus and choose Merge Layers. You can also turn off the visibility of all layers except the desired ones and choose Merge Visible.

You can cause a pixel layer to blend with one below it in some very interesting ways, using the blending mode choices in the dropdown window in the top left of the Layers palette, just left of the Opacity slider. I'll show an example below.

I will discuss pixel layers in this tutorial and adjustment layers in a subsequent one next month. The adjustment layers in the figure above are dummies put in to show what they look like. (I left their settings at the initial null values.) For simplicity I chose an image that could get by without adjustment layers and I have deleted them for the rest of this tutorial. But virtually all the images I work up do benefit from adjustment layers. (Stay tuned for Part 2.)

Create additional pixel layers

You create another pixel layer when you duplicate the Background or any other pixel layer. (One reason for doing this would be to have a before and after version when you are going to do significant cloning or a Shadow-Highlight adjustment.) You can duplicate the Background several ways. You can drag the layer to the "Create a new layer" icon at the bottom of the Layers palette, the one that looks like a piece of paper next to the trash can. Or you can do Ctrl-C and then Ctrl-V, or Ctrl-J will do it in one step.



You can create a new, empty pixel layer from the Layers menu or by simply clicking the "Create a new layer" icon shown above. This creates an empty layer on which you can paint or draw with the Brush or Pencil Tool or clone from another layer or another image.

You can also create a pixel layer by dragging a layer (or selection of one) from another image. I will do this to add a bird to the sky in this image. Dragging pixel data from another image will drop it as a new layer in the destination image. It will go on top of whichever layer was active (highlighted in blue in the Layers palette) and the new layer will become active.

You can drag a layer from one open image into another in two ways. In both cases, first click on the source image to make it active. Choose the Move Tool from the Toolbar and click anywhere inside the window of the source image. Hold the mouse button down and drag the cursor into the window of the destination image. If you wish to center the new layer in the destination image, hold down the Shift key while dragging. If you have a slow computer you may need to wait a second for the cursor to turn into a "+" sign before you let go.

You can also go to the Layers palette of the source image and click on the layer you want to import and drag it into the working image, as shown below. Here you can also hold the Shift key to center the layer in the new file. In this case you don't need to choose the Move Tool first.



Alternatively you can also copy and paste a layer between images. Go to the source image, make sure the proper layer is active and do Ctrl-C, then go to the destination image and do Ctrl-V. You can't use Ctrl-J to copy between two images.

In the case of importing the bird I don't need to drag the entire layer. I can make a rough selection, choose the Move Tool, click inside the selection and drag it into the working image, or do Ctrl-C / Ctrl-V as above. I can then erase the extra sky in the copied selection with a mask, as I will show below.



When I let go of the mouse button a new layer appears in the Layers palette containing the image piece I moved, and it is now the active layer as shown below. The bird appears larger in the destination image because the magnification of the two images is different. I had zoomed the source image to a smaller magnification to save screen space.



Masking a pixel layer

Now I need to mask out the extra sky around the bird, which doesn't match the sky in the destination image. Masking is simply non-destructive erasing and is very simple. I make sure the bird layer is active and create a mask by clicking the Add Layer Mask icon at the bottom of the Layers palette, the one that shows a circle inside a rectangle, and a mask thumbnail appears on the layer.

I can also create a mask from the Layers menu, but not from the menu I get by right-clicking. Making the mask from the menu gives the option to reveal all (the mask will be all white) or hide all (the mask will be all black.) Think of the mask as a stencil where the white areas are cutouts you can see through and the black areas are solid paper you can't see through. I prefer to begin with a white mask and paint with black to hide the areas I don't want. The mantra of the mask is: black conceals and white reveals.

I could have made a "hide-all" mask (one that is initially black) by Alt-clicking the Add Layer Mask icon instead of just clicking it.



To mask out the spurious sky I zoom in to 100 percent so I can work accurately. I need to set the foreground color to black (by clicking the icon that shows overlapping black and white squares near the bottom of the Tool palette) and choose a brush of 100 percent opacity. I size it appropriately to work in the area, and as I paint with it I will "erase" the imported sky. If I erase too much, I simply change the foreground color to white and paint over the same area to un-erase.

In the figure below the masking is only half finished. You can see the lighter sky that came with the bird is being erased.



After painting I can see if the mask needs any cleanup by turning off the Background layer. By default, Photoshop shows the transparent parts of a layer as a checkerboard grid but this makes it difficult to see if masking is sloppy, so I have chosen to turn it off. You can do this by going to Edit > Preferences > Transparency and Gamut and setting Grid Size to None. As you can see below, the mask needs some cleanup. I can do it right there in the transparency view using the black and white brushes as before.



An even better view of the mask is obtained by Alt-clicking on the mask thumbnail, which shows it in black and white. Alt-click again to return to the normal view.



After I finish cleaning up the mask I will leave it in my master file because I may make further adjustments to the image which might change the sky color. Then I may see that the mask needs further tweaking.

But wait--there's more!

Now I have a more interesting image, with the view from the ruined prison exercise yard set against the freedom of a bird. This is as far as many photographers would want to go with an image. But I can have a lot more fun than this with Layers. Read on, even if you are not into photomontage, because I'll cover some more things you need to know even if you choose to stop at just adding a bird.

Blending pixel layers

Let's open an image of the prison bars and drag it into my working file as described above, making sure it is above the bird layer. Now the fun begins. Click on the Mode dropdown list at the top left of the Layers palette (circled in red in the figure below) and step through to see if one of the blending modes looks interesting. In this case I like Hard Light but the bars are a bit too dark, so let's lower the opacity of the layer with the slider in the upper right of the Layers palette, as shown in the figure below.



The bird is lost behind the bars so I'll move it a bit, dragging it with the Move Tool. Now I'll enlarge it by going to the menu bar and choosing Edit > Transform > Scale which put a box around the layer. Hold down the Shift key to constrain the aspect ratio and drag a corner of the box to enlarge the bird.

There is a wealth of power in the Edit > Transform menu tools. Check them out!

Here is my final image, with an artistic edge added.





A few caveats

There is a potential problem when you have pixel layers other than the Background in an image. If such a layer is active and you have the Move Tool selected and inadvertently brush across the image, you will nudge the layer. Proper alignment of the layers is important, so you want to prevent their independent movement. Under normal circumstances the Background layer can't be moved, so you can link the other pixel layers to it. Hold the Control key and click each layer you want to link. Let go of Control and click the chain-link icon at the lower left of the layers palette, circled in red in the figure below.

[Fig 12]

When a layer is active, all layers linked to it will show a link thumbnail on their right edge. If you need to move a layer in the image window you can unlink it by making it active and clicking the link icon at the bottom of the Layers palette. Sometimes you also want to link several layers to each other, but not to the background, so their elements can be moved as a unit.

There is also a resolution pitfall. If you are copying from a source image that is a different resolution from that of the destination image, the copied piece will change size as its resolution scales to that of the destination image. If the bird image above had been at 240 ppi and the destination had been at 360 ppi, the bird would appear to have shrunk. But no pixels are lost in rescaling. They are just stretched or shrunk to match the pixel density of the destination image.

Another pitfall of sorts is that of the image window. When you create a new layer, any part of it that falls or is moved outside the window is still part of your file, but you can't see it. If you grab the Move Tool and push the layer around you will see its edges move in and out of the image window. Visualize moving a print behind a window cut in a mat.

If you later enlarge the canvas (Image > Canvas Size), to make a border around the image, for instance, you will reveal some of this extra image material because enlarging the canvas enlarges the image window. (Visualize enlarging the mat window above.) If you want to get rid of any extra material, just crop the image to the edge of its original window before adding canvas.

Flatten layers? Just say no!

You often see offhand remarks to the effect of, "OK, now you are done with all the adjustments to your image, so you can flatten it." DON'T! Not unless you never plan to see the image again and could care less if you or someone else discovers later that you have made a sloppy mask or some other error. If this is an image you value, always keep your layer structure in your master file so you can go back later and make changes or improvements. If you need to flatten the image to make a JPEG or to send a TIFF for printing or whatever, save it under another name or in another file format so your master file is not overwritten.

Layers can also be grouped with and clipped to other layers but that is beyond the scope of this article, as are locking layers and fill opacity (near the top of the Layers palette) and the Layer Styles dialog box. A powerful new feature in Photoshop CS3 is that the contents of two or more similar layers can also be aligned using the Edit > Align option.

Next month, Part II: Adjustment layers.

Diane Miller is a widely-exhibited freelance photographer who lives north of San Francisco, in the Wine Country, and specializes in fine-art nature photography. Her work, which can be found on her web site, www.DianeDMiller.com, has been published and exhibited throughout the Pacific Northwest. Many of her images are represented for stock by www.MonsoonImages.com.



© 2008 Adorama

 

SHARE THIS ARTICLE

Forward this article to a friend
To use this functionality you should have JS enabled

COMMENTS

Feedback
Adorama.com is top rated for customer service HACKER SAFE certified sites prevent over 99.9% of hacker crime. BBB Accredited Business