Closed 9241304 closed 5 months ago
I've checked your code with USWebCoatedSWOP.icc and it works fine to me. Which is the printer_profile.icm you are using?
BTW, black point compensation does nothing in absolute colorimetric, but this should not make create transform to fail.
I think it doesn`t matter what printer profile used. Problem appears when I set any flag. Did you check on 2.16 release version or current version? DTF P900 ROLL.dmp (rename to icm)
Using this code with official lcms2-2.16, Visual studio 2022, works fine to me
#include "lcms2.h"
int main()
{
auto inp{ cmsCreate_sRGBProfile() };
auto outp{ cmsOpenProfileFromFile("DTF.P900.ROLL.dmp", "r") };
auto transform{ cmsCreateTransform(inp, TYPE_RGBA_8_PLANAR, outp, TYPE_CMYK_8_PLANAR, INTENT_ABSOLUTE_COLORIMETRIC, cmsFLAGS_BLACKPOINTCOMPENSATION) };
return 0;
}
OK, I will build lcms2 debug version and check again.
It`s a magic... I built debug version, and all works. Then rebuilt release version. And it works too. Thanks for your time )
It happens to me all the time. Don’t worry, this is the best thing it can happen. And thanks for reporting, it could have been a serious issue.
Best
Marti
Test code (x64, VS2022)
This works correctly in 2.15-(also checked 2.13.1), but doesn`t work in 2.16. If I remove flags, then code works in 2.16 too.