I'm trying to get lcms to properly construct a Lab profile to match the data for a Lab colorspace that is described in a PDF.

Logic tells me that it should just be:

* Load the XYZ values from the Lab colorspace data
* Convert XYZ to xyY
* CreateLabProfile
* Create transforms between that and the output profile, with TYPE_Lab_8 data

and then send the data into the transform...

What am I missing?!?!?

Leonard
P.S. Here is the actual code snippet to back up what I wrote above.


{
         CMSErrorHandler myErrorHandler;

        // create the profile based conversions
         cmsCIEXYZ        labXYZ;
         cmsCIExyY        labWhitePoint;
        labXYZ.X = ASFixedToDouble( whiteX );
        labXYZ.Y = ASFixedToDouble( whiteY );
        labXYZ.Z = ASFixedToDouble( whiteZ );
         cmsXYZ2xyY( &labWhitePoint, &labXYZ );
        
         mlabProfile = cmsCreateLabProfile( &labWhitePoint );
         mGrayConverter = new ColorConverter( mLog, mlabProfile, grayProfile, TYPE_Lab_8, TYPE_GRAY_8 );
         mRGBConverter = new ColorConverter( mLog, mlabProfile, rgbProfile, TYPE_Lab_8, TYPE_RGB_8,
                                                 inConverter.GetCurrentRGBIntent() );
         mCMYKConverter = new ColorConverter( mLog, mlabProfile, cmykProfile, TYPE_Lab_8,                                                  TYPE_CMYK_8, inConverter.GetCurrentCMYKIntent() );
}

---------------------------------------------------------------------------
Leonard Rosenthol                            < mailto:[EMAIL PROTECTED]>
Chief Technical Officer                      < http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                             215-938-0880 (fax)

Reply via email to