You can create a layer mask based on a selection. This is useful when you want to isolate a complex subject with the precision of a selection and the flexibility of a layer mask.
Make a selection
Start by creating a selection using any selection method. If the image has a solid color background, it may be easier to select the background than the subject. The Magic Wand tool is useful for selecting a solid color background.
- Select the Magic Wand tool in the Toolbar and check Contiguous in the Options bar.
- Click the image background to select it. To add to the selection if necessary, Shift-click in the image. To subtract from the selection, Option-click (MacOS) or Alt-click (Windows).
- Choose Select > Invert, so the subject is selected instead of the background. Leave the selection active.
Add a layer mask
When you add a layer mask with a selection active, the layer mask automatically contains white where there was a selection and black where there was no selection.
- With the selection active, click the Add layer mask button in the Layers panel. On the layer mask, there is white where there was a selection (the subject) and black where there was no selection (the background). The black hides the area that was not selected.
Copy to another image
You could add a new background to this image on a layer below the isolated subject. Or you could use the following method to copy the isolated subject to another image, retaining the layer mask for editing flexibility.
- Open another image. Each of the open images has its own tab at the top of the document window.
- Copy the masked layer into the second image as follows: In the Layers panel of the first image, click and hold an empty part of the layer that contains the subject and layer mask. Keeping your mouse pressed down, drag from the Layers panel of the first image to the tab of the second image and then into the document window of the second image. Release the mouse. In the Layers panel of the second image, there is a new layer containing the subject and its layer mask.
- With the subject layer still selected in the second image, press Command+T (MacOS) or Control+T (Windows). A bounding box with handles appears around the subject.
- Drag a corner handle of the bounding box to make the subject smaller or bigger. Drag from inside the bounding box to move the subject.
- Click outside the bounding box to finish scaling and positioning the subject and its layer mask in the second image.
- If you need to edit the layer mask in the second image, click the layer mask in the Layers panel to make it active. Select the Brush tool in the Toolbar. Paint with black, white, or gray to edit the layer mask.
Save your work with layers
- Save both images in .PSD or .TIFF format to retain the layers and layer masks for future editing.