Hi,

You are seeing the unbounded mode in action, which is
a feature, not a bug. See a posting on my blog about that:

http://littlecms2.blogspot.com/2009/09/unbounded-cmm.html

If you use sRGB, which is a matrix and a set of curves,
where is the gamut information? Right, the gamut is defined
by the device encoding and only by the device encoding.
But then you use double values, so the encoding is no longer
limiting the gamut, and in this case you see no clamping
because there is nothing that forces such clamping. If you
want this effect, you need to specify the encoding you
want to restrict, TYPE_RGB_16, or TYPE_RGB_8, for example.

Regards
Marti

Quoting Prevost Jerome <[email protected]>:

> Hello,
>
> For profiles without any gamut information (like display profiles) , 
> I use to use a < back and forth > transform PCS->Device->PCS using 
> the CreateMultiprofileTransform() function. When I transform the Lab 
> boundary, I got something similar to the gamut boundary of the 
> profile. As I'm migrating to V2, I got different results.
>
> I get sometimes identity. It depends on the profile. For printer 
> ones, it seems to work. For display ones, some of them return 
> identity, other return much larger gamut than expected and perhaps 
> some return the same results than before. I guess that the analysis 
> of the transformation is different according the stages (LUT, matrix, 
> CLUTs and so on..). Probably, it's not the way I should do to get 
> what I expect !
>
> Now, this results in an identity profile if I use this code (sRGB profile) :
>
>      double In[3],Out[3];
>
>      cmsSetLogErrorHandler(ErrorLog);
>      cmsHPROFILE sRGB=cmsCreate_sRGBProfile();
>      cmsHPROFILE XYZ=cmsCreateXYZProfile();
>      cmsHPROFILE Profiles[4]={XYZ,sRGB,sRGB,XYZ};
>
>      cmsHTRANSFORM 
> Trans=cmsCreateMultiprofileTransform(Profiles,4,TYPE_XYZ_DBL,TYPE_XYZ_DBL,INTENT_ABSOLUTE_COLORIMETRIC,cmsFLAGS_HIGHRESPRECALC);
>
>      In[0]=0.75;
>      In[1]=0.50;
>      In[2]=0.45;
>
>      cmsDoTransform(Trans,In,Out,1);
>
>      cmsDeleteTransform(Trans);
>      cmsCloseProfile(sRGB);
>
> The Out array always have the original values whatever the In array 
> contains, not the ones expected because of some gamut mapping. I 
> guess that's it's an optimization somewhere that detects an identity 
> where there is not. Is it normal ? Or, is there a different way now 
> to do this correctly (other function or flags)  ?
>
> Thanks in advance,
>
> J.
>



------------------------------------------------------------------------------

_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to