JPEG Chroma Subsampling explained

It seems that not many people have heard about chroma subsampling, and even fewer understand it. The issue is not made simpler by the fact that various notations are used. I found this PDF and just had to share it, it explains everything very well and in detail:
http://dougkerr.net/Pumpkin/articles/Subsampling.pdf

If that’s still too geeky for you, then:

To see how this works for yourself, open this PNG image in GIMP, export the image as JPEG, and in the “Export image as JPEG” window which pops up set quality to 100% (because we want to study chroma subsampling, not other aspects of JPEG compression), select “Show preview in image window”, and move the windows out of the way so that you can see the preview. Zoom to 1600% or more and study what happens when you cycle through the “Subsampling” settings in the combobox in the “Export image as JPEG” window.

Notice how chroma subsampling ruins pixel-fine color detail, while the grayscale circles remain unaffected. However if you manipulate the JPEG compression slider down from 100, everything will be affected, both chroma components and the luma component.
When used in real photographs, this sacrifice of detail for smaller file size (and less bandwidth) is usually acceptable, because real photographs usually do not have pixel-fine color detail worth keeping, and people viewing your images might not be viewing them at a 1:1 pixel ratio anyway. This may be a problem though if you decide to sign your name on your photos in a very fine, colorful font which has pixel-wide lines.

2 Likes

To “feel” the chroma subsampling with your bare hands (and Gimp):

  • take a colorful picture
  • duplicate twice (bottom is kept untouched for comparisons)
  • On middle layer : Color>Desaturate (lightness)
  • On top layer:
    • Layer>Scale layer 25%, no interpolation (this is twice as strong as what JPEG does)
    • Layer>Scale layer 400%, no interpolation
    • Layer ends up very pixellaled
    • Set top layer to “Color” mode
  • Image gets sharp again
  • You can merge the top two layers, and toggle the visibility of the result to compare with the original image.

CSS is what gets you the most bang for the buck when you want to reduce the size of a JPEG. It reduces the size of two chroma component to 25% of the original, so before compression you went from 1+1+1=3 to 1+.25+.25=1.5.

1 Like

Of interest: there’s no use in using 4:4:4 for images at native resolution of your sensor, since even green is subsampled.

So watch out though when resizing to small dimensions. I resized an image to 1050 pixels on the long side, and with subsampling it lost all of its color since it was largely green and white adjacent to each other.

Watch out for color transitions with little luminance difference when deciding whether or not subsampling will be worth the size savings.

Yes, when downsizing it does start to play a role again, especially when your photo has small saturated objects, such as Christmas or LED lights, buttons, photographed text, etc.

I updated the 8_bit_chroma_subsampling.png image in the first post.