Using the Levels tool in your image editor to adjust image tones and contrast.
The Levels setting in an image editor is a powerful tool for adjusting image tones and it can also be used to make subtle colour adjustments. Different image editors place it in different drop-down menus. In Photoshop, you select Image > Adjustments > Levels; in Photoshop Elements choose Enhance > Adjust Lighting > Levels.
The Levels dialog box (shown on this page) is dominated by the image histogram, which graphs the distribution of tones in the image. Like the histogram display provided by a digital camera, the horizontal axis of this graph plots tones from pure black on the left to pure white on the right. The vertical axis plots the number of pixels at each tonal level for the 256 steps on the horizontal axis, giving you a picture of where the highest and lowest concentrations of tones lie.
A typical Levels dialog box for an image in which tones are fairly evenly distributed around the middle tones.
Also in the dialog box are two dropdown menus: Preset and Channel. The Preset menu contains a number of pre-determined adjustments, most of which can be safely ignored since the only time two images will have identical tonal ranges is when they’re of exactly the same subject under the same lighting and with the same camera settings. However, you can save Levels settings as a preset in this menu if you need to standardise adjustments for a particular set of images.
The Preset and Channel dropdown menus.
The Channel menu accesses the three colour channels (red, green and blue) and has a default setting of RGB, which adjusts all three together, thereby controlling global tonal values in the image. Most of our adjustments will use the default setting.
Above the histogram are the words ‘Input Levels’ and these can be adjusted with the three sliders (shown by arrows) below the graph. The left hand slider adjusts the shadow areas in the image, while the right slider adjusts the highlights, leaving the middle slider for adjusting the gamma (contrast) of midtones.
Below the histogram is a greyscale labelled ‘Output Levels’ with sliders at each end. By default, when the dialog box is opened, the Output sliders are at level 0, where the pixels are black, and level 255, where the pixels are white.
The image from which the Levels dialog box was taken with the dialog box superimposed.
With the Output sliders in the default positions, moving the black input slider maps the pixel value at its new position to level 0. Moving the white point slider maps the pixel value at its position to level 255.
If, for example, you move the black point slider to the right 22 steps (as shown in the illustration), all the pixels at level 22 and lower are mapped to 0 (the black point). Similarly, moving the white point slider to 245 maps all pixels at level 243 and higher to level 255.
This mapping affects the darkest and lightest pixels in each channel and all colour channels are adjusted proportionately to avoid shifting the colour balance. The remaining levels are redistributed between these levels, which increases the tonal range in the image. This has the effect of increasing the overall contrast.
Moving the black and white sliders (circled in red) in to the ends of the histogram increases the overall contrast of the image.
Moving the middle Input slider adjusts the gamma in the image. It changes the midtone from a default value of 128, thereby adjusting the intensity values of the middle range of tones without dramatically altering the highlights or shadows.
Moving the middle Input slider allows you to make subtle adjustments to the contrast in the middle of the image’s tonal range without affecting the highlights or shadows.
In Photoshop, you can identify areas in the image that will be clipped (completely black or completely white) by holding down the Alt key (Windows) or Option key (Mac OS) as you move the black point and white point sliders.
Levels adjustments should always be made on a separate adjustment layer to protect your original image against inadvertent changes that could destroy its integrity. Most editors will allow you to create a new layer specifically for Levels adjustment
Creating a new adjustment layer in Photoshop.
While the adjustments described here should work well with most images, there are always exceptions to the rule. High key images will generally need to have histograms that are weighted towards the right, whereas low key images will be weighted to the left. Images with low contrast need particular care if the low contrast is to be preserved. The middle slider can be particularly helpful in such situations.
A low-contrast original image with its Levels histogram superimposed.
Pulling in the black and white sliders makes it too contrasty, destroying the original character of the shot.
Moving the middle slider to the left (circled) maintains the low contrast of the image but produces a file that looks better and will make better prints.
The Advantage of Raw Files
For any image editing, there’s an advantage in starting with the maximum amount of image data possible. This means working on raw files, rather than JPEGs. The difference between them is stark: JPEGs are 8-bit files, which means they only contain 256 tonal levels for each of the three colour channels (red, green and blue) Raw files can be converted into 16-bit TIFF files, which contain 65,536 tonal levels for each colour channel.
The first time you open a JPEG image for Levels adjustment, the histogram is usually continuous, as shown in the Levels dialog box illustration on page 44. Move the black and white sliders in to the ends of the graph and re-open the levels dialog box and the picture changes; instead of a solid black histogram from left to right, the graph is broken by a series of white lines, creating a comb-like pattern.
Those lines represent gaps in the image information, which we’ve produced by ‘stretching’ the image’s tonal range as a result of the Levels adjustment. Even though the image may appear better than the original as a result of the Levels adjustment, the gaps in the data represent image details that are lost – permanently.
Each time a subsequent adjustment is made, more image data will be sacrificed. Eventually, a point will be reached where you begin to see noticeable transitions between colours or areas of brightness in the image in the form of banding.
When you work on raw files, it’s easy to avoid these problems because you start with much more image data. Even after several iterations of Levels adjustment (or a combination of several different editing adjustments) the histogram remains solid black. Although some data has undoubtedly been discarded, there was so much to start with that a small loss has no significant impact on image quality.
The histogram from a raw file taken at the same time as the JPEG image and converted into 16-bit TIFF format for editing. This file has undergone two Levels adjustments with no visible loss of image data reflected in the histogram.
The histogram above shows the effect of a Levels adjustment on a JPEG image. The white lines represent missing image information.
This is an excerpt from Photo Review Issue 55.