Have this .dll called "Little cms engine" but all examples are in c++
("Little cmc enging" does image color correction based on different profiles,, like for monitors,printers or scanners etc).
heres the c-code/
Code: Select all
#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;
}
/read from one image then copy to a new?
Then I wonder about this:
hInProfile = cmsOpenProfileFromFile("HPSJTW.ICM", "r");
cmsopenprofilefromfile is a function in the dll but how come that the function is called 'within' the next function: cmsDoTransform(hTransform,...?
I thought you only could call one function at a time..
Well well.. sorry for my stupidity... /
/ZuedTheSwede
