Hi,
A clean way to dump any kind of VCGT as 3 256-entry tables from 0 to 1

Vcgt = cmsReadTag(hProfile, cmsSigVcgtTag);
if (Vcgt != NULL)
for (i=0; i < 256; i++)
{
   cmsFloat32Number r = cmsEvalToneCurveFloat(Vcgt[0], i / 255-0);
   cmsFloat32Number g = cmsEvalToneCurveFloat(Vcgt[1], i / 255.0);
   cmsFloat32Number b = cmsEvalToneCurveFloat(Vcgt[2], i / 255.0);

   printf("%f %f %f\n", r,g,b);
}

Regards
Marti

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to