logo

   laphriini blog

taxonomy and ethology
of robber flies
as an avocation

Current Archives Main About

Removing an Unwanted Photo Background

November 18, 2012

You may have wondered how I've managed to clean up the backgrounds so completely in some of my habitus photos, such as the three for Laphria grossa, here. The following is the method I use. Now before anyone says anything I need to acknowledge five things 1) There may be better ways to do this in Adobe Photoshop; I have an older version, 5.5.; but since I can get the latest of GIMP free hardy use it any more, 2) Many of my older photos are extremely crappy -- it obviously does not apply to them, 3) Many of my newer photos, for which I have used this technique, are also extremly crappy, 4) So far at least I haven't used the technique everywhere I could or probably should have, and last, 5) I obviously still have a lot to learn about photo processing.

The GIMP is free software; the acronym stands for "GNU Image Manipulation Program". It is an open-source replacement for Adobe Photoshop. I've been using Ver. 2.8.2; some earlier versions apparently do not have all the resquisite functions implemented. You can, however, do this with a much earlier version, say for example if you have Windows 98SE and are using Version 2.2, but then it is much more involved than I've laid out here. With Version 2.8.2:

1. Open up the photo in GIMP. Go to the "Layer" menu drop-down, select "Transparency," and then select "Add Alpha Channel"

2. In the "Toolbox" select the "Color Picker Tool"

3. Position the tool (an eyedropper) on the background color you want to remove and click

4. Then click on the box in the "Toolbox" for the foreground color (the upper of two overlapped rectangles)

5. The "Change Foreground Color Box" will open

6. There will be a 6-character number listed in the "HTML_notation:" box; highlight this and copy it to the clipboard

7. Cancel out of the "Change Foreground Color" box

8. Go back to the "Layer" menu, then again to "Transparency," and then click on "Color to Alpha . . ."

9. In the "Color to Alpha" box click on the white rectangle for entering a color in HTML notation

10. Then remove the "ffffff" in the "HTML_notation:" box and replace it with the number you previously copied to the clipboard

11. Click "OK," and then "OK" again; if you've done this correctly your photo will be overlaid by a checkerboard pattern

12. Return to the "Layer" dropdown, select "Transparency," and then click on "Remove Alpha Channel"

13. Save as a GIMP XCF image; you can then export to a JPG or whatever; if you save directly to something else for some reason the file won't display correctly when it is reopened

14. Repeat entire process as necessary; it usually takes me three rounds to remove a foam pinning background more-or-less completely

15. You may have to mop up a bit with the eraser tool when everything is finished

What you've done in a nutshell is transfer the background color to a layer, then delete the layer and replace it with a default white backdrop.

You have to be careful with this technique--you obviously do not want the color you select to have any component other than white or black that is in the fly. Even then, you are not quite home free. Most of the processed photos are significantly lighter than they should be--in other words slightly washed out.

This lightness can be easily corrected with another piece of free software -- virtualStudio . It could probably be done just as easily in GIMP or Photoshop, but I don't know how. virtualStudio works great on Windows 98, 32-bit Windows XP, and even 32-bit Vista. But unfortunately for some reason it will not work on 64-bit Windows 7, which is the platform on which I now do most of my photo processing. To fix the photo with virtualStudio, open up the file, go to "Adjust" on the menu, click "Auto" and then "Expose." Then click "File" and "Save." That's it.