Thanks, Marti--

After further testing, I'm thinking that lcms is indeed working properly and
that the other profile library I got is in error.

Interestingly, Lab=0,0,0 never gives 0,0,0,255 for any of the cmyk profiles
I used, even though the resulting cmyk values are pretty close to black....

Thanks again

Richard

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:lcms-user-admin@;lists.sourceforge.net]On Behalf Of Mart� Maria
Sent: Monday, October 21, 2002 6:19 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Lcms-user] Lab to CMYK problems


Hi,

Humm... Your code seems ok.
Have you tried icctrans utility? If it gives same (bad) result, please
send me and cmyk profile example and I will take a look.

A good check point could be Lab=0,0,0 This should give
CMYK=0,0,0,255

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


> I'm using a Lab to CMYK profile.  The resulting CMY values agree fairly
well
> with the results from another profile library, but the returned lcms K
> values are virtually always way too low--they're almost always in the
range
> 0-10.  So, for example, the other profile library returned
>
> (46, 34, 16, 60)
>
> and lcms returned
>
> (47, 35, 19, 4).
>
> Anyone have any suggestions as to what I might be doing wrong?  I'm new to
> lcms....
>
> Thanks in advance.
>
> The code is as follows--the Lab values are passed in as a contiguous array
> "lab" of floats and I'm returning a contiguous array "lcms" of bytes:
>
>     cmsHPROFILE hInProfile, hOutProfile;
>     cmsHTRANSFORM hTransform;
>
>     hInProfile  = cmsCreateLabProfile(NULL);
>     hOutProfile = cmsOpenProfileFromFile(profile, "r");
>     hTransform  = cmsCreateTransform(hInProfile,
>                                            TYPE_Lab_16,
>                                            hOutProfile,
>                                            TYPE_CMYK_8,
>                                            INTENT_PERCEPTUAL, 0);
>
>
> cmsCIELab *llab = new cmsCIELab[count];
> for (i=0; i < count; ++i) {
> llab[i].L = lab[3*i];
> llab[i].a = lab[3*i+1];
> llab[i].b = lab[3*i+2];
> }
>
> WORD wLab[3];
> const double normalize = 100./255.;
> for (i=0; i < count; ++i) {
> cmsFloat2LabEncoded(wLab, llab+i);
> cmsDoTransform(hTransform, wLab, lcms + 4*i, 1);
> for (int j=0; j < 4; ++j)
> lcms[4*i+j] = (int)((float)lcms[4*i+j] * normalize + 0.5);
> }
>     cmsDeleteTransform(hTransform);
>     cmsCloseProfile(hInProfile);
>     cmsCloseProfile(hOutProfile);
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Lcms-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/lcms-user
>
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user



-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future of 
Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) 
program now. http://ad.doubleclick.net/clk;4699841;7576301;v?
http://www.sun.com/javavote
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to