On 08/10/2016 12:10 PM, Noel Carboni wrote: > Just a comment related to negative numbers and practical usage... > > At ProDigital Software we make Photoshop plug-ins. One set in > particular adds lighting effects to images, and we handle any RGB format > that Photoshop can deliver to us, including 32 bit floating point. > > We specifically had to add code that zeroes any negative values > received, which we found were occasionally being delivered in images > expressed in the ColorMatch RGB space. > > To us negative values can't possibly make sense. > > Put another way, what's blacker than black? Even modern physics doesn't > attempt to describe what's inside the event horizon of a black hole. At > least not in the same realm as the physics that describe the visible > universe.
Not all colors that have one or two negative channel value, also have negative Luminance. Luminance depends on all three channel values. Profiles that support unbounded profile conversions include profiles with parametric curves such as the V4 sRGB parametric TRC. When using unbounded ICC profile conversions and working at floating point precision, one can convert any color from any color space to any other color space that supports unbounded ICC profile conversions. Any color that is out of gamut with respect to the destination color space will have one or two channel values that are less than zero. I'm not sure whether clipping to zero for destination profiles with true gamma (non-linear-gamma) TRCs is intended behavior or not, but it certainly is unexpected based on how conversions to profiles with parametric TRCs behave. If you don't want floating point conversions to profiles that support unbounded conversions, then use the cmsFLAGS_NONEGATIVES flag during the profile conversion. > Granted, the code that ensures no negative values can exist wasn't hard > to write nor particularly wasteful of resources, but it DOES take a > little time. From our perspective, if all color engines were to ensure > only positive numbers would be generated (as LittleCMS does) we could > have saved our user a little time starting our software every time it's > run. > > I'm not making a hard case against lifting the restriction against > emitting negative numbers from LittleCMS transforms, except to say that > as a tool/engine we currently rely on the current behavior and if it's > changed we'd like an OPTION to keep it working as it does now. That restriction was lifted when LCMS V2 was first released and it's incredibly useful (understatement) and important contribution to ICC profile color management. http://www.littlecms.com/CIC18_UnboundedCMM.pdf http://ninedegreesbelow.com/photography/lcms2-unbounded-mode.html http://ninedegreesbelow.com/photography/high-bit-depth-gimp-tutorial-edit-tonality-color-separately.html#out-of-gamut-colors Best, Elle ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user