A Viewfinder Darkly

Photography tips and tutorials

How to Use Levels in the GIMP for Contrast and Brightness

February 11 2013

by Philip Northeast

The GIMP’s levels tool is a first step for photographers in optimising the contrast and brightness of their digital photos by setting the white and black points of the exposure range.

Often this is the only adjustment needed to achieve an exposure representing the photographer’s impression of the scene.

This digital photography tutorial uses the Levels to process a photo taken on a dull overcast day that resulted in the original photo lacks contrast.  Another factor is the photo was saved in RAW format without any exposure adjustments normally that are applied to photos saved by the camera in the JPEG format.

It is common for professional photographers to use simple brightness and contrast adjustments in editing software. The aim is fast editing in a business environment to produce quality photos at a reasonable cost, especially when there are many photos.

The Levels toolbox in the GIMP is a powerful, yet simple tool, for adjusting aspects of exposure in a digital photo.  The histogram in the Levels tool box uses the height of the columns to represent the number of pixels at each of the 256 luminance levels that ranges from black to pure white.

Levels dialog box

The GIMP’s Levels dialog box showing the exposure histogram and slider controls


In the real world the light reflected from the subject and captured by the camera rarely falls neatly into this arrangement.  Despite the best efforts of electronic light meters built into digital cameras photographers need to make the final artistic decisions on the exposure of a photo.

In photography contrast is the range of luminance from dark to white. The Levels tool allows photographers to optimise its contrast by redefining the range from white to black in a photo.

To make the adjustments simply drag the triangle slider markers along the base of the exposure histogram in the Levels dialog box.

Set White Point

In the photograph of the old church door there are no significant areas of pure white, so setting the white point is a matter of the photographer’s judgment.

dull doorway

Unadjusted photo of church doorway

Using the lighter areas as a reference point, move the white point slider to the left.  This makes the photo brighter. Using the histogram as a guide, place the slider somewhere to the right of the last pile of pixels in the histogram.

Set Black Point 

This is similar to the white point procedure, only this time move the black point slider to the right until it approaches the first group of dark pixels.

Mid Point Slider for Brightness

The first two adjustments set the contrast, that is the range between white and black, but the midpoint slider moves as the other two are adjusted. This slider sets the overall brightness of the photo. For our church door photo the white slider moved more than the black point slider, moving the midpoint too far left making the photo too bright. Moving the slider to the right darkens the image.

church dialog during adjustment

The dialog box of the church doorway with sliders adjusted, but the changes not applied.

How far to move it? That is a matter of judgment based on the interpretation of how the photo represents the impression of the old church. This is one area where photography goes beyond mere mechanical reproduction and starts to become art.

Expanded Tonal Range 

The exposure adjustments are previewed in the GIMP’s main image display window and are then applied when the OK button is clicked in the Levels dialog box. Reopening the Levels dialog box after confirming  the changes reveals a changed histogram. Now the groups of pixels stretch across the base of the histogram, indicating a tonal range from 0 to 255. Before the adjustment the contrast had narrower range of around 200 levels.

church dialog after

The levels dialog after the changes have been applied to the image, with the expanded picket fence look.

A consequence of this contrast, or tonal, range expansion is the picket fence characteristic of the histogram of the processed image.   The danger in over expanding the contrast range is the gaps become too great indicating a loss fine detail in the transition between tones. This reduction in tones is sometimes called posterisation.  This shows that Levels are suited to fine adjustments of a digital photo, not rescuing those that are severally over or underexposed.

church door after levels

The photo of the church door after contrast adjustment using levels

One intangible benefit of using GIMP Levels is gaining familiarity with the exposure histogram that is also available on many digital cameras.

The GIMP’s levels tool is only one step in optimising a photo’s exposure , the next step is to use the Curves tool.

 

 

Share this article on Pinterest  

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *