Glance at the summary firstThe summary from the end of the lesson, as a road map before you start reading.
Bit depth counts how many tonal levels a color channel carries: eight bits means 256 levels and about 16.7 million colors across three channels, fourteen bits 16,384 levels per channel. RAW is big because it stores without throwing away any information and with at most lossless compression, while JPEG is small because it drops to eight bits and compresses lossily; these extra levels give resistance to banding and grain in editing. But because the sensor records light linearly, the darkest tones have the fewest levels; on every skin, the cleanest result comes not from leaving the face in the dark and opening it later, but from exposing with enough light and without blowing out at the time of shooting.
Learning goal
You will be able to explain how a photo file stores its tonal information as numbers, and show with calculation why this information matters so much in editing. You will calculate that an eight-bit JPEG's three color channels give about 16.7 million colors, while a fourteen-bit RAW stores far more tonal levels per channel; you will explain why a RAW file is big and a JPEG small through the difference between lossless and lossy compression; you will recognize banding in smooth transitions like a sky during hard editing; and you will know why, because the sensor records light linearly, the darkest tones have the fewest levels, and the limit of trusting that you can leave a dark face in the dark and open it up later.
The question
You are waiting for the sunset on a hill. The sky starts orange at the horizon and turns navy toward the top; in front of you your friend, dark-skinned and curly-haired, sits with their back to the sun, and their face stays in shadow against the light. The camera records every frame as both RAW and JPEG. When you get home and copy the files to the computer, something catches your attention: the JPEG of the same frame takes a few megabytes, while the RAW is several times that.
Why are RAW files so big? The same frame, the same moment, the same number of pixels; where does that extra space go? In this lesson we will talk about what is inside that space, how a photograph's tones turn into numbers, and why these numbers make a difference at the editing desk.
Context
In Lesson 3.8 we likened JPEG to a ready meal and RAW to ingredients, and saw the difference between 256 and 16,384 tonal levels per channel. That lesson was a lesson about choice: it told which format to choose when. This module, on the other hand, looks at what comes after shooting, at files, cards, folders and backups, and it starts from inside the file.
Knowing what is inside a file also changes how you store it. The decisions about whether to shoot RAW, how many frames will fit on your card, which setting to choose while editing and what to leave behind when exporting all rest on a few simple numbers you will see in this lesson.
Simple explanation
What does bit depth count?
A bit is the smallest unit of information, one that can take only two values: zero or one. As the number of bits grows, the possible values double: eight bits give two to the power of eight, that is, 256 different values. In photography each of these values is a tonal level: the steps a color channel can take from darkest to lightest. In a color image there are three color channels, red, green and blue, and every pixel is a combination of these three channels.
In an eight-bit JPEG each channel has 256 levels; the combination of the three channels comes to 256 times 256 times 256, that is, 16,777,216, about 16.7 million different colors. In a twelve-bit RAW each channel has 4096 levels, and in a fourteen-bit RAW 16,384. When a RAW is opened into three channels in an editing program, the combination of fourteen-bit channels is measured in trillions. Because most screens show only eight bits or ten bits anyway, these extra levels don't appear directly on the screen; but they come into play the moment you start changing the photo.
Why is RAW big and JPEG small?
Think of a twenty-four-megapixel sensor. Each pixel on the sensor measures only a single color because of the small color filter on top of it, and RAW stores this single value with fourteen bits; the other two channels are calculated later in the editing program. Twenty-four million times fourteen bits comes to about 42 megabytes uncompressed. Many cameras shrink this data with lossless compression: lossless compression is a way of packing in which every value comes back exactly when you open the file. The gain is limited, because no information is thrown away.
JPEG does the opposite. The camera processes the RAW data, reduces each channel to eight bits, and then applies lossy compression: it throws away fine details and color differences the eye won't easily notice. The result, though it varies with the scene, is usually a file several times smaller than the RAW. That is, what makes RAW big is that nothing has been thrown away; those extra megabytes are the tonal levels JPEG threw in the trash.
Why do levels matter in editing?
When you edit a photo, you stretch the tones: you brighten a dark area, or darken the sky and raise the contrast. In an eight-bit file, a smooth transition in the sky may be made of only a few dozen levels; when you stretch these levels the gaps between them open up and the transition splits into separate bands. This is called banding, and it shows most in the sky, on walls, and on surfaces with smooth transitions like skin. The extra levels in RAW hold up to the same stretching for much longer.
But RAW has a limit too, and this limit is in the darkest tones. The sensor records light linearly: when light doubles, the recorded value doubles too. The result is this: in a fourteen-bit file, the brightest stop takes half of the 16,384 levels, 8192 of them, the stop below takes half of that, and the one below that half again. When you count down from the top to the seventh stop, only 128 levels are left; the darkest tones have both few levels and the sensor's own grain. Leaving a dark-skinned face darker than needed and thinking "RAW will save it anyway" is putting the face exactly where there are the fewest levels. On a light-skinned face, on the other hand, the danger is the opposite: once the brightest stop overflows, no bit depth can bring detail back into a blown area.
Visual evidence
You open the frame from the hill in the editing program. First the JPEG: when you darken the sky and strengthen the orange, the transition stretching up from the horizon splits into bands step by step; when you brighten your friend's face by three stops, coarse grain appears on their cheeks and color blotches on their neck.
Then the RAW: with the same settings the sky stays smooth, the face brightens and the warm brown of their skin comes back. But when you enlarge it, there is fine grain in the darkest curls of their hair and under their chin; even RAW can't carry a three-stop opening fully clean. The next evening you go back to the same hill, and this time you give your friend's face one more stop of exposure; you check on the histogram that the sky doesn't press against the right edge. While editing, opening the face by just one stop is enough; their hair, eyelashes and the texture of their skin are clean. The sky too stretches from orange to navy without blowing out. The difference wasn't in the file format, but in placing the tonal information in the richest region of the file.
Common mistakes
Common mistakeThinking RAW is insurance that saves every mistake.
In the darkest tones there are few levels, and in a blown area there are none. The fix: in RAW too, build the exposure so that enough light falls on the face and bright areas don't blow out.
Common mistakeHard stretching smooth transitions like a sky or skin in an eight-bit file.
The transition splits into bands. The fix: shoot RAW for frames that will need hard editing, and keep the file at a high bit depth while editing.
Common mistakeKeeping the small JPEG exported for sharing as the only copy.
The levels thrown away don't come back. The fix: keep the original RAW in the archive, and use the JPEG only as a sharing copy.
Summary
Bit depth counts how many tonal levels a color channel carries: eight bits means 256 levels and about 16.7 million colors across three channels, fourteen bits 16,384 levels per channel. RAW is big because it stores without throwing away any information and with at most lossless compression, while JPEG is small because it drops to eight bits and compresses lossily; these extra levels give resistance to banding and grain in editing. But because the sensor records light linearly, the darkest tones have the fewest levels; on every skin, the cleanest result comes not from leaving the face in the dark and opening it later, but from exposing with enough light and without blowing out at the time of shooting.
Mini assignment
In this assignment you will edit two formats of the same frame and see the difference in tonal levels with your own eye.
- Set your camera to record RAW and JPEG together, and photograph a smoothly graded sky or a plain wall.
- Open both files in an editing program and raise contrast and saturation hard by the same amount; enlarge to compare whether there are bands in the transition.
- Photograph someone in the dark so that their face stays in shadow; then shoot the same frame again giving the face one more stop of exposure, and edit the two frames to bring the face to the same brightness.
- Compare the file sizes and calculate how many RAWs and how many JPEGs will fit on your card.
Check yourself
- In which file did banding appear during hard editing?
- Did the frame where you gave the face more exposure come out cleaner than the frame you opened up later?
- Were the color and texture of the person's skin kept after editing too, regardless of skin tone?
Glossary
| Term | Short definition |
|---|---|
| Tonal level | Each of the steps a color channel can take from darkest to lightest. |
| Color channel | Each of the red, green and blue components that make up a pixel. |
| Banding | A smooth tonal transition splitting into separate bands because of too few levels. |
| Lossless compression | Compression that throws away no information, in which every value comes back exactly when you open the file. |
| Linear capture | The sensor doubling the value it records when light doubles; the fewest levels are left for the darkest stops. |
Mini quiz
1. About how many different colors can the three color channels of an eight-bit JPEG give in total?
- A) 256
- B) About 16.7 million
- C) 4096
- D) 16,384
2. What is the main thing that makes a RAW file bigger than a JPEG?
- A) That it contains more pixels
- B) That colors are recorded more saturated
- C) That tonal information is stored without being thrown away, at a high bit depth and with at most lossless compression
- D) That no preview is added to the file
3. What is it called when a smooth sky transition splits into bands during editing?
- A) Banding
- B) Sharpening
- C) White balance
- D) Lossless compression
4. You are shooting a dark-skinned face against the light in RAW. Which approach gives the cleanest result?
- A) Leave the face dark and open it three stops later
- B) Give the face enough exposure at the time of shooting and check on the histogram that the bright sky doesn't blow out
- C) Shoot only JPEG
- D) Raise the contrast to the maximum
Answers
- B — 256 times 256 times 256 comes to about 16.7 million.
- C — RAW throws away no information; JPEG drops to eight bits and compresses lossily.
- A — A transition stretched with too few levels splits into separate bands.
- B — In linear capture the darkest tones have the fewest levels; placing the face in a richer region at the time of shooting gives a cleaner result.
Summary card
- Bit depth: eight bits, 256 levels; about 16.7 million colors across three channels.
- Twelve bits 4096, fourteen bits 16,384 levels.
- RAW is big: nothing is thrown away; JPEG is small: eight bits and lossy compression.
- Few levels + hard editing = banding.
- Linear capture: the fewest levels in the darkest tones; expose the face with enough light at the time of shooting.
Bridge to the next lesson
All the RAW files from the two evenings on the hill sit on a single card, and each takes several times the space of a JPEG. The card fills up fast, the camera pauses for a moment while shooting in bursts, and all that tonal information is kept inside a small piece of plastic smaller than your palm. What happens if one day this small piece won't open? The next lesson talks about memory cards, speed classes, and why cards fail.