Skip to main content
Known Participant
December 9, 2008
Question

JPEG and color management

  • December 9, 2008
  • 62 replies
  • 12701 views
Hi. Is it impossible to get 100% identical colors (if we leave aside the jpeg compression artefacts) when saving a .jpeg file with Photoshop using the highest quality setting (12) ?
    This topic has been closed for replies.

    62 replies

    Known Participant
    December 10, 2008
    Thanks a lot for your tests Lou.

    > I also dragged the JPG on top of the original (holding the shift key to guarantee perfect alignment), set the top layer to Difference, and got a solid black image. No differences at all.

    No, this is wrong. There are differences. If there were no differences, the JPEG compression was lossless, which is certainly impossible (at least for the image you used). You can easily verify that. Carry out the steps described in post#13, starting at step7 (as in your example you have already done steps 1-6 from what I understand).

    In a nutshell: Just select the magic wand with tolerance 0, anti alias:no, contiguous: no, sample all layers: yes
    and click anywhere in the image. You will see JPEG compression patterns. Your selection will not cover the whole image, as it is not entirely black.

    But you are certainly right when saying the differences are negligible. And what's important, is that the large areas keep its color.
    Known Participant
    December 10, 2008
    Mark,

    To correct my previous post, there were some visible artifacts along the edges of my 21 step grayscale patches, noticeable at jpg quality 6, but I had to increase magnification above 100% to see it. At very high magnifications it can be seen fairly easily.

    Lou
    Known Participant
    December 10, 2008
    Mark,

    I'm using PSCS2. I just created a 200 ppi 21 step grayscale in sRGB color space (black to white gradient, followed by 21 step posterization). I duplicated the image, leaving the original untouched. Then I saved the duplicate file as a JPG, quality 10. Just to be certain, I closed the JPG file and reopened it, so I was working with previously saved, previously compressed data. The sRGB tag was saved with the file.

    I compared the two files using the sampler tool. I tried both 3x3 and point sampler. The files are the same. I don't get any skewing of data or changes in color in any grayscale patch. They measure and look the same.

    I also dragged the JPG on top of the original (holding the shift key to guarantee perfect alignment), set the top layer to Difference, and got a solid black image. No differences at all. JPG seems to work fine for its intended purpose. No color shift and color management works as intended.

    I then RE-saved the jpg file a second time (opening and resaving jpgs is usually a no-no) but with a quality 6 setting, then closed and reopened it. Comparison showed zero difference in any of the 21 patches, even along the edges. Works fine. BTW, both were saved as "baseline standard" jpgs.

    I agree, for satisfying intellectual curiosity, it's a great exercise, and worth doing. Nothing wrong with digging in and learning. I do it all the time and I'm glad I did the above. Now I can relax and get on with processing high quality TIFs and PSDs, and compressing them for web and email using jpg.

    Lou
    Known Participant
    December 10, 2008
    Thanks for your comments Peter Figen. I don't have a link handy right now, but I can post it here the next time one crosses my way.

    Peter, reading your post, I'd say the bottom line of this thread is:

    * When converting an image to JPEG there can be small color shifts even on very large areas, as demonstrated with the color patches turning white in post #2.

    * Color management still makes sense, even for JPEG files, because it assures a relatively high color fidelity for quality-12-jpegs (although with slight color shifts compared to tiff)

    * If a user would be...
    ... okay to accept the JPEG artefacts, because at the print resolution and with quality-12-jpegs the human eye can't see them anyway
    ... but not okay to accept (even slight) color shifts on large areas
    ==> this user would have to stick to lossless formats, for example tiff.

    Right ?
    Participating Frequently
    December 10, 2008
    Just out of curiosity, what profile targets are being supplied as jpegs? Every one I've ever seen has been a zip compressed tiff, which, because of the nature of the color patches, compresses as much as most jpegs. There would no need for patch target files to be anything else. Even profile targets uprezzed for vendors who think they need 300 dpi for such things are still only a meg or two.

    The stock imaging world seems to get along just fine on number 8 quality jpegs. That's what the vast majority of stock images are and you see them everywhere you look, in every newspaper and magazine you look at, both in editorial and advertising images. If there was any real problem with them aside from a jpeg artifact once in a while, you'd hear about it and maybe even see it. Small things you see while pixel peeping almost never are visible in print.
    Known Participant
    December 10, 2008
    I see. Thanks for pointing that out Ramón.
    Ramón G Castañeda
    Inspiring
    December 10, 2008
    Calibration targets in JPEG format are practically always compressed from the already existing TIFF or PSD original file.

    Their existence is a useful clue to the low quality and low standards of whoever is offering or using them. In that sense, their existence does fulfill a useful purpose.

    Another common use for such JPEG target files is to allow for a quick and dirty eyeball verification of the approximate state of calibration on things like laptop screens and inexpensive secondary palette monitors. JPEG deficiencies such as the one Mark has exposed would never be a factor in such rough and tumble eyeball exercises.

    The JPEG format in those instances also allows for slow dialup connections.
    Known Participant
    December 10, 2008
    > Take a series of perfectly neutral gray blocks of color (r=g=b), convert to high quality jpg (10-12 level) and see what happens. If you get some serious differences, I'm interested.

    I have no example handy, but if a pixel like (140, 107, 130) can suffer from JPEG compression, nothing suggests a gray pixel like (140, 140, 140) would somehow be exempted from JPEG compression.

    > What exactly is the point of this exercise?

    No offense, but you already asked that question. Is it illegitimate for me to simply wish to understand ?

    > People will continue using compression algorithms to make images sized for web and email use.

    Yes, but calibration targets have to be 100% accurate. So if it's really true, that colors in JPEG files cannot be accurate even at the highest quality level, than I ask myself why calibration targets exist in JPEG format.
    Known Participant
    December 10, 2008
    Mark,

    I hear what you are saying, but I doubt most people would notice that small a difference. I guess if you were doing an A:B comparison, you might see some difference, but even that is questionable.

    Take a series of perfectly neutral gray blocks of color (r=g=b), convert to high quality jpg (10-12 level) and see what happens. If you get some serious differences, I'm interested. Otherwise, it seems pointless for daily usage. People will continue using compression algorithms to make images sized for web and email use. Maybe one format is slightly better than the other, but I have heard no complaints regarding jpg format, except for the artifacts cause by too high a compression level. JPG is best used for continuous tone images (photographs). There are other formats better suited to illustrations and graphics that have large blocks of solid colors.

    For the best print, press, lightjet and high end work, TIF and PSD are the way to go.

    What exactly is the point of this exercise?

    Lou
    Known Participant
    December 9, 2008
    That's why I still wonder why there are calibration targets in JPEG format, if JPEG colors cannot be trusted even for the highest quality JPEGs ???