[argyllcms] Re: FWA content found in 'spec2cie', but not in 'profile'

  • From: Thomas Baumann <thomas@xxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Sun, 14 Jan 2007 13:16:39 +0100

Graeme Gill wrote:
...
I only ever used FWA compensation with CMYK devices, and I've
overlooked the fact that it's hard coded to look for CMYK == 0
patches. Feed it an RGB file, and it picks all the black patches :-(

Thanks for drawing this bug to my attention. I'll fix it in the
next release. The workaround as you might guess, is to use
spec2cie in front of profile.
...

Graeme, I did a quick fix, see diff listing from v60.4 below
(indentation changed to make it email friendlier). Perhaps it is
of use to anyone, at least it fixed my little problem.

Sure, the workaround with spec2cie would have done it, but then
I wanted to try the Jam stuff. ;-)

Thomas Baumann


*** argyll_v60.4/profile/profout.c      Sat Jan 13 22:50:45 2007
--- argyll_v60.4.1/profile/profout.c    Sun Jan 14 11:50:14 2007
***************
*** 1457,1466 ****
        /* Compute the mean of all the media white patches */
        for (i = 0; i < npat; i++) {

!               if (*((double *)icg->t[0].fdata[i][ci]) < 1e-4
                 && *((double *)icg->t[0].fdata[i][mi]) < 1e-4
                 && *((double *)icg->t[0].fdata[i][yi]) < 1e-4
!                && *((double *)icg->t[0].fdata[i][ki]) < 1e-4) {

                        /* Read the spectral values for this patch */
                        for (j = 0; j < mwsp.spec_n; j++) {
--- 1457,1472 ----
        /* Compute the mean of all the media white patches */
        for (i = 0; i < npat; i++) {

!               if (!isAdditive
!                && *((double *)icg->t[0].fdata[i][ci]) < 1e-4
                 && *((double *)icg->t[0].fdata[i][mi]) < 1e-4
                 && *((double *)icg->t[0].fdata[i][yi]) < 1e-4
!                && *((double *)icg->t[0].fdata[i][ki]) < 1e-4
!               || isAdditive
!                && *((double *)icg->t[0].fdata[i][ci]) > 99.9999
!                && *((double *)icg->t[0].fdata[i][mi]) > 99.9999
!                && *((double *)icg->t[0].fdata[i][yi]) > 99.9999
!               ) {

                        /* Read the spectral values for this patch */
                        for (j = 0; j < mwsp.spec_n; j++) {

Other related posts: