Page 1 of 1

colorspace (s)RGB and chromaticity primaries

Posted: 2016-10-22T05:50:32-07:00
by miha
I'm creating a png from raw RGB bytes that should be interpreted with Adobe RGB primaries (not sRGB) with something like

convert -size 2048x1536 -depth 8 rgb:inputfile -depth 10 outputfile.png

identify -verbose then says

Colorspace: sRGB
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)

So I add the Adobe RGB profile

convert -size 2048x1536 -depth 8 rgb:inputfile -depth 10 -set profile "/usr/share/color/icc/Adobe ICC Profiles/RGB Profiles/AdobeRGB1998.icc" outputfile.png

identify -verbose then still reports Colorspace: sRGB
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
and Profiles:
Profile-icc: 560 bytes

No matter what I do (-colorspace RGB -set colorspace RGB for input and/or output) the output file always has colorspace sRGB and no Adobe RGB green primary according to identify. Apparently -set colorspace only triggers changes from linear to gamma corrected data and back. The profile alone will make sure the printer driver knows the data is relative to Adobe RGB primaries and not sRGB primaries? When ever will colorspace say RGB and a green Adobe RGB primary is listed by identify?

Re: colorspace (s)RGB and chromaticity primaries

Posted: 2016-11-23T07:36:23-07:00
by miket
I have a very similar question to the above.

My understanding is that the RGB/sRGB colorspace tag is simply an indicator of linear gamma=1 data or non-linear gamma!=1 data and therefore does not provide any more information about the specific color profile used.

However, like the previous post, I notice that when applying a profile (as in the previous example) that the white point and RGB chromaticity values given by identify remain as the standard sRGB color profile rather than the applied icc profile.

The question is, is this simply an inconvenience (in that identify does not indicate the "correct" white point and chromaticties that are actually used in forward processing) or, is it necessary to take care in any forward processing (if any of the forward processing commands utilize the WP or chromaticties as indicated by identify, rather than those in the embedded icc profile)?

Mike

Re: colorspace (s)RGB and chromaticity primaries

Posted: 2016-11-23T08:05:58-07:00
by snibgo
As far as I can see, IM iteself doesn't use the values of chromaticty.white_point etc. It sets these values, but never uses them.

The values may be written to TIFF and PNG files etc, so other software may use the values. I would expect that, where a profile is embedded, the values would be taken from the profile.

(To me, it would makes sense that, if IM embeds a profile, it sets the values of chromaticty.white_point etc. But then it should also "unset" the values on "-strip".)

Re: colorspace (s)RGB and chromaticity primaries

Posted: 2016-11-24T06:01:42-07:00
by miket
Thanks snibgo,

That confirms my hunch. Always good to have that from somebody with more IM hours under their belt :)

I'd also agree that it would be useful if IM could alter the appropriate tags after icc profiling an image as you suggested.

Mike