Hello,

IEEE754 single-precision float has only 7 digit precision (log10(2^24)  
≈ 7.225),
since your conversion goes from gamma 1 to gamma 2 space, the  
operation you do is

rgb^1 -> [Matrix1] -> [Matrix2]^-1 -> rgb^(1/2)

Matrix1 and 2 are stored as doubles, but values are evaluated stage by  
stage and stored as floats, and therefore quantized.

Then (1E-7)^(1/2) = 0.0003162277, if you move to 0..255 domain,   
(1E-7)^(1/2) * 255 = 0.0806 which is the maximum error you could get.  
The value you report is below this.

What you see is a precision loss due to quantization to floats and  
gamma 1.0 space.

Regards
Marti


Quoting Elle Stone <ellest...@ninedegreesbelow.com>:

> On 09/15/2014 04:43 AM, marti.ma...@littlecms.com wrote:
>>
>>
>> Hi Elle,
>>
>> I've tried RedHat 6 with gcc 4.4.7 and a old Mac PowerPC running darwin9
>> 4.0.1, in both cases I got no issues, and the return values were the
>> expected ones. I wonder how you do to get this particular result:
>>
>>> transicc -c0 -t1 -w -o sRGB-V2-g10.icc -i sRGB-V4-g20.icc
>>>
>>> 255 255 0
>>> R=255.0000 G=255.0000 B=0.0134 (the B channel should be zero)
>
> Hmm, my apologies, I might have mixed up the "to-from" commands in  
> the initial email.
>
> I checked conversions going from linear gamma to gamma=2.0 and also  
> going from gamma=2.0 to linear gamma.
>
> From linear gamma to gamma=2.0:
>
> transicc -c0 -t1 -w -i sRGB-V2-g10.icc -o sRGB-V4-g20.icc
> LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06]
>
> Enter values, 'q' to quit
> R? 255 255 0
> G? B?
> R=255.0000 G=255.0000 B=0.0134
>
>
> From gamma=2.0 to linear gamma:
>
> transicc -c0 -t1 -w -o sRGB-V2-g10.icc -i sRGB-V4-g20.icc
> LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06]
>
> Enter values, 'q' to quit
> R? 255 255 0
> G? B?
> R=255.0000 G=255.0000 B=0.0000
>
>
>> Maybe you used a
>> different profiles? Could you check the profiles you sent?
> I will sent you a new set in a private email. Results are the same  
> with both sets. The only difference is the naming convention.
>
> Elle



------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to