Learn / Compression

What is chroma subsampling?

Why JPEGs can throw away most of your image's color data and you'd barely notice — and the one case where it actually matters.

Most image compression assumes something specific about how human vision works: you notice changes in brightness far more readily than changes in color, at the same spatial resolution. Chroma subsampling is the compression technique built directly on top of that fact — deliberately storing color information at lower resolution than brightness information, because most viewers won't perceive the difference.

Splitting an image into luma and chroma

Before subsampling can happen, an image gets converted from RGB into a luma/chroma color model (commonly called YCbCr) — one channel for brightness (Y, or luma) and two channels for color (Cb and Cr, or chroma). This isn't a lossy step by itself; it's just a different, equivalent way of representing the same colors. But once color lives in its own separate channels, those channels become a target you can compress independently of brightness.

The actual ratios

Subsampling ratios describe how much color resolution survives relative to brightness resolution, over a block of pixels:

  • 4:4:4 — no subsampling. Every pixel keeps full-resolution color data.
  • 4:2:2 — color is sampled at half the horizontal resolution of brightness, full vertical resolution.
  • 4:2:0 — color is sampled at half resolution in both directions, meaning a 2×2 block of pixels shares just one color sample between all four. This is the most common default for photographic JPEG and video, because it saves the most data while usually remaining invisible.
4:2:0 quietly throws away 75% of the raw color data in an image and, for ordinary photographs, this is almost never something you'd notice without pixel-peeping — that's exactly the bet the human-vision assumption is making, and for photos it usually pays off.

Where the bet fails

Subsampling shows its cost specifically where color changes sharply but brightness doesn't — thin colored text on a flat background, fine line art, saturated color edges with no matching luminance edge to anchor them. In those cases, 4:2:0 can produce visibly blurred or bled color boundaries, because the color information genuinely didn't survive at the resolution the detail needed. This is part of why screenshots and graphics are usually better served by PNG (no subsampling, no chroma loss at all) than by JPEG.

Why this doesn't touch HDR gain maps

A gain map is stored as a single grayscale channel — it only ever encodes "how much brighter should this pixel get," with no color information at all. Subsampling is a color-channel technique, so it simply doesn't apply to the gain map itself; only the primary color image underneath it is subject to it. That's one more reason the two-image gain-map approach keeps the boost signal clean regardless of how aggressively the primary gets compressed.

Questions people actually ask

Does chroma subsampling affect HDR gain maps?
No — a gain map is a single-channel grayscale luminance mask, not a color image, so there's no chroma channel to subsample in the first place. Subsampling only applies to the color (primary) image; the boost data itself is unaffected by it either way.
Why don't PNG or lossless WebP subsample chroma?
Because subsampling is inherently a lossy operation — it discards real color resolution and can't be reversed. Lossless formats are defined by perfect reconstruction, so they keep every channel at full resolution by design; subsampling would break that guarantee.
When does subsampling actually become visible?
Almost always at sharp color transitions with no matching brightness change — thin colored text or fine graphics on a flat background are the classic failure case, since that's exactly where color detail (not brightness detail) is doing all the work. Ordinary photos rarely show it, which is why it's such a common default.