CNET también está disponible en español.

Ir a español

Don't show this again

Avatar creators depart Netflix show BMW is making an M3 wagon Surface Duo phone Netflix will stream Broadway musical Diana Stimulus package status Surface Duo design

How to manage transparencies in Preview

While crude and a touch limited, Apple's Preview program can be a quick option to use for managing images with transparency.

Transparency in images files can be quite convenient, especially if you need to place the same image over different backgrounds and want it to properly blend in. While having a white or other solid color background may help you view the image on the screen, with this setup if you embed it in a document with a different-color background then the white will stand out as an obtrusive rectangle.

To help reduce this, you can both manually remove backgrounds from images using Apple's Preview application or use a transparent canvas to compile images that already contain transparency.

Instant Alpha tool in Preview
With the Instant Alpha tool, you can highlight areas (in pink) that will become a selection you can then delete. Screenshot by Topher Kessler/CNET

To create a transparency in an image that has none, you simply need to remove a section of the image. There are several ways to do this in Preview, including the basic rectangle and elliptical selection tools, or the magic lasso option for a selection that has an irregular shape, and then press the Delete key to clear the selected area of the image and make it transparent. In addition you can use the Instant Alpha tool, which will better follow the contours of shaded areas and in some cases give you a smoother way to select contents and make it transparent.

While relatively crude, these options are convenient for quick adjustments to images, especially if you would like to clear an area that is defined by a distinct border. For example, you can use these to clear the background from an image of a written signature so it can be used in other programs.

In addition to manipulating single images, you can also apply such practices when combining images. If you need to have one image superimposed on another, you might at first think to use a white background and arrange your separate images on it; however, when this is saved the background will be white and produce the obtrusive rectangle look you might wish to avoid. To overcome this, you can instead use Preview to first create a transparent canvas on which you can place your images.

Creating a blank canvas in Preview
Select the area you wish to remove and press Delete to clear it and make it transparent. In this example the entire image area becomes a blank canvas on which you can paste other images (click for larger view). Screenshot by Topher Kessler/CNET

There are multiple ways to create a transparent canvas in Preview, but one easy option is to press Shift-Control-Command-4 and then click and drag the cross-hair cursor to take a screenshot of the selection and save it to the clipboard (this method allows you to quickly set the canvas size). Then open Preview and press Command-N to create a new image from the clipboard contents, and when the window appears, press Command-A to select it followed by pressing the Delete key, and the image will turn into a checkerboard pattern.

Now you have a blank canvas on which you can paste other images that include transparency, and can copy images and paste them to the canvas on which you can arrange them as you see fit. Do keep in mind that for any pasted image, once it has been deselected then it will become static and no longer be resized or moved. While this can be a bit cumbersome, you can build your image montage one step at a time and use Command-Z to undo and then redo any inadvertent changes.

When finished, you can crop the canvas to fit its contents, and then save the image as a PNG or any other that supports transparency and use it in numerous applications that support transparency in images.

Preview extracted image
The final image has had its background removed and when pasted on a white canvas shows a fairly decent version of the extracted image. Screenshot by Topher Kessler/CNET

While there are plenty of image manipulation programs out there that offer these and far more options, if you find yourself in quick need of a way to punch a transparent hole in an image or assemble a couple of images that already contain transparency, then Preview can provide some options to do so.

UPDATE 3/28/2013, 6:50pm: corrected screenshot hotkey.

Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.