I’m going to make one last post on this topic of “what’s the right way to make an sRGB profile”. My post focuses on two points:
-
The major point of contention being raised by @saucecontrol on how to make an sRGB profile has to do with whether one should start with the xyY values given in the sRGB color space specs, or instead use rounded XYZ values given in various places by various people. My apologies, but I’m not persuaded by @saucecontrol’s argument in favor of using rounded XYZ values to make invertible matrices.
-
It’s tempting to use dismissive language when critiquing someone else’s work, but doing so doesn’t further understanding or communication, in fact works against understanding and communication.
Quoting from part 3 of @saucecontrol’s posts on making an sRGB profile:
And here again is the XYZ->R’G’B’ matrix from the spec – as described to me by a little birdy.
. . .
And rounding that to 4 decimal places, we get the exact numbers listed in the sRGB spec (I’ve been informed by a Wikipedia author)
These are “appeals to expert authority”. However, appeals to little birdies and unnamed Wikipedia authors are not valid appeals to authority as the authorities in question aren’t actually named and no links are given to back up the appeal.
My statement that my ICC profiles have the same RGB XYZ values as Graham Gill’s ICC profiles is also an appeal to authority, as Graham Gill is a recognized authority on matters of ICC profiles. The difference in my appeal to authority is that anyone can go look at the ArgyllCMS website and download and examine the code and the profiles.
Quoting from part 3:
Elle rounds up every possible definition of every color referenced in the sRGB spec, does every bit of mathematical wrangling imaginable, and comes up with a final set of numbers that are very close to the ones that ArgyllCMS has in its reference sRGB profile. Score one for Argyll.
To rephrase in a less dismissive fashion, I set up a spreadsheet for calculating an sRGB ICC profile from the sRGB color space specs, using correct spreadsheet calculations and input values, all the way up to the point at the end, when comparing the calculated values to the values in the ArgyllCMS sRGB.icm profile, at which point I made a small error in my conversions from decimal to hexadecimal. That small error at the very end has no bearing on the correctness of the rest of my spreadsheet. And as it turns out, the ArgyllCMS sRGB.icm profile RGB XYZ values actually do match the calculations in my spreadsheet.
@saucecontrol wants to calculate the sRGB profile starting with four-digit XYZ values instead of using the xyY values given in the sRGB color space specs. So of course my spreadsheet calculations aren’t going to produce his version of the sRGB ICC profile.
Quoting from part 3:
Well, like Elle, I started with the assumption that more precision is better, and I didn’t like the look of those imprecise numbers from the spec. So, like Elle, I tried to calculate my own more precise matrix using the the published x,y values of the primaries. That effort was a complete failure.
To rephrase and reiterate what @gwgill already said, when converting from xyY to XYZ, and then converting back to xyY, one must use more precision for the XYZ values than for the xyY values, or else the reverse conversion doesn’t produce the starting xyY values to whatever degree of precision one has decided is required. And similarly when converting from XYZ to xyY and then converting back to XYZ.
I used 12 decimal point values in my spreadsheet calculations, which is sufficient to exceed the accuracy in actual ICC profiles and also as reported by iccToXML.
Quoting from part 3:
I drew two main conclusions from reading through those articles. The first was that well-behaved and correct sRGB profiles are difficult to create and are, consequently, rare. The second was that the reference sRGB profile shipped with ArgyllCMS happens to be that most mythical of profiles. The unicorn profile, if you will.
First, phrases like “unicorn profile” don’t further a discussion of how to make an sRGB profile. Second, creating a well-behaved (neutral gray axis) and correct sRGB profile is not difficult:
- Start with the xy red, green, blue, and (source) white point values given in the sRGB color space spec
- Use the ICC illuminant XYZ values for the D50 destination white point.
- Do a proper Bradford chromatic adaptation to make the sRGB ICC profile.
- Adjust the values in the resulting ICC profile to make the profile have a neutral gray axis.
The first major problem with many ICC profiles “in the wild” is that they weren’t made following the above procedure, and the main point of departure has nothing to do with “unicorn profiles” and everything to do with starting with incorrect white point values. The second major problem with many ICC profiles “in the wild” is that they aren’t well-behaved, which is a completely separate issue from the issue of starting with the wrong source and destination white points.
I’m sure nothing in this post will convince @saucecontrol that starting with four-digit XYZ values is the wrong way to produce a “by the specs” sRGB profile. I suppose my major motivation for bothering to make this post is that I’m rather tired of seeing dismissive terminology and arguments from unnamed authorities passing as valid ways to persuade someone that the person speaking knows exactly what they are talking about. Probably I’m a little overly sensitive regarding matters of terminology given certain other discussions we’ve had recently on this forum.