<p>One issue is "chroma subsampling". The image data of a JPEG is not stored in packed RGB but YCbCr as 3 seperate planes. The Cr and Cb channels contain colour information and the Y channel is luminance. In JPEG it is common to use a lower resolution Cr/Cb channel, typically at half the resolution of the Y channel, this is know as 422 Chroma subsampling (another variant is 420 where only the horizontal resolution is halved).</p>

<p>What you can do is select 444 Chroma subsampling, if possible, which will mean no down-scaling of the Cr/Cb channels. </p>

<p>In Gimp you can select the subsampling type in "advanced options" when exporting JPEG files. This is independent of the quality setting slider.</p>

<p>There is a great image from wikipedia which compares the various subsampling modes side-by-side with a visualisation of one of the chroma channels, you can see the red decal in the centre is most affected by downscaling as that channel has high contrast edges</p>

<p><a href="https://i.sstatic.net/yswEk.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yswEk.jpg" alt="Chroma example - from Wikipedia"></a></p>

<p><a href="https://en.wikipedia.org/wiki/Chroma_subsampling" rel="nofollow noreferrer">Wikipedia article for Chroma Subsampling</a></p>

CC BY-SA 4.0
2020-05-27T04:51:32.297Z
2020-05-27T05:41:49.970Z
2020-05-27T05:41:49.970Z
PaulHK
<p>First, <a href="https://graphicdesign.stackexchange.com/questions/21204/why-do-jpeg-files-blur-red-more-than-other-colors">here is a link</a> to a related topic of the graphic design stack exchange site.</p>
<p>Even though the discussion was more focussed around effects on an image with large homogeneous color areas, here are some quotes I think that are relevant for your case:</p>
<blockquote>
<p>JPEGs are best suited for <strong>continuous tone</strong> images like photographs or natural artwork; <strong>not so well on sharp-edged</strong> or flat-color art like lettering, simple cartoons, or line drawings</p>
<p>JPEG is actually just a compression algorithm, not a file format. JPEG is designed to exploit certain properties of our eyes, namely, <strong>that we are more sensitive to slow changes of brightness and color than we are to rapid changes</strong> over a short distance</p>
<p>Compression artifacts from <strong>hard edges</strong> are proportional to the contrast of the edges</p>
<p>This loss of data is most often noticeable where colors transition from one field of solid color to another field of solid color. <strong>There's no direct issue with any particular color specifically.</strong> It is more about large areas of similar colors.</p>
</blockquote>
<p>Also <a href="https://en.wikipedia.org/wiki/JPEG" rel="nofollow noreferrer">Wikipedia says</a> in the articles &quot;JPEG compression&quot; section:</p>
<blockquote>
<p>A perceptual model based loosely on the human psychovisual system discards high-frequency information, i.e. <strong>sharp transitions in intensity</strong>, and color hue.</p>
</blockquote>
<p>Building upon these quotes I conclude, that the compression artifacts do not depend on the color, as you already read in other sources. However, JPEGs are obviously not suited for high contrasts and sharp edges.</p>
<p>Now when I look at your pictures, the rose blossoms and the red cake have complex/rough surfaces that cast a lot of shadows. So they have hard edges in their intensity/brightness and you can expect some artifacts there. Most of the other parts of those images don't have such a high density of sharp edges, this why you might think that red is particularly affected by the compression. The fact that the high contrast and brightness of the red attracts your eye's attention increases this impression. But if you look at other sharp edges, for example, the chocolate on top of the second cake or the yellow paper that is wrapped around the roses in the first picture, you can also see those compression artifacts. The lower density of sharp edges and the duller colors just don't make them so obvious.</p>
<blockquote>
<p>Can we do anything while photoshoot or post editing to fix these issues?</p>
</blockquote>
<p>If you have the option, the best thing would be to use an image format with loss-free compression -&gt; PNG.</p>
<p>If this is not an option, the only thing I can come up with is avoiding high contrasts in your motives. Also, maybe you can use some photoshop filters to soften the hard edges a little bit before you compress the image. This will also reduce the image quality, but maybe it will give more acceptable results after compression (no guarantees here - might be worse).</p>

CC BY-SA 4.0
2020-05-26T09:43:23.287Z
2020-05-26T09:43:23.287Z
2020-06-18T08:32:12.800Z
wychmaster
<p>I have an e-commerce website dealing with flowers and cakes. We get our photoshoot done inhouse and also the post-shoot editing of images. While we upload them on the website all images go through the same image compression algorithm. But if we compare all images, then we find product images having red color in them loosing out most of its details only in the areas with red color. </p>

<p>I have attached an image below for your reference, here the left-hand side image is at 80% quality and the right side has no compression in place. If you compare all these images, then you will see that the red-colored areas of the images lose the most details, at least visually. </p>

