2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
10 // get gamma from ICC file
12 int main(int argc
, char **argv
)
16 cmsToneCurve
*tc_red
, *tc_green
, *tc_blue
;
25 filename
= "SYS:Prefs/Presets/Colortables/ICC/sRGB.icc";
28 hProfile
= cmsOpenProfileFromFile(filename
, "r");
31 tc_red
= cmsReadTag(hProfile
, cmsSigRedTRCTag
);
32 tc_green
= cmsReadTag(hProfile
, cmsSigGreenTRCTag
);
33 tc_blue
= cmsReadTag(hProfile
, cmsSigBlueTRCTag
);
34 if (tc_red
&& tc_green
&& tc_blue
)
36 for (i
=0; i
< 256; i
++)
38 printf("i %d red %u green %u blue %u\n", i
, cmsEvalToneCurve16(tc_red
, i
* 256) >> 8, cmsEvalToneCurve16(tc_green
, i
* 256) >> 8, cmsEvalToneCurve16(tc_blue
, i
* 256) >> 8);
43 puts("Gamma tags missing");
45 cmsCloseProfile(hProfile
);
49 puts("Couldn't open ICC file");