Color Determination

Started by tmcgill, October 12, 2015, 04:44:22 AM

Previous topic - Next topic

tmcgill

I'm sure this is a rookie question, as I only have a vague understanding of color management. But I've been working with some shots where the colors matter quite a bit to me, and I am getting results I don't know how to explain.

My camera is set to save jpg files with an sRGB profile. That's also what I see my images as having according to IMatch. Photoshop agrees, and my working space there is also sRGB. However, the two applications display my image noticeably differently. IMatch shows me a much more reddish picture. Photoshop seems to come really close to what the Windows photo viewer shows me, which is a duller version. There is one way I have discovered I can get Photoshop to match what IMatch is displaying: assign (not convert to) Adobe RGB. And that seems weird to me. If I have an sRGB image, and treating it as if it were Adobe RGB in Photoshop gives me the same displayed colors as IMatch does, does that mean IMatch is treating my image as if it were assigned an Adobe RGB color profile instead of sRGB even though the metadata seems to indicate sRGB? Or is there some other explanation? It's kind of frustrating when I happen on a really good image that I want to use for something, and then I can't be sure what colors are actually there.

As a further data point, Paint.NET displays it more like IMatch does, and so do Firefox and Internet Explorer. But of all of these, I would expect Photoshop (CS5) and IMatch to be the ones that handle my colors most accurately...and they don't match each other.

Oh, one more potentially important piece of all this: when I open a file in Photoshop, crop it (and do nothing else), and save a new version of it, the cropped version does appear the same in both Photoshop and IMatch...with the duller colors that were present in Photoshop.

Anybody able and willing to point me in the right direction? I can happily check and report the values of specific application settings or metadata, or upload samples if that would help.

Mario

IMatch is fully color manageed, using Windows built-in ICM.

Do your files have an embedded color profile (sRGB) or are they just marked as sRGB in the EXIF record?
I would need to see a sample file here to do any further tests.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand

I suggest that you post a JPG that displays these symptoms, but note that you must zip the file, or the forum software will strip out the metadata, which will render it useless.  Note also that there is a 2Mb limit. As an Out of Camera image would be best, you may need to temporarily adjust down your in-camera JPG settings to satisfy this limit.

Like Mario, I suspect that what is happening is that your camera is not embedding an ICC profile, it probably just sets the EXIF colour space tag.  This is what most cameras will do.  I don't think that Photoshop will pay any attention to this tag.  You may also have Photoshop configured to ignore missing ICC profiles and assume sRGB, so it appears that the JPG is in sRGB, but that's just a default assumption by Photoshop.  It could really be in something else. 

There are also questions about whether your screen is profiled and whether any software that you're using is configured to use that profile.  As I understand it, Windows is not a natively colour-managed OS in the way that Mac OS X is.  I don't regard browsers on Windows as colour managed applications.  There is a CM plugin for Firefox, or perhaps now it's an advanced setting, but even so I don't regard it as sufficiently reliable for this sort of comparison.  On Windows, the only applications that are useful for this comparison are colour managed ones.  Paint is not.

There's a lot of conjecture here.  The simplest way to make progress is to see if we can replicate your problem with your image.

tmcgill

Thanks for such a quick reply. Attached here is a zip file containing three image files. The first is a jpg as it came straight off the camera. The second was created by opening the first in Photoshop CS5 and then immediately saving it to a new jpg at quality level 10. The third is a screenshot of my Photoshop color settings dialog.

For me, both of the pumpkin photos display exactly the same way in Photoshop, and in Windows Photo Viewer as well, for that matter. But in IMatch, the first photo looks different (more red) than it does in Photoshop, and the two look different from one another even in IMatch alone. The second one is displayed by IMatch the same way as it is by Photoshop.

Now as for monitor, that in a certain sense doesn't seem to matter when the problem is defined strictly as "these applications displaying the same image differently on the same monitor." But, of course, it does matter if I'm trying to know what my image "really" looks like, which is also important if I ever want to use these images for anything other than looking at them on my own screen. All I know to say about that is that I am using a Dell U2413 with the sRGB preset selected.



