[Lcms-user] Negative channel values are clipped upon floating point conversions to profiles with tr
An ICC-based CMM for color management
                
                Brought to you by:
                
                    mm2
                    
                
            
            
        
        
        
    | 
      
      
      From: Elle S. <ell...@ni...> - 2016-08-10 14:20:02
      
     | 
| Hi Marti and all,
It seems that floating point (unbounded) conversions to RGB matrix 
profiles with true gamma TRCs (other than gamma=1.0), such as ClayRGB 
with gamma=2.2 TRC, will clip negative channel values to zero. But 
unbounded conversions to profiles with parametric TRCs, such as the sRGB 
parametric TRC, does not clip negative channel values.
I understand that pow(value, gamma) is undefined for negative values, 
but would code like this make it possible to not clip when converting at 
floating point to a profile with a true gamma TRC? Or perhaps the 
results wouldn't make any sense?
if (value < 0)
       {
       value = -1.0 * value;
       value =  pow (value, gamma);
       value = -1.0 * value;
       }
Best regards,
Elle
-- 
http://ninedegreesbelow.com
Color management and free/libre photography
 |