Page 1 of 1
[SOLVED] Does IM use sRGB.icc when converting colorspace?
Posted: 2012-04-21T18:06:26-07:00
by NicolasRobidoux
When converting with -colorspace between linear RGB and sRGB, does IM use the profile sRGB.icc, or internal formulas, or a combination of both?
P.S. The following questions reveal that I am slightly paranoid. I suspect that sRGB is "safe".
http://download.microsoft.com/download/ ... eStudy.doc
The sRGB.icc included with IM is really a really big file compared, for example, to those found in the system-wide profile dir, or with photivo. Is it because it's a "full" version?
Does anybody know if there is a significant difference between the various sRGB.icm and sRGB.icc floating around?
http://www.color.org/srgbprofiles.xalter suggests that there may be a small collection of them, with slightly different behaviors. Anybody knows if some systems sneakily substitute a v4 and call it sRGB.icm/icc? Also see:
http://photography-on-the.net/forum/sho ... p?t=978120 and
http://www.color.org/faqs.xalter#p9.
Re: Does IM use the sRGB.icc profile when converting colorsp
Posted: 2012-04-21T18:39:43-07:00
by NicolasRobidoux
Got a hint here:
http://www.multipole.org/discourse-serv ... 955#p71451, which led me to
http://trac.imagemagick.org/browser/Ima ... lorspace.c.
So, the answer is: IM converts between RGB and sRGB internally when -profile is not used.
Re: Does IM use the sRGB.icc profile when converting colorsp
Posted: 2012-04-21T18:47:25-07:00
by fmw42
NicolasRobidoux wrote:
So, the answer is: IM converts between RGB and sRGB internally.
I believe that is why IM recommends the use of profiles, where available, for better accuracy (color conversion) rather than just using -colorspace.
Fred
P.S. I got a laugh out of the signature at the bottom of one of the files you referenced above.
"In theory, there is no difference between theory and practice. But in practice, there is." Yogi Berra
Re: [SOLVED] Does IM use sRGB.icc when converting colorspace
Posted: 2012-04-22T06:01:44-07:00
by NicolasRobidoux
It would appear to me that sRGB_IEC61966-2-1_black_scaled.icc from
http://www.color.org/srgbprofiles.xalter would be a good profile to distribute with IM, replacing the current sRGB.icc (unless the currently included sRGB.icc was chosen for specific reasons).
The 'black scaled' profile has the preferred rendering intent in the header set to 'perceptual'. and the 'no black scaling' profile has the preferred rendering intent in the header set to 'relative colorimetric'.
Perceptual is clearly the most common default rendering intent. Even though John Cupitt argues that Relative is much better to use in color managed toolchains, it is my opinion that indeed Perceptual is better if you don't convert between other colorspaces than linear RGB and sRGB, with the linear RGB "gamut" roughly matching the sRGB one; it you use other colourspaces and care about careful color management, stick to Relative. Interestingly, for a lot of profiles, Perceptual and Relative are apparently one and the same!
Re: [SOLVED] Does IM use sRGB.icc when converting colorspace
Posted: 2012-04-22T07:14:09-07:00
by NicolasRobidoux
If one reads the last section of
http://www.color.org/srgbprofiles.xalter, one sees that my paranoia is not totally unfounded: There really are substantially different (v2) sRGB ICCs and ICMs out there.
Re: [SOLVED] Does IM use sRGB.icc when converting colorspace
Posted: 2012-04-22T09:09:52-07:00
by NicolasRobidoux
When exporting into 8-bit or 16-bit (with nip2) from XYZ, the above icc, straight from the ICC, gives different results from the sRGB.icc that's in ImageMagick/config/ for every single rendering intent. With the image I tested with, the max difference is as much as 15%, both in 8 and 16-bit. (Note that the conversion is done from float XYZ, I'm not talking about the bit depth BEFORE exporting. I'm talking about the export bit depth itself.)
Conclusion: “Just because you're paranoid doesn't mean they aren't after you” (John Heller)
Re: [SOLVED] Does IM use sRGB.icc when converting colorspace
Posted: 2012-04-22T09:14:27-07:00
by NicolasRobidoux
For kicks, I also compared the IM sRGB.icc to the sRGB.icm that comes with nip2. Same thing: With every bit depth and rendering intent, there are differences, up to 10-15% (in max norm).
However, if I compare the nip2 sRGB to the one straight from the ICC, for all rendering intents except Absolute (which was the most broken in earlier icc and icms according to the ICC web site), there is no difference.
Again: the one from the ICC that I used in the comparison is sRGB_IEC61966-2-1_black_scaled.icc which can be downloaded from the bottom of
http://www.color.org/srgbprofiles.xalter.
Re: [SOLVED] Does IM use sRGB.icc when converting colorspace
Posted: 2012-04-22T11:24:46-07:00
by fmw42
out of curiosity where did nip2 get its sRGB.icm?
Re: [SOLVED] Does IM use sRGB.icc when converting colorspace
Posted: 2012-04-22T11:26:47-07:00
by NicolasRobidoux
fmw42 wrote:out of curiosity where did nip2 get its sRGB.icm?
I don't know. John Cupitt "just picked a free one that seemed OK to make sure vips had a fallback". No matter the source, the nip2 sRGB fallback is closer in output to the one currently recommended for Perceptual by the ICC site, compared to the one that comes with ImageMagick. (At least when I use the profiles through nip2. I have not checked through IM.)
Re: [SOLVED] Does IM use sRGB.icc when converting colorspace
Posted: 2012-04-22T11:38:27-07:00
by NicolasRobidoux
Maybe I should compare the IM one to the one with default Relative rendering intent. (Later.)