/* A simpler example of how to use lcms */ #include "lcms.h" int main(void) { cmsHPROFILE hInProfile, hOutProfile; cmsHTRANSFORM hTransform; int i; hInProfile = cmsOpenProfileFromFile("HPSJTW.ICM", "r"); hOutProfile = cmsOpenProfileFromFile("sRGBColorSpace.ICM", "r"); hTransform = cmsCreateTransform(hInProfile, TYPE_BGR_8, hOutProfile, TYPE_BGR_8, INTENT_PERCEPTUAL, 0); /* here a loop for translating your image. */ /* for (i=0; i < AllScanlinesTilesOrWatseverBlocksYouUse; i++) { cmsDoTransform(hTransform, YourInputBuffer, YourOutputBuffer, YourBuffersSizeInPixels); } */ cmsDeleteTransform(hTransform); cmsCloseProfile(hInProfile); cmsCloseProfile(hOutProfile); return 0; }