Sponsored by Fujifilm

Creating And Saving Transparent Files

Creating And Saving Transparent Files

Sometimes we want to isolate a subject on a blank background. Whether it’s a portrait or an object, the process of cutting a subject out of the background is often called clipping or a cutout. Whatever you call it, the key is that for true transparency, the image needs to be saved in the correct file type with a truly transparent background. Here are some tips for creating and saving transparent files.

Open an image in Photoshop and click Command+J (or CTRL+J on Windows) to duplicate the image onto a new layer. If the Layers palette isn’t visible, click F7 or look for the Layers option under Photoshop’s Window menu to make it visible. You’ll need to interact with the Layers Palette directly for many of these steps.

Return to the background layer by clicking on it in the Layers palette. Select the entire background by typing Command+A (CTRL+A on Windows) then hit the delete key to clear the contents of the layer, filling it with the background color, foreground color or whatever color you choose. (You can check the background is blank by toggling on and off the top layer with the image on it, and you should see the cleared layer behind. The ability to view the layer is toggled on and off by clicking the little eye icon adjacent to each layer in the Layers palette.) So now you’ve got the original image on its own layer with an empty background layer below it. 

Creating And Saving Transparent Files

Click on the top layer, the one containing the image, to make it active (i.e. the layer you’re working on) then start selecting the subject you’d like to clip from the background. You can do this a number of ways. If it’s an isolated subject on a solid background, the easiest and quickest approach—which also happens to be very accurate—is to choose Select Subject from the Select menu. This will automatically put a “marching ants” selection around the subject.

If it’s a more complicated scene in which Photoshop would have some trouble distinguishing subject from background, try one of the selection tools such as the lasso, polygonal lasso or magnetic lasso and click and drag to create a selection outlining the subject. Shift-clicking will add to the selection, while alt- or option-clicking will subtract from the selection. In this way, you can easily make an accurate outline of the subject—though it probably still needs some tweaking.

Creating And Saving Transparent Files

With the subject selected, the next step is to create a layer mask. Before we do that, however, take the time to refine the selection. Do this by choosing Select and Mask from the Select menu or, even better, by holding the shift key while you click Select and Mask to enter Refine Edge mode. From there, you can simply paint along the edge separating the subject from the background and Photoshop will analyze the selection to improve it pixel by pixel. When you’re done, you can choose to output to a selection or, to save a step, choose to output directly to a layer mask.

If you don’t use the Refine Edge tool, you’ll need to create the layer mask manually. To do this, click the Add Layer Mask icon in the bottom left of the Layers palette. (It’s a little rectangle with a circle in it, and a tool tip will tell you what it is if you hover your mouse over it.) This will convert the background area, or whatever is outside of the selection, to an invisible portion of the layer by masking it away. If, for some reason, it shows the background and the subject disappears, you made your selection of the background instead of the subject. But never fear. To reverse the mask, simply click on the mask icon in the Layers palette to make it active and then type Command+I (or CTRL+I on Windows) to invert the mask.

So now you should see a layer with the subject clipped out and floating on the background layer. But to make the background truly empty, you’ve got to turn it off. In truth, deleting the background layer earlier in this process is really just to have an easier time gauging the efficacy of your mask. To disable the background layer, click the eye icon next to the background layer. Whatever color was filling it will disappear, revealing a checkerboard of gray and white squares that indicate it’s truly empty as far as Photoshop is concerned.

Creating And Saving Transparent Files

So now you’ve isolated the subject on a truly transparent background. But if you save it as a JPEG you’ll soon discover it’s not transparent any more. (Photoshop will flatten it onto a white background.) For true transparency, it’s all about the file type. If you’re dropping this image into a webpage, print layout or video and true transparency is key, you’ll have to save it in an appropriate file type that brings the transparency with it. A PSD file will accomplish this, but not every application will play nicely with that file type. Instead, a PNG file is my preferred option to retain the transparent background, as it’s generally flexible enough to be used without issue in a variety of other applications.

Leave a Comment