Hi,

> Thanks, Marti.  I am in a Linux environment, so I did build from the
> sources and have been looking through them.  The icc2it8.c you sent
> seems to be a newer version than what was included in lprof-1.09.

Yes. I intend to include it in new release. I'm going late on that, but the number
of new features in 1.10 is really big. I'm right now writing the documentation,
so I hopefully I will have all ready very soon. Anyway the changes on this particular
program are minimal, and it is compatible with 1.09.

> Comparing icc2it8.c and icctrans.c to my code, and doing a lot of
> experimentation, I found a few small things:
>
> In  icc2it8.c, GenerateForward() and GenerateReverse() you do:
>
>     cmsTakeMediaWhitePoint(&WhitePoint, hProfile);
>
> and:
>
>     cmsXYZ2xyY(&WPxyY, &WhitePoint);
>
> But the variables WhitePoint and WPxyY are never used.  The
> cmsTakeMediaWhitePoint() doesn't seem to have any "side effects", so
> is this just dead code?
>

Yes, just dead code. Thanks for finding such bug :-)


> Also, in my code, I found a slight numeric difference in results
> between doing:
>
>     cmsDoTransform     (lab_trans,  rgb, lab, 1) ;
>     cmsLabEncoded2Float(&lab_float, lab) ;
>
> and:
>
>     cmsDoTransform     (xyz_trans,  rgb, xyz,   1) ;
>     cmsXYZEncoded2Float(&xyz_float, xyz) ;
>     cmsXYZ2Lab         (NULL,       &lab_float, &xyz_float) ;
>

Ops, warning! this could be same in all intents but absolute colorimetric.
The part "cmsXYZ2Lab(NULL,  &lab_float, &xyz_float)" implies D50
as white point. If profile is using any other, this would not be same. On
rest of intents both forms are equivalent since they use D50. Also, there
could be a small rounding error due to quantization, but this latter
is  probably negligible.


> Finally, there should be no difference between:
>
>     cmsHPROFILE    srgb_icc = cmsCreate_sRGBProfile() ;
>
> and:
>
>     cmsHPROFILE    srgb_icc
>                  = cmsOpenProfileFromFile("sRGB Color Space
> Profile.icm",
>                                           "r");
>
> correct?

Correct. The testbed program checks the differece and reports a maximum
error about dE < 0.02

Regarding Patches. Well, the profilers don't really expect any special
distribution, nor the It8 spec. Only patches covering whole gamut and
(and this is very important) a set of neutral grays. So, you can use the
user columns if want so. The measurement tool has templates for formats
with and withou these additional patches. They give more accurancy on
skin tones, but otherwise are not really needed.


> > I tell you the icc2it8 stuff because it could be a great debug tool.
> > Just compare the RGB of values obtained by icc2it8 and those in your
> > synthetic image. If they don't match, then the error is there.
>
> This seems to be the secret.  If I use the EmulatedRGB table of
> patches from icc2it8.c, converted from sRGB to L*a*b*,
> qtscannerprofiler converges to a good profile.  If I use a real,
> scanned IT8.2 target and its matching L*a*b* values, it also works.


Convergence is a bit tricky, since common sense not always work on that.
A few outliers can mess all badly. But real scanners doesn't have such
problems, so the profiler doesn't check such situations more that the
" inconsistence found" warning. Ayway it has no sense to add code just
to handle testcases :-)


Regards,
Mart� Maria
The little cms project
http://www.littlecms.com
[EMAIL PROTECTED]




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to