Removing Backgrounds and Maintaining Transparency in Graphics Software

How do I get rid of the background in my picture?

Erasing the Background
Erasing the Background | View Larger. © S. Chastain

Probably the most often-asked question regarding graphics software is, "How do I get rid of the background in my picture?". Unfortunately there is not one simple answer... there are a number of approaches you can take. The one you choose has a lot to do with your software, the particular image you're using, final output (print or electronic), and the desired end result. This broad overview links you to several articles with information relating to removing backgrounds and maintaining transparency in graphics software.

Vector vs. Bitmap Images
When vector images are layered there are no background issues to worry about, but when a vector image is imported into a bitmap-based paint program or converted to a bitmap format the image is rasterized--destroying its vector qualities. For this reason, it's important to always use an illustration program when editing vector images, and a paint program when editing bitmapped images.

 
  • Image Editors and Illustration Software

    Transparency and Image Formats

    The most common web graphics formats, GIF and JPEG, are bitmapped graphics. This means they will always have a background. "What?", you're probably saying... "surely you've seen images on the web with transparent backgrounds!" You're absolutely correct; this is possible due to the GIF89a format. GIF89a images have the ability to designate a single color in the image as transparent.

    PNG images also support transparency, but unlike GIF, PNG allows you to define more than a single color as transparent. Another advantage of PNG is that it supports millions of colors, whereas GIF is limited to only 256 colors. The problem with PNG is that not all browsers support it, and those that do are inconsistent in their support of it.

  • About JPEG
  • About GIF
  • About PNG

    If you're planning to export an image as a transparent GIF or PNG, you must make sure that the program you are going to be importing to will accept that format. In general, you should only use GIF or PNG for transparent images you plan to use on the screen. For printed output, you should learn some of the other methods for creating transparency.

(Continued from page 1)

Masking Magic

If your image has a solid color background, the easiest way to remove it is by using your image editor's " magic wand" tool to quickly select the background and delete it. By clicking on the background color with your magic wand tool, you are able to easily select all the adjacent pixels within the same color similarity. If you have additional, non-adjacent areas, you will need to use the magic wand tool again in additive mode to add to the selection.

Consult your software help file for the specifics on how to do this.

If your image has a background that is not solid, the process is a bit more complicated since you will have to manually mask the area to be removed. Once you have the area masked you can either delete the masked area, or invert your mask and copy the object from the selection. Visit the following links to learn more about masks and for specific masking tools and techniques:

For images with very complex backgrounds, there is software specifically designed for making these difficult selections and dropping out the background.

Once you have isolated the object, you can save it as a transparent GIF or PNG and use the image in any program that supports the chosen format. But what if your program doesn't support these formats?

Dropout Color and Color Masks

Many programs have the internal ability to dropout, or mask, a single color in an image. For instance, Microsoft Publisher's wrap text to picture command will automatically drop out the white pixels in an image. With CorelDRAW's bitmap color mask tool, you can choose colors to be removed from an image.

This provides a little more flexibility since you can specify more than one color, control the tolerance level of the masked color, and it works for images that have a background color other than white. There may be other software with this functionality; consult your documentation to find out.

  • How To Remove the Background in a Bitmap Using Bitmap Color Mask in CorelDraw

    There are some drawbacks to these methods, however. The first is that these functions will only work within that particular program. You generally can't drop out a color in CorelDRAW, paste the image into another program, and have the transparent areas remain. The other drawback is that the dropout tool works in such a way that it drops out all instances of that particular color and there may be instances of that color in parts of the image other that the background. This results in unsightly "holes" in your image.

    When dropout and color masking don't work for your image, another option you might be able to use is called a slice, trim, clip, or mask. This is done by drawing a vector shape, and using the vector outline to cut, or mask, the bitmap image.

  • How To Mask a Bitmap With a Vector Shape With CorelDraw's PowerClip Feature

    If you've exhausted all the options above, and you still haven't achieved the desired results, it's time to take a look at what can be done with your software's pen tool and clipping paths.