Hi Kai-Uwe, I think it makes complete sense. I would, however, only modify case of pure gamma function (type 0). It happens that the spec already defines what to do on negative parts for other types. Just try the build-in sRGB for example, that already has this feature enabled:
transicc -i*XYZ -o *sRGB LittleCMS ColorSpace conversion calculator - 4.1 [LittleCMS 2.04] Enter values, 'q' to quit X? -10 Y? -10 Z? -10 R=-350.9086 G=-332.4046 B=-424.3584 I'm adding the change to my development sources, will commit in a week or so (I have many changes for 2.4 this time) Thanks! Marti Kai-Uwe Behrmann <k...@gmx.de> escribió: > Hello, > > the following used sRGB_linear.icc uses a single value gamma of 1.0 > inside a version 2.x ICC profile. > > $ transicc -i *xyz -o sRGB_linear.icc > LittleCMS ColorSpace conversion calculator - 4.1 [LittleCMS 2.03] > > Enter values, 'q' to quit > X? -10 > Y? -10 > Z? -10 > > R=0.0000 G=0.0000 B=0.0000 > The expected negative values where simply clipped. > > The clipping happens in DefaultEvalParametricFn(): > https://github.com/mm2/Little-CMS/blob/master/src/cmsgamma.c#L243 > if (R < 0) > Val = 0; > > Use case: > The graphics community discusses to use traditional sRGB primaries > and use floating point values to preserve wide gamut values as > negative numbers. > (The above observed clipping effectively prevents that.) > > Solution: > check for gamma of 1.0 and allow for negatives. > A first proof of concept patch is attached. > > Would that approach integrate reasonable? > > > kind regards > Kai-Uwe Behrmann > -- > www.oyranos.org ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user