2
\$\begingroup\$

Suppose I am creating a large image files out of smaller ones. The original images (jpeg) already have chroma-subsampling of 4:2:0. If one were to put them together and save again as a jpeg, would saving it with chroma-subsampling of 4:2:0 (as opposed to 4:4:4) have a "double" effect, similar to re-compressing an image?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

When not using chroma subsampling, JPEG generational losses are pretty much limited to rounding error as long as the same compression settings are used. (Majority of compression losses occur during the first compression.)

Here is what happens when an image is recompressed until convergence at q=90 without chroma subsampling (original, 1, n, difference):

attempt to replicate ths-montage

However, when chroma subsampling is enabled, additional color information is thrown away, which probably also affects quantization, so that losses are much more visible when steady state is reached. Here is what happens with chroma subsampling enabled.

ths-color-shift

If you're concerned about single-digit resaves, the effect isn't so pronounced.

See also

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for your question in the other thread. It's useful info I've always thought about coming from an audio background.So to summarize, quantization does not seem to take place using the same JPEG re-encoding settings (only convert colorspace/rounding error), but with chroma subsampling enabled, quantization does occur? Is there some science behind that or just known evidence? \$\endgroup\$
    – Elie
    Nov 10, 2019 at 6:40
  • 2
    \$\begingroup\$ Quantization is a major part of the compression algorithm, but recompression using the same quantization tables gives the same results (within rounding error) as previous compressions. However, chroma subsampling throws away additional color information, and probably also affects quantization, so that losses are much more visible when steady state is reached. In both cases, with images I've tried, a steady state is reached after enough iterations (output n+1 is identical to input n). \$\endgroup\$
    – xiota
    Nov 10, 2019 at 7:04
  • \$\begingroup\$ Thanks! I was more worried about what it converges to rather than whether it converges, but you answered both! \$\endgroup\$
    – Elie
    Nov 10, 2019 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.