24 – Levels and Curves

In this lesson, we will discuss what is, by far, the most important and powerful tool you can use to post-process an image: curves. With it alone, you can do maybe 50% of all your editing. Throw in a basic knowledge of layers and masks, which we will talk about tomorrow, and this climbs to something like 80% (disclaimer: these figures were made up on the spot).

Even though curves are relatively straightforward, there is a simplified version of the tool which, while losing some power, is often sufficient: levels.

Levels and curves modify exposure and, by extension, contrast. In order to be used effectively, it is crucial to have a good understanding of the histogram.

Let’s talk about levels first. As you may remember, we said in the histogram lesson that a “perfect” histogram is one which has a bell shape, tapering off in both directions and ending exactly at the edges, which correspond to pure white and pure black. You don’t want it to end after the right edge, for instance, because it would mean that you are losing information and getting pure white, and you don’t want it to end before the right edge because it means that there are no really bright values in the image, which will make it appear dull and washed-out, lacking contrast.

If you were careful about your exposure, your histogram should be on the conservative side, to avoid losing details. This means that the histogram is “too small” and doesn’t touch the edges: the image looks a bit dull, without much contrast. In a word, it doesn’t “pop”!

What levels does is resize the box, so that your histogram fits into it perfectly. It looks like on the following image (this comes from the Gimp, but Photoshop or countless other applications will be similar). There are three controls: black, grey and white points. Let’s forget about grey for now and concentrate on black and white. If you slide them around, they will define the new edges of the box in which the histogram lives.


One intuitive way to think about it is the following: imagine that the histogram is a bit spring (or a bit of jelly). When you move the black point to the right, it will be attached to the left edge of your spring. Then when you apply the levels tool, the black point goes back to the left edge where it started, bringing with it the histogram, thus deforming it to fit the box better. Of course, the white point does the same thing on the other side.

Concretely, what you should do 95% of the time is simply to drag the black point to the leftmost part of the histogram which contains something, and the white one to the rightmost part. Once you apply the tool, you will have a perfectly shaped histogram, with just a touch of pure black and pure white, but no lost information.

Ok, but what about the grey point? Its action is simple: it will also deform the histogram, but instead of affecting the edges, it has to do with the balance between highlights and shadows. If you drag it to the right then apply the levels tool, it will also return to its position in the middle, taking with it the histogram. This will compress the shadows and expand the highlights, thus darkening the image. Similarly, shifting it to the left will brighten the image, since it gives more importance to the highlights.

The grey point is very useful for a simple reason: it doesn’t touch the edges. So with it, you can modify the overall brightness of your image without ever having to worry about whether you are losing any information to pure white or pure black.

Useful as it may be, the levels tool has two important limitations: it only provides three points of reference (black, grey and white), and it is impossible to control how it deforms the histogram. This makes it suitable for “high level” manipulations, but not for fine-grained ones. This is where curves will be useful. See an example of the interface here:


Like levels, curves will remap brightness values (i.e. they will say “all pixels with brightness 127 should now have brightness 135” and so on), but they do so much more explicitly. It works in the following way: for each value on the horizontal axis, modify its brightness to the value on the vertical axis to which the curve makes it match. This means that if your curve is a perfect diagonal (what you always start with), there is no modification. If the curve is below the diagonal, you are darkening the image. If it is above the diagonal, you are brightening it.

So far, so good. Where this becomes really interesting is when you are mixing both. A typical curve will have an S shape: the shadows will be darkened and the highlights brightened. In other words, you are increasing contrast. By choosing where the S intersects the diagonal and how deep the bends are, you can very precisely modify contrast and brightness. You can also make modifications to only the brightness values you are interested in while leaving the others untouched. The possibilities are nearly endless.

Another interesting way to use both levels and curves is with the eyedropper tool. In levels, this will allow you to select directly on the image what should be pure white and pure black. In curves, it will do no modification but will simply place a control point on the curve corresponding to the exact brightness of the pixel under the cursor. You then simply have to move the point up or down to modify the brightness of this area of the image.

Previous Lesson: DAM and Backups

Next Lesson: Layers and Masks

Leave a Comment

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