Metadata Editor

EXIF EditorEXIF ReaderRemove MetadataGuidesGlossaryAbout

Chroma subsampling: what YCbCrSubSampling tells you

At a glance

ExifTool tag namesFile:YCbCrSubSampling, EXIF:YCbCrSubSampling, EXIF:YCbCrPositioning
Tag ID / location0x0212 (YCbCrSubSampling), 0x0213 (YCbCrPositioning)
CategoryImage & file structure
Example valueYCbCr4:2:0 (2 2)
On metadata-editor.comNot shown in our reader or editor. The metadata remover strips it with everything else.

A JPEG stores one brightness channel (Y) and two color-difference channels (Cb and Cr). Because eyes resolve color detail less sharply than brightness, encoders usually store the color channels at reduced resolution. That is chroma subsampling. 4:2:0 halves color resolution in both directions, 4:2:2 halves it horizontally only, and 4:4:4 keeps it whole.

ExifTool reads the sampling factors from the SOF marker of the JPEG and reports them in the File group, with the horizontal and vertical factors in parentheses:

$ exiftool -G1 -s -YCbCrSubSampling q90_420.jpg q90_444.jpg
======== q90_420.jpg
[File]          YCbCrSubSampling                : YCbCr4:2:0 (2 2)
======== q90_444.jpg
[File]          YCbCrSubSampling                : YCbCr4:4:4 (1 1)
    2 image files read

With -n you get just 2 2 or 1 1; 4:2:2 appears as (2 1). The EXIF tag of the same name (0x0212, EXIF:YCbCrSubSampling) belongs to YCbCr data in TIFF files. In a JPEG, the SOF marker is the authority.

Does it matter?

Rarely for photos viewed at normal size. It shows on hard colored edges: red text on blue, screenshots, logos, line art. Those two files are the same 1200x800 image saved by Pillow at quality 90: 82,070 bytes at its default 4:2:0, 102,167 bytes with subsampling=0. That is about 25% more for full color resolution.

Defaults vary by tool. ImageMagick 6.9 converting a PNG wrote 4:2:0 below quality 90 and 4:4:4 from 90 up, but re-saving a 4:2:0 JPEG at quality 95 kept 4:2:0. Set it explicitly when it matters:

convert logo.png -sampling-factor 4:4:4 -quality 90 logo.jpg

Platforms that re-encode uploads pick their own settings, so the original choice may not survive publication, much like the metadata itself (see what social media does to metadata).

YCbCrPositioning

Tag 0x0213 sits in IFD0 next to it and says where the subsampled color samples sit relative to brightness samples: 1 means Centered, 2 Co-sited. Many camera files say Co-sited. ExifTool writes 1 as a default whenever it creates a fresh IFD0, so a file that had no EXIF before an ExifTool edit comes out saying Centered.

Neither field is shown by our reader or editor, and neither is something you edit: subsampling is decided at encode time. Related structure fields: compression and JFIF version.

Related fields

Other Metadata Tools