Monday, March 15, 2010

Color and contrast correction in The Gimp

The Gimp is a free, open-source program. GIMP stands for GNU Image Manipulation Program. (GNU is a long-running free software project that is in large part responsible for making Linux possible)  The Gimp is the standard graphics software in most Linux versions, and it is also available for Windows.

I'm slowly learning to use The Gimp to edit photos. One of the main uses is to adjust color and contrast where the camera didn't do a good job initially. In some cases, the "auto white balance" is enough, but usually better results can be had with just a few more clicks--This is especially true when there is an area that is much brighter than the rest, that is not part of the subject.

Here is a picture I found on a blog I read regularly (used with permission, click to enlarge):

His camera was set wrong, giving all the pictures a blue tint.

Open the picture in The GIMP. Click Colors, then Levels--you will wind up with the menu shown to the left.  The controls shown here in the oval are the ones you want-- "pick black point" "pick grey point" and "pick white point". Hovering will show which is which. Click on the "pick white point". The next point you click on the image will become the new "whitest" value--Most of the time you want the whitest area of the subject that is NOT a bright reflection or direct light source. You can try different spots to see what the results are, but keep in mind that this isn't the finished result.

For the white point, I used the white van in the background.

Repeat the process with black, selecting the deepest black you want to show distinctly--not necessarily the deepest in the picture.

Finally, select the grey point--in this case, I used the dirt on one of the motorcycle tires.  Make sure you click OK before you do anything else, otherwise the picture will revert to the original version.

 This method also works if the colors are OK but brightness and contrast is screwy--I've had better luck using this than trying to manually adjust brightness and contrast.  


  1. Anonymous9:06 PM

    That is freaking brilliant! Do you think it would work to enhance photos taken via phone? I have a lot of food pR0n photos that I would like to pretty up.

  2. The GIMP doesn't care where the original photo came from, as long as there is enough color to work with. If I remember right, these originals were from a phone.

    The most common cause of odd colors is the camera not picking the right white balance (or some forgetful person like me manually setting it, then forgetting to re-set when I take pictures under different light. With most cameras you can force it to match either florescent or incandescent (sometimes called tungsten) lighting rather than relying on the camera to figure it out.

  3. Very handy tip. I love The Gimp. I also hate the Gimp. But that's true of most software that does 2,000 things of which I need 11.