From: Marti M. <mar...@li...> - 2022-03-23 16:03:27
|
Hi, > On 22 Mar 2022, at 23:10, Derek B. Noonburg <de...@gl...> wrote: > > I'm seeing very different output in one particular case, after > upgrading from 2.12 to 2.13 (or 2.13.1). > Checked your profile and gives same results to me, tested on Debian 11, system lcms2 (from Debian, which is 2.12) vs. compilation of 2.13 on /usr/local marti@debian:~$ /usr/bin/transicc -c1 -s -ex -i profile.icc -b -t1 LittleCMS ColorSpace conversion calculator - 5.0 [LittleCMS 2.12] Copyright (c) 1998-2020 Marti Maria Saguer. See COPYING file for details. Enter values, 'q' to quit R? 97 G? 97 B? 97 R=0x9F G=0x9F B=0x9F Enter values, 'q' to quit R? q Done. marti@debian:~$ transicc -c1 -s -ex -i profile.icc -b -t1 LittleCMS ColorSpace conversion calculator - 5.0 [LittleCMS 2.13] Copyright (c) 1998-2022 Marti Maria Saguer. See COPYING file for details. Enter values, 'q' to quit R? 97 G? 97 B? 97 R=0x9F G=0x9F B=0x9F Enter values, 'q' to quit R? q Done. Should I use your exact program to reproduce the issue? The transicc utility does basically same. BTW I have checked ColorSync utility on relcol to sRGB. ColorSync does not have black point compensation, but turning it off on both sides, they agree on same value: 30 Regards Marti > The input profile is from a PDF file, and claims to be e-sRGB. With > INTENT_RELATIVE_COLORIMETRIC and cmsFLAGS_BLACKPOINTCOMPENSATION, the > transform to sRGB (builtin profile) produces completely different > results. > > The code looks like this (error checking and cleanup intentionally > omitted): > > #include <stdio.h> > #include <lcms2.h> > > int main() { > cmsHPROFILE inputProfile = cmsOpenProfileFromFile("profile.icc", "r"); > cmsHPROFILE outputProfile = cmsCreate_sRGBProfile(); > cmsHTRANSFORM xform = cmsCreateTransform(inputProfile, TYPE_RGB_8, > outputProfile, TYPE_RGB_8, > INTENT_RELATIVE_COLORIMETRIC, > cmsFLAGS_BLACKPOINTCOMPENSATION); > unsigned char in[3] = {0x61, 0x61, 0x61}; > unsigned char out[3]; > cmsDoTransform(xform, in, out, 1); > printf("%02x %02x %02x\n", out[0], out[1], out[2]); > } > > and I'm attaching the profile. > > The results with 2.12 are "1e 1e 1e" and with 2.13 (same with 2.13.1) > are "9f 9f 9f". > > I pulled the profile out of a PDF file, so it's possible there's a > problem in the profile itself -- but I'm not seeing any error messages > from LCMS if I use cmsSetLogErrorHandler. > > If anyone has some idea of what's going on here, I'd love to know. > > Thanks! > <profile.icc>_______________________________________________ > Lcms-user mailing list > Lcm...@li... > https://lists.sourceforge.net/lists/listinfo/lcms-user |