[argyllcms] xicclu

  • From: Klaus Karcher <lists@xxxxxxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Fri, 30 Dec 2005 01:41:07 +0100

Hi Graeme,

first of all I want to thank you for your untiring commitment for argyllcms -- it achieves the best gamut mapping I've ever seen.

but now to the problem I've encountered with xicclu:

xicclu -fb -ip -pj /any/cmyk/profile.icc:
10.000000 0.000000 -30.000000 [Jab] -> Lut -> nan nan nan nan [CMYK]
20.000000 0.000000 -60.000000 [Jab] -> Lut -> nan nan nan nan [CMYK]
30.000000 0.000000 -90.000000 [Jab] -> Lut -> nan nan nan nan [CMYK]

... same story with -fif, other Rendering Intents or RGB-Profiles:
as soon as J/a = -1/3 and b=0, xicclu returns nan

I'm neither a programmer nor know much about Color Appearance Models, but I fiddled about with gdb and guess that the trigger is the evaluation of the Helmholtz-Kohlraush effect in cam_to_XYZ() (file cam02.c):

/*503*/ J = (J - kk)/(1.0 - kk);
J becomes 0 for kk=J

/*513*/ tt = fabs(J);
/*514*/ ss = pow(C/(pow(tt, 0.5) * s->nn), 1.0/0.9);
ss becomes infinite

/*518*/ ttS = ss/(12500.0/13.0 * e * s->Nc * s->Ncb);
ttS becomes infinite

/*566*/ isden = ... * ttS + ...;
isden becomes infinite

/*574*/ b = (ttA * ttS) / isden;
/*575*/ a = b * itanh;
b and a get nan

lines 579 ... 642:
rgba[], rgbp[], ... and finally XYZ[] get {nan, nan, nan}

regards, Klaus


Other related posts: