[Lcms-user] cmsCreateTransform(): Unclear error message
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: flap <fb...@oh...> - 2023-12-21 17:51:36
|
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
|