Dear Marti,

I would like to thank you again for your help. However I would like to add a 
very small correction to your code. This code would only work with me if it 
is look like this:

const cmsToneCurve **Vcgt; // please note the variable declaration
Vcgt= (const cmsToneCurve**)cmsReadTag(hProfile, cmsSigVcgtTag); // please 
note the typecasting

cmsFloat32Number r,g,b;

if (Vcgt != NULL){
for (int i=0; i < 256; i++)
{
   r = cmsEvalToneCurveFloat(Vcgt[0], i / 255.0);
    g = cmsEvalToneCurveFloat(Vcgt[1], i / 255.0);
    b = cmsEvalToneCurveFloat(Vcgt[2], i / 255.0);

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

Thanx.. again for the hints and for your library too..

Reem
--------------------------------------------------
From: <marti.ma...@littlecms.com>
Sent: Monday, October 11, 2010 2:16 PM
To: "Reem EL asaleh" <reem.elasa...@wmich.edu>
Cc: "Lcms Liste" <lcms-user@lists.sourceforge.net>
Subject: Re: [Lcms-user] reading vcgt tag

> 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