<p>I have read about jpeg compression but it says that color doesn't make any difference, but it is not the case here. </p>

<p>Can we do anything during photoshoot or post-editing to fix these issues?</p>

<p><a href="https://i.sstatic.net/zsb3a.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zsb3a.jpg" alt="enter image description here"></a></p>

<compression>
Why does the red color channel lose the most details during jpeg compression
Abhinav
# Why does the red color channel lose the most details during jpeg compression

(Asked by: username_0 on 2020-05-26)

I have an e-commerce website dealing with flowers and cakes. We get our photoshoot done inhouse and also the post-shoot editing of images. While we upload them on the website all images go through the same image compression algorithm. But if we compare all images, then we find product images having red color in them loosing out most of its details only in the areas with red color.

I have attached an image below for your reference, here the left-hand side image is at 80% quality and the right side has no compression in place. If you compare all these images, then you will see that the red-colored areas of the images lose the most details, at least visually.

I have read about jpeg compression but it says that color doesn't make any difference, but it is not the case here.

Can we do anything during photoshoot or post-editing to fix these issues?

[![enter image description here](https://i.sstatic.net/zsb3a.jpg)](https://i.sstatic.net/zsb3a.jpg)

**Tags:** compression


---

## 2 answers

### Answer by username_1 on 2020-05-27. Score: 4

One issue is "chroma subsampling". The image data of a JPEG is not stored in packed RGB but YCbCr as 3 seperate planes. The Cr and Cb channels contain colour information and the Y channel is luminance. In JPEG it is common to use a lower resolution Cr/Cb channel, typically at half the resolution of the Y channel, this is know as 422 Chroma subsampling (another variant is 420 where only the horizontal resolution is halved).

What you can do is select 444 Chroma subsampling, if possible, which will mean no down-scaling of the Cr/Cb channels.

In Gimp you can select the subsampling type in "advanced options" when exporting JPEG files. This is independent of the quality setting slider.

There is a great image from wikipedia which compares the various subsampling modes side-by-side with a visualisation of one of the chroma channels, you can see the red decal in the centre is most affected by downscaling as that channel has high contrast edges

[![Chroma example - from Wikipedia](https://i.sstatic.net/yswEk.jpg)](https://i.sstatic.net/yswEk.jpg)

[Wikipedia article for Chroma Subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling)


---

### Answer by username_2 on 2020-05-26. Score: 1

First, [here is a link](https://graphicdesign.stackexchange.com/questions/21204/why-do-jpeg-files-blur-red-more-than-other-colors) to a related topic of the graphic design stack exchange site.

Even though the discussion was more focussed around effects on an image with large homogeneous color areas, here are some quotes I think that are relevant for your case:

> JPEGs are best suited for **continuous tone** images like photographs or natural artwork; **not so well on sharp-edged** or flat-color art like lettering, simple cartoons, or line drawings
>
> JPEG is actually just a compression algorithm, not a file format. JPEG is designed to exploit certain properties of our eyes, namely, **that we are more sensitive to slow changes of brightness and color than we are to rapid changes** over a short distance
>
> Compression artifacts from **hard edges** are proportional to the contrast of the edges
>
> This loss of data is most often noticeable where colors transition from one field of solid color to another field of solid color. **There's no direct issue with any particular color specifically.** It is more about large areas of similar colors.

Also [Wikipedia says](https://en.wikipedia.org/wiki/JPEG) in the articles "JPEG compression" section:

> A perceptual model based loosely on the human psychovisual system discards high-frequency information, i.e. **sharp transitions in intensity**, and color hue.

Building upon these quotes I conclude, that the compression artifacts do not depend on the color, as you already read in other sources. However, JPEGs are obviously not suited for high contrasts and sharp edges.

Now when I look at your pictures, the rose blossoms and the red cake have complex/rough surfaces that cast a lot of shadows. So they have hard edges in their intensity/brightness and you can expect some artifacts there. Most of the other parts of those images don't have such a high density of sharp edges, this why you might think that red is particularly affected by the compression. The fact that the high contrast and brightness of the red attracts your eye's attention increases this impression. But if you look at other sharp edges, for example, the chocolate on top of the second cake or the yellow paper that is wrapped around the roses in the first picture, you can also see those compression artifacts. The lower density of sharp edges and the duller colors just don't make them so obvious.

> Can we do anything while photoshoot or post editing to fix these issues?

If you have the option, the best thing would be to use an image format with loss-free compression -> PNG.

If this is not an option, the only thing I can come up with is avoiding high contrasts in your motives. Also, maybe you can use some photoshop filters to soften the hard edges a little bit before you compress the image. This will also reduce the image quality, but maybe it will give more acceptable results after compression (no guarantees here - might be worse).


---

