PI7 Importing a Grayscale Mask

Importing a grayscale selection is a lovely way to blend two images together. Using this technique you can use one photo as the mask for another, creating a fancy greeting card look.

importing a grayscale mask

This tutorial uses a sunset beach image by Kelly Sweet from the PhotoImpact Users Gallery, which you can get here.  A selection is imported from another image of pensive-looking young woman, which you can get here.  You can see the final, full-size image here.

Open up both images in the work space. Click on the blue title bar for the image of the young woman to make it active. Select the Magic Wand. You want to select all of the white background, so make sure the + sign is selected for Mode, Select by Line, Similarity=1, Search connected pixels is selected.

select white with Magic Wand

Drag in the white on the right side of the girl, then drag through the white on the other side of her head.

select on both sides

Let's expand the selection. Choose Selection, Expand/Shrink. When the Expand/Shrink Selection dialog box opens, expand by 3 pixels, Shape=Circle and click OK.

expand by 3 pixels

Right click on the selection and choose Invert. Now the girl is selected instead of the background. Since you've expanded the selection, you should have a nice, clean selection of the girl without any white background. Right click and Convert to Object.

inverted selection

The next part may seem counterintuitive, but stick with me. We want the underlying image to show through, but not too much. Her face is so light, all detail there will be lost when this image is converted to grayscale and the landscape shows through. Choose Format, Invert, and watch what happens. The colors will all change and the selection will become an Image object, automatically.

colors inverted

Hit the space bar to deactivate the object. To get rid of the dark areas outlining the object, make sure white is your Background color. Hit the Delete key to fill the base image with white.

fill base image with white

Let's convert the image to grayscale. You won't be able to import a selection into the beach image unless the young woman's image is in grayscale. Either choose Format, Data Type, Grayscale (8 bit), or click the Data Type button in the status bar and select Grayscale (8 bit). whichever method you choose, make sure "Create a New Image" is selected, so a new grayscale image will open. You'll notice that you don't even have to merge the object with the base image. It's done automatically when you change the Data Type. The grayscale version will look like this.

grayscale version

Click on the blue title bar for the beach image to make it active. Choose Selection, Import. Doing so will open the Import Selection dialog box.

import grayscale selection from mask image

By default, "Open grayscale images" is selected. This allows you to select a grayscale image currently open in the work space. You should only have one open right now and it will be selected. Note, however, that you could also select "File," which would let you browse to and select another grayscale image on your computer. For now, go with the default of "Open grayscale images" and click OK. You'll see a selection shaped like the image of the young woman on the beach image.

selection on beach image

It doesn't look like much, does it? However, by importing the grayscale image, you've got a selection on the beach image now that corresponds to the lights and darks in the young woman's image. The light areas in that image will allow a lot of the base image to show through, while darker areas of the grayscale selection image will block the base image from showing through. Right click on the selection and choose Convert to Object. With the Standard Selection or Pick tool, drag the newly created object to an empty area in the work space, where it will open in its own window.

object in new window

Note the animated broken lines indicating that this is an active object. If you're happy with the image the way it is, you can right click, Merge All, and save it.

If you want to try a little something extra, consider a Fadeout. While the object is still active, choose Edit, Fadeout.

add a two color fadeout

Select the Fill type that goes from left to right, Two colors, 50% gray to white and click OK. This Fadeout will make the left side of the image lighter, gradually darkening on the right side. It's a very pretty effect, and one that accents the girl rather than the beach.

fadeout added

Here is the same grayscale masking image applied to a different background image.

same mask, different photo

I'm sure you'll find lots of ways to import grayscale masks. You will have to experiment a bit to get the best location for the grayscale mask image on the underlying image. But the results will be worth the time and effort.

This tutorial uploaded 3/22/02

Do not duplicate, translate, copy, archive, appropriate or redistribute this document.



Back to Homepage