Color Depth

Before showing you why you should always whenever possible use the raw data from your camera instead of the camera processed jpg a little history is needed.When computers first started to be used all the ] graphics were 1 bit, either on or off. You have probably seen these screens, at least in the movies. The text was either white with a black background or were light green with a dark green back ground, depending on the monitor. The reason was that the monitor was sent a signal telling it to either light the dot or not.This is a color bar that is set to that type of display. It goes from all black to all white with not transition because there are not values that can be sent.

Sample of a 1 bit display

You can’t see the right side of the image because the background on the page is the same as the image’s right side

As computer hardware developed the graphics images were upgraded and the data was sent to the monitor with 4 bits. This allowed for 16 colors. (2^4 — 2 raised to the 4th power.) An example of a gray image is shown below. It again starts out as black and becomes white on the right but not does it in 16 steps.

4 bit image – 16 colors

That was a major step and picture type images were recognizable but didn’t look very goo. Most users really wanted something better. The computer engineers stepped up and started using 8 bits per pixel (picture element). That gave the user 256 possible levels. Note, we are still talking about black and white, not color images. It was still a lot better.

8 bit gray scale color bar

While these were very useable users still wanted to see color. If memory serves the original color standard was 64 colors. The way it was done was send 4 possible levels for red, 4 for green, and 4 for blue. These could be “mixed” to produce 64 colors. CompuServe introduced the gif file format which produced 256 colors. This worked for most computer graphics but still something to be desired for photos.

By adding bits sent to the monitor via the graphics adapter card the color count was upped to 32,000, then 64,000. This was pretty good but what if we sent 256 levels for each of the three colors? 256*256*256? This gave of 16,777,216 colors and was dubbed truecolor. Photos now looked superb and that is now the standard.

Now to photography. Lets look at a picture I took a few years ago while in Arizona.

Balloon over Sedona

Lets assign a level to each picture element with 255 being pure white and 0 being pure black. We go through and count all the pixels that are completely black, then we count all the pixels that have a value of 1, then 2, and continue until we count all the completely white and assign it the value of 255. We then plot all these counts into a graph, called a histogram. (Fortunately we don’t really have to do that. Most graphics editors have that function.) Here is the histogram generated from the balloon picture above.

Histogram of the balloon photograph

Notice that there are no pixels that were black or even close to that and there are also none near being pure white. This means the picture doesn’t have much contrast. (Histograms are also useful for checking for correct exposure. In fact many digital SLRs can display the histogram for the picture just taken for that very reason.)

Often it is desirable to expand that histogram out so that the image has a better dynamic range resulting in a more vibrant image. But things can happen when you do that.

Taken to the extreme, if expanded all the way you will be taking maybe a hundred different values and putting them in 255 slots. This results in gaps.

Expanded so much that the gaps are very visible

What does this do to the image?

After expansion

Yuck! A lot of contrast but ugly. Now if we could eliminate the gaps . . .

Enter the raw image. Different cameras are different but typically each color channel will be 12 or 16 bits each instead of 8. What this means is a histogram would go from something like 4096 values instead of 255. That means the small 100 value region would really have many more values. In expanding it out to the full 255 range, we are now taking over a 1000 values and fitting it into the 255 range. No gaps, therefore better contrast with no mottling.

One question that may be asked is why is the expanded range still 255 and not 4096? That is because when we save the actual image it must be converted back to 255 values for each channel. Don’t worry though, the software does it automatically.

Return to Image Editing