[attachment deleted by admin]

Mario

Hi,

I have downloaded both files and added them to a test database.
The first file has no embedded ICC profile but is tagged as sRGB in EXIF (which is the default).
The second file has an embedded sRGB profile from Hewlett Packard.

When I bring both files into the Viewer side-by-side on my calibrated monitor, they look identical.
I've made a screen shot and then compared both images in an app which compares pixels. The differences between the images I get seem to be only caused by re-saving a JPEG, which usually introduces subtle differences or some 'loss' depending on the implemented JPEG compression algorithm.

This is what I get (click to enlarge)



[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand

OK, I can see what is going on here, although there is one thing that I was wrong about and one thing I don't yet understand.

Although the sRGB information appears in various places in the metadata, "Test Image 01 - Pumpkin.jpg" does not have an imbedded ICC profile.  Here are the metadata references to sRGB, as revealed by ExifTool:

---- ExifIFD ----
Color Space                     : sRGB
---- Olympus ----
Color Space                     : sRGB
Raw Dev Color Space             : sRGB
---- InteropIFD ----
Interoperability Index          : R98 - DCF basic file (sRGB)


The "Test Image 02 - Pumpkin - resaved by Photoshop.jpg" image on the other hand does have an embedded ICC profile (sRGB), as you would expect.

So I was wrong about how Photoshop would treat "Test Image 01 - Pumpkin.jpg" - there's enough information for it to know that it's in SRGB, and so it displays it accordingly.  Photoshop displays both images the same.

IMatch on the other hand displays the images differently.  It displays the "Test Image 02 - Pumpkin - resaved by Photoshop.jpg" image with the embedded ICC much the same as Photoshop, because it uses the profile.  The other "Test Image 01 - Pumpkin.jpg" it does not, because there's no ICC profile.  I'm not sure what colour space it's assuming to display it.  Mario might be able to clear this up.  I'm a little surprised that sRGB isn't assumed, or at least doesn't appear to be.

I use Downloader Pro for downloading images, and there's an option to embed the correct ICC profile in JPGs at download time, which avoids these problems.  If you embed sRGB as a profile then it should be fine.

Ferdinand

Quote from: Mario on October 13, 2015, 08:01:41 AM
When I bring both files into the Viewer side-by-side on my calibrated monitor, they look identical.

Not here.  Not by a long shot.

ubacher

On my monitor, using the Imatch viewer, the two images look identical.
Ditto when I load both into photoshop.
If others can clearly see a difference then there is something going on which it would be good to understand.

Ferdinand

Well, here is my side-by-side in the viewer



[attachment deleted by admin]

Ferdinand

Just to be clear, in this side-by-side I posted, the two images look quite different to me.  Is that how it looks to others as well?  The image on the right with the embedded ICC matches what Photoshop displays for both images, but the one on the left without an embedded ICC is darker and more saturated.

tmcgill

Yes, Ferdinand, what you see is very similar to what I see which prompted this threat. I'm glad at least one other person has this result, so hopefully it can become clear what is going on. It is interesting to me that you say the first image does not have a color profile embedded, just a bunch of metadata indicating sRGB. I had assumed, since Photoshop wasn't warning me about a missing or different color profile, that one was there, especially since the camera with which I took those pictures explicitly allows me to set the color space to sRGB or AdobeRGB. How do I tell whether a color profile is present in an image file? And why would the camera be leaving that out, given that it is important to displaying the image properly?

Also, a new clue: this color difference only happens on one of my three monitors. I just tried dragging the viewer over to another monitor and found that the images are displayed identically there. It happens that the monitor where the difference shows up is the nicest one, which I use as my primary screen. This is a Dell U2413, which has various color modes including sRGB and AdobeRGB which are, supposedly, factory calibrated to a high degree of accuracy. Looking around in the Windows control panel's color settings, for the primary monitor I see there is an entry under "ICC Profiles" in the "Profiles associated with this device" ("DELL U2413 Color Profile, D6500 (default)"), where there is none listed for my laptop's built-in monitor. The third monitor (another, somewhat cheaper Dell model) does have a listing there ("DELL U2211H D65 (default)") but does not display a color difference.

Is it possible that somehow Photoshop, seeing sRGB mentioned all over the metadata, treats this as an embedded sRGB profile and therefore displays the colors one way (the same way as IMatch does with an actual sRGB profile embedded), and that IMatch with the same image file makes a different assumption and displays the colors in some other way, and furthermore that this is somehow related to the monitor profile and therefore the difference appears on some screens but not others?

Trouble is, I don't really understand how all of these factors interact, so I'm not sure how to fix it so that it is correct (the image being shown the same way...and also the right way). I am not trusting what I see now. I don't know how to determine which of these is the "real" way the picture looks, which is going to frustrate any of my attempts at processing and using these images for any application where I care about accuracy.

I guess I might as well ask, too, since anything more than a basic answer as to what is happening might be too much to ask on a forum such as this, whether there are any good write-ups people have found helpful on how these things work, suitable for someone technically minded and technologically experienced but a novice in the area of image processing. Searching Google for color management explanations and tutorials, as I've done a number of times, results in quite a lot of results, many of which turn out to be not well written, or which others are responding to saying they contain erroneous information, so it is hard to sort the wheat from the chaff if you aren't already an expert.

Mario

The first image has the value 1 (sRGB) in the EXIF color space tag. The second has an ICC sRGB profile. IMatch should render both images identical, transforming the source color space into the target color space (monitor). What's puzzling is that it works for some users (or at least one some monitors)...

I've looked at the old code (much of this has been rewritten now, for the IMatch 5.5 version) and it looks correct.


1.

It checks if the image has an embedded ICC profile. If found, it is used.

If no profile is embedded, things get a bit more complex, because of historical reasons...:

2.

IMatch checks if the EXIF Color Space has the value 1 and then treats the image as if it is in sRGB.
The only allowed values (according to the EXIF specification) for this field are 0 (unspecified) and 1 (sRGB). Some applications used the value 2 to indicate a file in the AdobeRGB color space, but that's non standard, unreliable and ignored by IMatch.

3.

If this is not the case, IMatch checks what is called the "optional DCF color space". This is one of the weirder parts in EXIF. Probably added in favor of Adobe at some point. A file can be "marked" as being in the AdobeRGB color space by encoding certain pieces of information in five (5) other EXIF tags (color space, interop index, white point, primary chromacities and gamma". If all these tags are in the file and a certain combination of values, the file is in AdobeRGB.
I still wonder why the EXIF committee did not just define "EXIF color space value 2 => AdobeRGB" and be done. Anyway.

IMatch looks at all this information to determine how to treat the source pixels of images and how and when to color manage. It then maps the source color space to the target color space (monitor or other image or whatever) using Windows integrated color management. This is rather complex but usually just works, if the source and target color spaces / profiles are well defined and valid.

I've also checked your files with the new GPU-based Viewer and Quick View Panel in the development version of IMatch 5 (the only version I currently have running here) and the look identical there as well. I tried three computers with four monitors.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

P.Jones

I've just loaded both files into CS6 and both show the same as the 'resaved version'

Loading into IM5 I see the same as Ferdinand i.e. two different images.

Now if I go to Preferences\ application\ Viewer and change the Colour Management setting to 'No' then both images show the same.


Hope that helps

Winfried

If I load these two files into IMatch, I see a difference.
I don't see this difference in my  photo-software (Picture Window Pro).
I guess the problem might be in the field of monitor profile.

Colormanagement has normally to deal with three profiles:
- profile of the image
- working space
- monitor profile

I guess that in this special case the monitor profile is not correctly applied.
This would also explain why Firefox and IE do not show it correctly. They are not fully colormanagement.
I hope I will find the time today to check it by using a special monitor profile (color-spin).

Winfried


Winfried

Ok, here are my results:
I used a special icc-profile that "spins" the colors as a monitor profile (i.e. made it temporaly default in the colormanagment part for the display. needs admin rights)
After a restart of IMatch I got the expected result:
For the "original" image the monitor-profile is not applied. The colors seem to be correct.
For the photoshop-version the monitor-profile is applied. The colors spinned.
So, I guess that under certain conditions in IMatch the monitor profile is not used.

Winfried

P.S.: Be carefull by using this spin profile. Make sure that you understand how to revert to the normal monitor profile.


[attachment deleted by admin]

sinus

#15
Quote from: P.Jones on October 14, 2015, 08:36:43 PM
I've just loaded both files into CS6 and both show the same as the 'resaved version'

Loading into IM5 I see the same as Ferdinand i.e. two different images.

Now if I go to Preferences\ application\ Viewer and change the Colour Management setting to 'No' then both images show the same.
Hope that helps

Here the same and I have two monitors,
one monitor is calibrated, one not

Colour Management from the Viewer not enabled
both images on both monitors looks exactly the same


Colour Management from the Viewer enabled
on the not calibrated monitor both images looks the same
on the calibrated monitor they looks not the same, they appears like in Ferdinand's image


In Photoshop (CS6) both files looks identical, whatever I do (use the embedded profile sRGB or not) and they looks quite the same, like the right image on Ferdinand's IMatch-Viewer.




Best wishes from Switzerland! :-)
Markus

Ferdinand

Quote from: tmcgill on October 14, 2015, 03:18:44 PM
How do I tell whether a color profile is present in an image file? And why would the camera be leaving that out, given that it is important to displaying the image properly?

The IMatch variable {File.MD.XMP::photoshop\ICCProfile\ICCProfileName\0} is the one that I think is most likely to show you whether there's an embedded profile.  You can also examine the entrails of the file's metadata in ExifTool. 

I've never seen a camera a camera embed a profile in its JPGs.  Is there one that does?  Hence my reference to using Downloader Pro to do this at download time.

Quote from: P.Jones on October 14, 2015, 08:36:43 PM
I've just loaded both files into CS6 and both show the same as the 'resaved version'

Loading into IM5 I see the same as Ferdinand i.e. two different images.

Now if I go to Preferences\ application\ Viewer and change the Colour Management setting to 'No' then both images show the same.

I also tried CM off and got the same as P. Jones. 

With CM off, the viewer displays both images identically as more saturated.  With CM back on, the image with no embedded profile still looks over-saturated, while the image with a profile looks less saturated and much the same as in other colour managed applications, such as Photoshop.

The fact that the CM-off view of the two files is the same as the CM-on view of the image without an embedded profile pretty clearly demonstrates that on this system at least, IMatch is not colour managing this image.

Reading the various reports, I wonder how many of these monitors are calibrated and have a monitor ICC colour profile recorded in Windows?  If there isn't one recorded, then what does the CM management engine in IMatch do with the image, since there isn't a monitor profile to convert to?  Is this an explanation of why some see what I see and some don't?

If we have a completely new viewer coming then this probably isn't worth worrying about any more at this stage.  We should retest on V5.5.

tmcgill

I'm not sure if I agree with respect to "not worth worrying about." This is still a current, actively sold version, and the soon-to-be-released one is a paid upgrade, not a free update. (Of course, being a fan of the software, I will almost certainly pay for the upgrade soon after it is released, but it still would be a problematic support attitude to declare that bugs in the most up-to-date version don't matter because soon you can pay again to get rid of them.)

