Hi, I have some profiles, with a bit wobbly gamma...
I'd like to write a simple program which read a source profile then smoothes all three gamma curves, and then writes the complete resulting profile to a destination file. I've already fiddled a bit with some code: #include "lcms.h" int main(void) { cmsHPROFILE hProfile; hProfile = cmsOpenProfileFromFile("test.icc", "r"); LPGAMMATABLE lpRedGamma; LPGAMMATABLE lpGreenGamma; LPGAMMATABLE lpBlueGamma; lpRedGamma = cmsReadICCGamma(hProfile, icSigRedTRCTag); lpGreenGamma = cmsReadICCGamma(hProfile, icSigGreenTRCTag); lpBlueGamma = cmsReadICCGamma(hProfile, icSigBlueTRCTag); cmsSmoothGamma(lpRedGamma, 10); cmsSmoothGamma(lpGreenGamma, 10); cmsSmoothGamma(lpBlueGamma, 10); cmsCloseProfile(hProfile); cmsFreeGamma(lpRedGamma); cmsFreeGamma(lpGreenGamma); cmsFreeGamma(lpBlueGamma); return 0; } Please note I'm not an experienced C programmer. As you might see from the above code, I have managed to load an ICC Profile, and extracted all three gamma curves from it, and then smoothed them. But, how do I reintegrate these gamma curves back into the profile, and write the profile back to disk? Regards, Pascal de Bruijn ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user