strange subtle JPEG color bug?

Here everybody can post his problems with PhotoLine
maho
Mitglied
Posts: 59
Joined: Sun 18 May 2003 02:02

strange subtle JPEG color bug?

Post by maho »

Hey guys,

I've encountered a strange problem that I can't seem to resolve. Here's how to reproduce it:

1) File -> New Image

2) Foreground Color -> #CC0000 = (204,0,0)

3) Flood Fill the image

4) File -> Save As -> Save As Type = JPEG

5) Close the file and reopen it.

The color in the file is now (204,0,1).

This problem doesn't seem to occur if you save the image as a .PNG (a lossless format). Is this a limit of the JPEG specification (can't reproduce a color exactly)?? Or is this a PhotoLine problem? This occurs even if you set JPEG Quality = 100%.

It's a problem for me because for another reason I don't understand, the Chrome browser picks up on the subtle color difference on the image and makes it look ugly next to a true #CC0000 webpage background.

I running PL 21.50 on Windows 10.
User avatar
der_fotograf
Mitglied
Posts: 403
Joined: Mon 05 Dec 2016 08:33
Location: Ottersberg

Re: strange subtle JPEG color bug?

Post by der_fotograf »

Try this:

New Image
Split image vertically in half
Fill with 204,0,0 in the left part
Fill with 204,0,1 at the right part
Save as *.png
Save as *.jpg
Open both files with Chrome
Color Management activated in Chrome?
Any difference in the colors in the *.png? In the *.jpg?

Using Firefox I can't see any color variation on a calibrated display.
BTW, I started with a new image @ 16 bit RGB...
When I re-open the *.png or the *.jpg the color reading with the picker is in both files 204,0,0 on both left sides.

So maybe the bug is in the Chrome rendering engine?
--------------------------------------------
Nur wenige wissen, wie viel man wissen muss, um zu wissen, wie wenig man weiss.
— Werner Heisenberg
bkh
Betatester
Posts: 3658
Joined: Thu 26 Nov 2009 22:59

Re: strange subtle JPEG color bug?

Post by bkh »

maho wrote: Tue 27 Oct 2020 02:47 Hey guys,

I've encountered a strange problem that I can't seem to resolve. Here's how to reproduce it:

1) File -> New Image

2) Foreground Color -> #CC0000 = (204,0,0)

3) Flood Fill the image

4) File -> Save As -> Save As Type = JPEG

5) Close the file and reopen it.

The color in the file is now (204,0,1).
This is completely normal. In addition to compression, JPEG converts RGB to YCrCb and back, which results in fewer than 256 colour steps in pure red and even fewer steps in pure blue. JPEG (at least in the 8 bit variant) is not suitable for precise colour reproduction.

BUT: the difference between (204,0,0) and (204,0,1) should be nearly invisible.

Cheers

Burkhard