Bit-Depth Primer

How Bit-Depth Translates to Luminosity & Color

by Daniel Neeley

Bit-depth is one of those items that can lead to a bit of confusion. There typically is a basic understanding that bit-depth has an effect on image quality but exactly how it applies is a bit of a foggy area. Many people make the mistake of directly comparing the numerical difference between a 8-bit/channel file and a 16-bit/channel (bpc from here on) file. Since 16 is twice the value of 8, the usual school of thought is that 16bpc files have only twice the image quality. They figure that difference can’t be noticeable enough to justify the additional time, storage and processing power needed to utilize 16bpc files.

Although logical, computer data dœs not work in that fashion. Information available dœs not increase through addition, but dœs so through powers of two. So even though the number of bits doubles from 8 to 16, the data that is derived from those bits increases exponentially.

To better understand how they work, we’ll have to dust off the old Thinking-Cap and do some math (don’t worry, it’s not too difficult).

A Bit of What?

Before we can talk about how bit-depth effects image quality, we need to explore what exactly a bit is. A bit is the smallest unit of data computers can understand. In fact, it is the only unit of measurement a computer understands. Bits are represented to us humans as either 0 or 1. This, as some may know, is called binary code and essentially represents the on and off switching of an electrical circuit. The bit 1 means the circuit is on and 0 is when it’s off. When these bits are strung together in a series they can be used to describe information.

8 bits = 10100101

Bit-depth is specifically the number of bits in a string of Binary Code that represents a single value of data. In the case of an image it is a level of luminosity recorded by the camera.

From Bits To Luminosity & Color

Knowing the bit-depth of an image you can figure out the total number of possible values of color or luminosity an image can contain. This is important as it can tell you what your options are for editing an image.

Luminosity Data

Figuring out how many luminosity levels are available in an image is done by calculating the number of bit combinations possible. This is done by multiplying the number of possible bit values (two: 1 or 0) times itself for the number of times indicated by the bit-depth. For example, 8-bits would be 2*2*2*2*2*2*2*2 which equals 256 bit-combinations (28 = 256). An 8bpc image has the potential of displaying 256 unique luminosity levels from pure black (0) to pure white (255).

The greater the bit-depth, the more luminosity levels there are to work with and the more accurate or more drastic your adjustments to the image can be. A 12bpc file for example will provide 4,096 possible luminosity levels (212). That is a considerable difference for only four extra bits.

When working with Black & White images bit-depth is especially important. Once converted you either have only a single channel of luminosity data or three duplicate channels of the same data. Since a high-bit image will provide far more data to work with you benefit from more accurate contrast and brightness adjustments, a much reduced chance of posterization and the ability to perform more drastic adjustments. Unless the adjustments are very extreme, you generally will be able to perform a good amount of work with no noticeable loss in image quality. B&W images are after all, nothing but variations in luminosity and so the more luminosity data you have, the better off you are.

In the table below you can see how drastically bit-depth effects the number of possible luminosity levels you have to work with when editing an image.

Color Data

A typical image file consists of three different channels, each containing luminosity information for a primary color (Red, Green and Blue). Since there are 256 luminosity levels possible per channel for a 8bpc file, there are 256 possible variations of each of the three colors to mix together providing for a fairly large number of colors.

8bpc Jpeg: 224 =
16.7 Million Colors

Color is calculated out in the same fashion luminosity is. The number of possible luminosity values are multiplied by themselves for the number of channels there are. An 8bpc file with three channels is found by multiplying 256*256*256 which equals 16,777,216 possible colors (2563 = 16,777,216). An easier way to calculate that would be to multiply the bit-depth for a single channel by three and use that as the power of two. In other words a bit-depth of eight times three channels equals 24 total bits. The math would be 224 = 16,777,216.

File Bit-Depth
File Type Bits/Channel Total Bit-Depth Luminosity Levels Total Possible Colors
Jpeg 8 24 256 16,777,216
12bpc Raw 12 36 4,096 68,719,476,736
14bpc Raw 14 42 16,384 4,398,046,511,104
Tiff 16 48 65,536 281,474,976,710,656

As you can see from this table, the benefits of shooting RAW and developing to 16bpc Tiff or PSD files are substantial if you plan on editing an image. A 14bpc raw file can provide a photographer with 4.3 Trillion (!) possible colors to work with.

Think of the adjustment accuracy high bit-depth provides in terms of trying to measure something with a ruler divided into inches vs. a ruler divided into 1/32nd of an inch. The more measurement markers on the ruler, the more accurate the measurement will be. This same principle applies to images and bit-depth. High bit-depth, provides for more precise adjustments.

Note: Even though 12bpc or 14bpc RAW files are converted into 16bpc Tiff or PSD files, you do not get the full benefits of having a true 16-bits/channel of data to work with. Data cannot be created from nothing and so you are actual editing a 12bpc or 14bpc file that is simply wrapped within a 16bpc file. Despite this limitation, the amount of data available is still considerable.

Linear Design

The bit-depth of an image becomes even more important once one take into consideration the linear nature in which a camera sensor captures light. A 12bpc sensor dœsn’t capture a full 4,069 luminosity levels for each stop of light. Instead the luminosity steps are divided up across the sensor’s full dynamic range (DR). The luminosity levels reduce in halves as the light intensity captured reduces.

To be more specific, a sensor with 5 Stops of dynamic range recording 12bpc raw files will only have 2,048 luminosity levels in the brightest stop of DR with each stop below that reducing the number of luminosity levels in half.

Linear Spread of Data
File Type Luminosity Levels 1st Stop
Brightest Tones
2nd Stop 3rd Stop 4th Stop 5th Stop
Darkest Tones
Raw: 12bpc 4,096 2048 1024 512 256 128
Jpeg: 8bpc 256 69 50 37 27 20

The numbers for the Jpeg are after a Gamma 2.2 encoding has been applied.
The additional luminosity levels not present in this table are for the stops beyond the 5 stops in this example.
Source: Expose (to the) Right | Understanding RAW

As this table shows, there is a significant benefit to working with high-bit images. If you plan on doing any significant form of editing to an image, Jpeg shooting should be avoided as much as possible.

Is it 8-bits or 24-bits?

One thing that tends to confuse people when talking about bit-depth is when someone starts talking about 24-bit and 48-bit files. They actually are talking about the same thing as 8bpc and 16bpc (respectively) files, but they are just adding the three separate channels together to make a total bit-depth for the file.

8-bits * 3 channels =
24-bits Total

An 8bpc JPEG for example can also technically be called a 24–bit JPEG (3*8) as 24 refers to the total bit-depth of the file. It would be more accurate and lead to less confusion to state "x-bits per channel" and/or "x-bits total" when discussing bit-depth and that is why I do so.

Return to Top ^