Re: [Lcms-user] cmsCreateTransform(): Unclear error message
An ICC-based CMM for color management
Brought to you by:
mm2
From: <mar...@li...> - 2023-12-22 02:41:43
|
Hi Jürgen, > It only happens (e.g. the error message) in my final application. The same > piece of code works in my test program (which does at most the same, same > PNG file, same output definition). This is memory corruption. Maybe you have closed the input or output profiles before calling cmsCreateTransform? The snipped you send is correct, used in many different places with no problems. Could you run your program under a memory checker, valgrind or visual studio sanitizer, for example? Upgrading to 2.16 would be also a good idea, but I doubt using an old version is the root cause of this issue. Regards Marti Maria The LittleCMS Project https://www.littlecms.com > -----Original Message----- > From: flap <fb...@oh...> > Sent: Thursday, December 21, 2023 6:51 PM > To: lcm...@li... > Subject: [Lcms-user] cmsCreateTransform(): Unclear error message > > Hello list, > > I have the following lines in my code: > > […] > assert(cmsGetColorSpace(info->incms) == cmsSigRgbData); > assert(cmsGetColorSpace(info->outcms) == cmsSigGrayData); > > cmsHTRANSFORM trans = cmsCreateTransform(info->incms, > TYPE_RGB_8, /* from 24 bit RGB raster */ > info->outcms, > TYPE_GRAY_8, /* into an 8 bit grey-scale raster */ > INTENT_PERCEPTUAL, > 0); /* no further flags for now */ > if (trans == NULL) > return -EINVAL; > […] > > The catched error message when calling cmsCreateTransform() is code 13 ('not > suitable') and 'Couldn't link the profiles'. What does it mean? > > It only happens (e.g. the error message) in my final application. The same > piece of code works in my test program (which does at most the same, same > PNG file, same output definition). > > I'm now confused what the difference can be to make the call fail. > > Background: The "info->incms" comes from an embedded ICC profile in the > PNG file and the "info->outcms" is a virtual profile generated with > cmsCreateGrayProfileTHR(). On my system liblcms2.so.2 -> liblcms2.so.2.0.12 > is in use. > > Cheers, > Jürgen > > > > > > _______________________________________________ > Lcms-user mailing list > Lcm...@li... > https://lists.sourceforge.net/lists/listinfo/lcms-user |