That said, I still am not even sure whether we're talking about a bug or not; it might be a misconfiguration of some kind on my system and some other people's. But it is suspicious that Photoshop handles the image differently than IMatch does, and also that turning off color management in IMatch eliminates the difference, suggesting that IMatch's color management is actively deciding to show the more saturated colors for the image without the embedded profile.

Is there anything else I can look up or attach that will help with figuring out what is happening?

Winfried

Quote from: tmcgill on October 16, 2015, 03:48:26 AM
I still am not even sure whether we're talking about a bug or not;
To my opinion it is a bug, since for your "original" image for some reason the monitor profile is not applied.
To proof this, I defined a "spin"-profile as monitor profile on my system. The effect of the profile is:
- red becomes blue
- green becomes red
- blue becomes red

The screenshot shows that the colors of the photoshopped image are "spinned", i.e. the (spin-)monitor profile is applied.
The "original" image is ok, i.e. no monitor-profile is applied.
So there is probably a combination of parameters in your file that causes Imatch not to apply the monitor profile.
I checked with other ooc-(jpg-)files on my system. No problems.

Although I consider this behaviour as a bug, I support Ferdinand. Wait for the new viewer and do a retest on 5.5

Winfried

sinus

Quote from: Ferdinand on October 15, 2015, 11:52:34 AM
If we have a completely new viewer coming then this probably isn't worth worrying about any more at this stage.  We should retest on V5.5.

