Available in the LEADTOOLS Imaging toolkit. |
LoadICCProfile example for Visual C++
VARIANT Data;
FILE *fp;
int nRet;
long uBound;
VariantInit(&Data);
fp = fopen(TEXT("c:\\MyICC.ICM"),"wb");
nRet = Lead1.LoadICCProfile ("c:\\dst_rgb_image.tif", &Data, 1);
SafeArrayGetUBound(Data.parray, 1, &uBound);
for(long i =0;i<(uBound+1);++i)
{
int tmp;
SafeArrayGetElement(Data.parray, &i, &tmp);
fwrite(&tmp,1,1,fp);
}
VariantClear(&Data);
fclose(fp);