Marti,

is it useful to place the matrix simply in the matrix part of a mft2 LUT?
Perhaps this would suffice building a valid XYZ abstract profile?
All other parts of the mft2 can be filled with defaults.

regards
Kai-Uwe Behrmann
                                + development for color management 
                                + imaging / panoramas
                                + email: [EMAIL PROTECTED]
                                + http://www.behrmann.name


Am 07.09.05, 11:52 +0200 schrieb Marti:

> 
> Hi,
> The matrix XYZ -
> > I'm trying to write a little application that produces ICC profiles  for
> > the simulation of color blindness (deuteranopia and protanopia). 
> 
> I think the correct way to deal with that would be to build an
> abstract XYZ -> XYZ profile holding the simulation. In this
> way you got no dependencies on any RGB space.
> 
> XYZ can be readily obtained by chaining XYZ to LMS and LMS to XYZ matrices.
> You need not RGB anymore because all that is handled by the input/output
> profiles.  A multiprofile transform may be used latter to obtain the RGB ->
> RGB, by means of icclink, for example.
> 
> As additional benefit you are not restricted to RGB anymore.
> 
> For bulding such abstract profile, you need a something like:
> 
> hProfile = cmsOpenProfileFromFile("abstract.icc", "w");
> AToB0 = cmsAllocLUT();
> cmsAlloc3DGrid(AToB0, GRID_POINTS, 3, 3);
> cmsSample3DGrid(AToB0, Forward, NULL, 0);
> cmsAddTag(hProfile, icSigAToB0Tag, AToB0);
> cmsSetColorSpace(hProfile, icSigXYZData);
> cmsSetPCS(hProfile, icSigXYZData);
> cmsSetDeviceClass(hProfile, icSigAbstractClass);
> cmsCloseProfile(hProfile);
> cmsFreeLUT(AToB0);
> 
> Then, you need to write the callback:
> 
> static
> int Forward(register WORD In[], register WORD Out[], register LPVOID Cargo)
> { cmsCIEXYZ XYZ;
> cmsXYZEncoded2Float(&XYZ, In);
> // ... apply here the transform XYZ = [M] * XYZ
> cmsFloat2XYZEncoded(Out, &XYZ);
> return TRUE;
> }
> 
> Hope this helps
> Regards,
> --
> Marti Maria
> The littlecms project.
> www.littlecms.com
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.18/91 - Release Date: 06/09/2005
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Lcms-user mailing list
> Lcms-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lcms-user
> 
> 

Mit freundlichen Grüßen
Kai-Uwe Behrmann
                                + Programmierung für
                                + Farbmanagement / Bilder / Panoramen
                                + http://www.behrmann.name
                                + email: [EMAIL PROTECTED]

Reply via email to