On 04/03/2014 11:58 AM, marti.ma...@littlecms.com wrote:
>
>
>
> Hi Elle,
>
> Sorry I didn't explain myself. I mean, when you actually
> store a built-in profile to disk, you are forced to use
> the ICC profile format. The ICC profile format has some
> limitations when storing floating point numbers.
> That means, if you have a floating point number
> in memory that is, say, 1.234567890, the file format
> used by ICC stores it as 1.23457. Then, when you read
> the profile again, the number you obtain is 1.23457 which
> has only 5 decimal places of precision and is slightly
> different from the original number. In your example
> you were mixing a yet existing profile with the srgb
> builtin and the builtin saved to disk.
>
> So, if you save the builtin to disk and read it again, you
> actually get slightly different numbers. If those numbers are
> the 3x3 matrix elements, you got different results.
>
> As a proof of that, if you save the builtin and you use
> the saved file as input and output, it still roundtrips
> well.
>
> transicc  -i sRGB_builtin.icc -o sRGB_builtin.icc
> LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06]
>
> Enter values, 'q' to quit
> R? 255
> G? 255
> B? 255
>
> R=255.0000 G=255.0000 B=255.0000
>
> etc.
>
> So, this loss of precision is due to the file format.
>
> Hope it makes sense to you
> Regards
> Marti

Hi Marti,

Yes, thanks! it's beginning to make sense. If I understand you 
correctly, it's a matter of precision vs accuracy, defined as follows:

Accuracy: the accuracy with which LCMS calculates the resulting RGB 
values when converting from one RGB matrix profile to another.

Precision: the number of decimal places in the profile primaries used to 
calculate the resulting RGB values when converting from one RGB matrix 
profile to another.

Two cases:

1. Converting from a profile on disk to a copy of the LCMS built-in sRGB 
profile that was previously saved to disk.

2. Converting from a profile on disk to to the LCMS built-in sRGB 
profile in memory.

In both cases the accuracy of the conversion is the same, yes?

In case 1, both profiles have primaries expressed using the same 
precision, quoting what you said earlier, "15.16 fixed point, that means 
the precision you have is 1 / ((1 << 16) - 1) which is about 1.5e-5".

In case 2:

* the profile on disk has primaries expressed using the precision 
defined by "15.16 fixed point, that means the precision you have is 1 / 
((1 << 16) - 1) which is about 1.5e-5".

* The profile created and held in memory has primaries expressed using a 
much higher precision.

So the two profiles, the built-in profile saved to disk and the "same" 
profile held in memory, really aren't the exact same profile because the 
primaries are different, just as, for example, 1.5523 is different from 
1.552329578.

As a consequence, converting the color white, R=G=B=255, *from* a copy 
of the LCMS built-in sRGB profile profile that had been saved to disk 
*to* the LCMS built-in sRGB profile created and held in memory, is 
really converting to a different profile:

transicc -w -c0 -b -t1 -i sRGB-lcms-built-in.icc -o *sRGB
LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06] 

 

Enter values, 'q' to quit 

R? 255 255 255 

G? B? 

R=254.9988 G=255.0029 B=254.9981 

 

Enter values, 'q' to quit 

R?

This isn't a consequence of more or less accuracy used during the 
conversion. LCMS performs conversions to a profile created and held in 
memory with the same degree of accuracy as it does when converting 
between two profiles on disk, yes?

Rather this is a result of more and less precision. Different precision 
means different destination profiles, which means different conversion 
results.

Is this a correct description of why there are discrepancies between 
converting to a copy of the LCMS built-in sRGB on disk vs converting to 
the LCMS built-in sRGB created and held in memory?

Kind regards,
Elle


------------------------------------------------------------------------------
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to