Hi,

Casper, one of the Krita hackers asked me to ask the about following:

---

After having used lcms to do some lightness transformation using the following 
code I've come across a problem.

My code tries to convert from a working colorspace to lab and back. But whil 
in lab it modifies the L* channel with the use of a transfer table.

The trouble is that white pixels are not touched. Even if I set the 
transform / gamme table to all zero the white pixels remain white. 

Am I doing something wrong or is there a bug in lcms:

    LPGAMMATABLE transferFunctions[3];
    transferFunctions[0] = cmsBuildGamma(256, 1.0);
    transferFunctions[1] = cmsBuildGamma(256, 1.0);
    transferFunctions[2] = cmsBuildGamma(256, 1.0);

    for(int i =0; i < 256; i++)
        transferFunctions[0]->GammaTable[i] = transferValues[i];

    profiles[1] = cmsCreateLinearizationDeviceLink(icSigLabData, 
                                              transferFunctions);
    cmsSetDeviceClass(profiles[1], icSigAbstractClass);

    profiles[0] = m_profile->profile();
    profiles[2] = m_profile->profile();
    
    transform  = cmsCreateMultiprofileTransform(adj->profiles, 3, m_cmType,     
       
                    m_cmType, INTENT_PERCEPTUAL, 0);

    cmsDoTransform(transform, src, dst, nPixels);
---

Any idea?
-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi

Attachment: pgpDI3zfh026a.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to