I think the same.

If this is a bug, show me the software, where all bugs will be eliminated.  ;D

I mean, we have seen, that one of the images has no ebedded profile. Correct?

But if this is true, why Photoshop does show us during the opening, that this file has an embedded profile? (sRGB)? It should then say, this file has no embedded profile, hence we fall back to the color space from exif.

Like Ferdinand thought about, I am sure, a lot of people does not have a calibrated monitor. And I know, a lot of professional does not have also (or calibrate once in 3 years or so).

Why? In fact, my opinion, it is not that important! And if it is important, for high quality brochures, books and so on, then a professional will not work with pictures without an embedded profile.

If I turn off the color-management in PS from the pictures without an embedded profile, then Photoshop show exactly the same colours like IMatch.
Hence Photoshop falls back in this case to the value in the exif  exif:ColorSpace>1</exif:ColorSpace> and IMatch does turn off the CM for this image (or takes the monitor profile).

Theses things are complex, I think.
I would wait for 5.5. for sure.
Best wishes from Switzerland! :-)
Markus

Mario

You can add this as a bug report since somethings clearly not working right.
I've already did some checks, but found it working here. A bug report allows me to allocate some more time for this, or to mark it as "fixed" once the 5.5 is out.

Maybe IMatch does not get the EXIF info that the file is sRGB and thus does not color manage it. But it works here, so there is something else going on. I tried monitors with and without a color profile, so this may not be the real reason.

I suggest, for the time being, you just add a ICC profile to the file. This can be done, losslessly (no re-coding), with exiftool using a command line similar to:

exiftool "-icc_profile<=profile.icc" yourfile.jpg

Or, if you produce the JPEG file in PS anyway, let it embed a sRGB profile if the file is saved in sRGB. IMatch should then manage the colors correctly.
I recall a glitch I've fixed along the way while implementing the new render engine for the 5.5 product so this may be solved, even in the old code. The new code manages colors "in hardware" on the graphic card anyway.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

tmcgill

Thanks, I will do a little more experimentation and add a bug report with whatever additional details I can come up with for what conditions do and do not reproduce the bug. I will for now have to just add an exiftool step as you suggest to my bulk import workflow-- the IMatch viewer is what I use for rapidly scanning and marking my images as worth spending more time on or not before I ever get to PS, so the colors that are displayed there are important to me because color could very well be what catches my eye as interesting about a particular shot. In fact, that's what got me noticing this in the first place; I had a couple of images of above-average quality that I wanted to work with more, found that they looked flatter in Photoshop, and realized color balance was part of why I was interested in those images...and that I didn't want to touch them if I wasn't sure which version of the displayed image was more accurate.