Hi Kai-Uwe. That may be a bug.
May I have the sRGC.icc and XYZ.icc profiles? Tried with the built-ins but it doesn't fail with those... Tnx! Marti Quoting Kai-Uwe Behrmann <k...@gmx.de>: > Btw the output of the code during cmsTransform2DeviceLink() is: > > lcms2: LUT is not suitable to be saved as LutAToB > lcms2: Couldn't write type 'mAB ' > > > Am 06.08.10, 15:03 +0200 schrieb Kai-Uwe Behrmann: >> Any idea how to put the processing elements in the right order during >> creation of a transform from sRGB to XYZ floats?. >> >> Following code demonstrates the issue: >> >> /* gcc -Wall -g transforms.c -o transforms `pkg-config --cflags >> --libs lcms2` */ >> #include <lcms2.h> >> >> void errorHandlerFunction ( cmsContext ContextID, >> cmsUInt32Number ErrorCode, >> const char * ErrorText ) >> { printf( "lcms2: %s\n", ErrorText ); } >> >> >> int main(int argc, char **argv) >> { >> cmsSetLogErrorHandler( lcm2ErrorHandlerFunction ); >> /* adapt profile paths to your needs */ >> cmsHPROFILE p_in = cmsOpenProfileFromFile( >> "/usr/share/color/icc/sRGB.icc","rb"); >> cmsHPROFILE p_out = cmsOpenProfileFromFile( >> "/usr/share/color/icc/XYZ.icc","rb"); >> >> cmsUInt32Number format_in = TYPE_RGB_FLT, >> format_out = TYPE_XYZ_FLT; >> cmsHTRANSFORM xform = cmsCreateTransform( p_in, format_in, >> p_out, format_out, >> 0, 0 ); >> cmsHPROFILE dl = cmsTransform2DeviceLink( xform, 4.2, 0 ); >> >> if(!cmsSaveProfileToFile( dl, "sRGB-XYZ_dl.icc" )) >> printf("error in writing sRGB-XYZ_dl.icc\n"); >> >> return 0; >> } > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Lcms-user mailing list > Lcms-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/lcms-user > ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user