How To Read An Image Histogram In Photoshop
Written by Steve Patterson. One of the most important and valuable tools that Photoshop gives us when editing, retouching or restoring images is the histogram. In fact, histograms are so valuable, they're not limited to just Photoshop. You'll find histograms in lots of other image editing programs as well, like Photoshop Elements, Adobe Lightroom, the Camera Raw plug-in, and more! Many digital cameras today also come with a handy histogram feature that lets you view the exposure of your photos right after you snap them! For something so simple, it's hard to imagine life without histograms, at least for anyone who's serious about the quality of their photos.
So what exactly is a histogram? Quite simply, a histogram is a graph. I know, as soon as I mention the word "graph", many people drift off to sleep, but don't worry, this is easy stuff. A histogram is a graph that shows us the current tonal range of our image. By "tonal range", I mean the brightness values of the image. A histogram shows us how much of the image is currently pure black (the darkest an image can be), how much of it is currently pure white (the brightest an image can be), and how much of it falls somewhere between black and white. It's important not to get "black and white" here confused with black and white images. Histograms work equally well with full color photos, since we're dealing with brightness values, not colors (although we can use histograms to view the brightness values of specific colors, but that goes beyond anything we need to know at this point).
Why do we need to know the tonal range of our image? Well, for one thing, have you ever looked at a photo that seemed a little "flat"? It may have been a great photo overall but it just wasn't popping out at you as much as it should. Chances are, it's because the image was suffering from low contrast, and you can use a histogram to easily see where the problem lies. It can quickly show us if the highlights in a photo are not as bright as they could be, or the shadows may not be as dark as they could be. Both of these problems lead to poor contrast, but thankfully, histograms make them so easy to spot that we can quickly correct them instead of wasting time wondering what's wrong.
Another potential problem that we can run into when editing images is that parts of a photo may be so dark that they've become pure black, or they may be so light, they've become pure white. When this happens, we lose all of the image detail in those parts of the photo. Technically, it's known as "clipping" the shadows and highlights, but you may have heard someone use terms like "plugging up" the shadows or "blowing out" the highlights. It all means the same thing, which is that we've lost image detail. It's not always easy for us to notice either of these problems just by looking at the photo on the screen since our eyes are simply not sensitive enough (although we can distinguish detail in shadows much more easily than we can in highlights), but by taking a quick look at the histogram for the image, we can instantly see if we've gone a little too far with our editing and need to back things off a little bit. Or, if we're restoring an old photo, the histogram could tell us that the original image itself has lost detail in the highlights or shadows, allowing us to proceed from there. The bottom line is, if you're editing images and don't know how to read a histogram, you and your photos are at a serious disadvantage.Get all of our tutorials as print-ready PDFs!
Viewing A Histogram In Photoshop
The most common place to view a histogram in Photoshop is inside the Levels dialog box, although Adobe introduced the much welcomed Histogram palette in Photoshop CS and in Photoshop CS3 they added a convenient histogram to the Curves dialog box, but Levels makes it very easy to see exactly what the histogram is telling us. Here's an example of a typical histogram inside Levels. The histogram itself is the area of solid black that looks like a mountain range:
The reason that Levels makes it so easy to understand what the histogram is telling us is because the Levels dialog box includes a horizontal gradient bar directly below the histogram. The gradient starts from pure black on the far left and gradually gets brighter until it reaches pure white on the far right:
Why does this gradient make it so easy to understand the histogram? It's because the brightness levels of the gradient match up exactly with the histogram above it! The histogram shows us how the tonal range of our image is currently being distributed between pure black and pure white. The higher the histogram appears over a certain brightness level in the gradient, the more of our image is appearing at that brightness level. The lower the histogram is over a certain brightness level in the gradient, the less of our image is appearing at that brightness level. If the histogram doesn't appear at all over a certain brightness level in the gradient, it means that nothing in our image is currently appearing at that brightness level.
For example, if we look on the histogram's far left, we see that only a very small amount of the histogram is showing. That area on the far left represents pure black in the image. How do we know that? If you look closely, you'll notice that the area on the far left lines up vertically with pure black in the gradient below it. Since there's very little of the histogram in that area, we know that there's very little in our image that's pure black:
If we look at the far right, we see even less of the histogram. In fact, there's hardly anything showing there at all. The area on the far right represents pure white, and again, we can easily see this in the Levels dialog box because the area lines up vertically with pure white in the gradient below it. Since only a tiny sliver of the gradient is appearing on the far right, we know that there is next to nothing in our image that's currently pure white:
We may have very little that's pure black or pure white, but we're seeing very steep peaks elsewhere in the histogram between black and white, which means that we have lots of image information at those brightness levels. Again, if we compare the peaks in the histogram with the brightness levels of the gradient directly below them, we can see exactly how bright those areas in the image currently are:
Without even looking at the image itself in the document window, we can see just by viewing its histogram that the photo is well exposed with lots of image detail spread evenly across the range of brightness levels, and since there's very little of the histogram appearing on the far left or right, we know that the shadows and highlights are not being clipped to pure black or white, which means we haven't lost any detail in those areas.
By comparison, here's an example of a histogram from an image that's suffering from clipped shadows. Notice how much of the histogram is bunched up on the far left, with a tall peak directly over the pure black in the gradient below it. This is a good indication that image detail in the shadows has been lost because much of it has been forced to pure black, either by a poor exposure, a bad quality scan, or from simply darkening the image too much in the editing process:
We're not going to worry about fixing the problem here. We're simply looking at the histogram itself, learning how to understand what it's telling us about our images, and learning to recognize potential problems like the clipped shadows in the histogram above.
Here's an example of a histogram from an image with the exact opposite problem. In this histogram, the highlights have been clipped, which means we've lost detail in the highlights because they've been forced to pure white. Again, this could be caused by overexposure, a bad scan, or from brightening the image too much in the editing process:
Without the histogram, you could easily not notice that you've lost image detail in the shadows or highlights until it's too late, but with the histogram, it's like having Photoshop keeping an eye on the image for you as you're working, warning you of potential problems every step of the way.
Next, we'll take an even closer look at histograms and answer the question of whether or not there's such a thing as an "ideal" or "perfect" histogram.
256 Levels Of Brightness
If you look directly below the left or right sides of the histogram in the Levels dialog box, you'll see a number, with 0 on the left and 255 on the right. Histograms show us exactly 256 different brightness levels from black to white, with 0 being pure black and 255 being pure white, and that's because standard 8-bit images contain 256 possible brightness values (a photo saved as a JPEG file, for example, is an 8-bit image). The reason the numbers go from 0 to 255 and not from 1 to 256 is because while you and I usually start counting from the number 1, computers (and computer programs like Photoshop) start counting from 0:
If you look closely along the top of a histogram, you'll see that it's not smooth. Rather, it's made up of tiny little spikes and ridges, each one being the top of a thin vertical black bar. If you were to count them, assuming you had a continuous histogram from left to right, you'd find exactly 256 bars, with each one representing a different brightness level. The more pixels you have in your image at a specific brightness level, the higher up the bar for that level goes. Here's a zoomed-in view of the histogram to make the top easier to see:
Keep in mind that there is not a 1:1 ratio between the histogram and the actual number of pixels in the image. Most digital photos these days contain millions of pixels, and if Adobe tried to fit all of them inside the histogram, you would need several computer screens just to view it! Therefore, the histogram simply gives us an overall idea of how much of the image is at a certain brightness level compared to other brightness levels. Also note that even if you're working in 16-bit mode in Photoshop, which increases the number of possible brightness values from 256 to a whopping 65,536 of them, the histogram will still display the same 256 levels of brightness, again for the simple reason that it wouldn't fit on your screen otherwise.
The Myth Of The Perfect Histogram
Many people ask if there's such a thing as an ideal or perfect histogram. Earlier, I referred to the first histogram we looked at as an example of a "typical" histogram, but in reality, there's no such thing. Every image is different, which means that every histogram will be different. There is no ideal shape for a histogram that you should be working towards. In fact, caring too much about what your histogram looks like would be a big mistake. Histograms should be used as a guide, not a goal. What matters most is the image itself. The histogram simply shows us what we're working with and what sort of problems may already exist in the image (underexposed, overexposed, etc.). And by keeping an eye on the histogram as we work, we can make sure we don't take things too far and lose important image details. However, you should always judge the success of your images based on what the image itself looks like, not what the histogram looks like.
As an example of how different the histogram can be from one image to the next, consider this photo:
A night time photo like the one above would naturally be dark, or at least, darker than your average photo shot in the middle of the afternoon. Here's what the histogram for this photo looks like:
Notice how most of the histogram falls within the left half of the brightness range, which means that most of the image is dark and there's little in the way of lighter tones. Images like this one are commonly referred to as low-key images because they're just naturally dark. In fact, in this case, there's a large spike in the histogram on the far left, indicating that large areas of this photo are pure black. Now, everything we've learned up to this point tells us that so much pure black is a problem because it means we've lost image detail in the shadows, but as with most things in life, there are occasional exceptions to the rule. In this photo, since the plants in the foreground are meant to be silhouetted against the moonlight, it makes sense to have so much pure black in the image. It would be wrong to try and "fix" this photo just to make the histogram look more appealing.
Here's another example to consider:
This winter scene is quite the opposite of the previous image. Here, everything is bright with very few dark areas to be found. Here's what the histogram looks like:
In this case, we can see that most of the histogram falls within the right half of the brightness range, telling us that there are very few darker tones in the photo. In fact, not only is there nothing that's pure black, there's nothing even close to pure black in this photo. Images like this one are commonly referred to as high-key images because they're naturally bright. Here again, it would be wrong to make adjustments to the image simply to balance out the histogram, since the photo itself would suffer.
The rest of the tutorials in our Photo Editing section deal with how to actually correct various image problems, but since knowing how to read a histogram in Photoshop is such an essential skill for professional-level image editing, I thought it would be helpful to take a closer look at exactly what they are and what it is that histograms can tell us about our images.
Whether you're viewing the histogram on the LCD screen of your digital camera, or using it to adjust the exposure in Camera Raw, fixing overall tonal problems with Levels, boosting image contrast with Curves, or simply keeping an eye on the Histogram palette as you work, hopefully you have a better understanding at this point of just how indispensable histograms really are.