Layer Masks on an Image Layer
Many of the adjustments commonly needed to optimize an image can be done with adjustment layers. Some however necessitate duplicating your background image layer or combining multiple image layers from other sources. And as soon as you start working with more than one layer containing image pixels, the challenge of effectively combining them back together again confronts you. For this reason, Photoshop allows you to add a layer mask to an image layer. Once you have one, you can paint with shades of black and white to hide or reveal the contents of your layer just as we did last week to modify the effects of adjustment layers. The concept is the same, only the type of layer being modified differs.
You don't get one automatically as you do on an adjustment layer, but adding one is pretty easy, and as with most things in Photoshop, you can do so in more than one way. To do so via the menus, first, select the layer you wish to mask in the Layers palette and then go to Layer >> Layer Mask. Under this, you will find two choices: "Reveal All" and "Hide All." Reveal All will add a completely white layer mask to the right of your selected image layer. Hide All will give you a completely black layer mask, effectively hiding the contents of the layer you are working on. To create a new empty mask without the menus, click with your mouse on the small circle-within-a-square icon at the bottom of the Layers palette. If instead you need a new black mask to hide your layer, hold down the Alt key (Option key on Mac OS) while clicking on this same "new layer mask" icon.
Whichever method you choose and regardless of whether you start with an all black or an all white mask, you can adjust it as needed just as you would any other layer mask. What tends to work best is to use a soft-edged brush with a low opacity. Set your foreground and background colors to black and white and simply toggle between them using the "X" key on your keyboard. If you make a mistake, don't worry. You can easily switch to the alternate color this way and repaint as needed. Wherever your mask is white, the image content of your layer will be visible, and wherever it is black, the layer contents will be hidden. As with a mask on an adjustment layer, shades between white and black will proportionally reveal the image layer contents.
Masking image layers allows you to combine layers with full control. As has been a common theme with masking, even after you have closed and re-opened an image, you can still tweak your mask without loss. Unlike erasing an image layer, masking it only hides it. Everything is still there underneath your mask so if you change your mind, you can put it back later, just as it was to begin with.