Hello Marti & all lcms users,

First of all, thanks for a great product, it is very well written and
usefull! I have got a question about using the lcms engine in planar
configuration. What i would like to do is offer the engine RGB data, and get
a planar result back. But maybe i misinterpreted the word planar. A code
example would be easyest i think.. Would the following be possible:

//==========================================================================
================================

// RGB value on input is 3 pixels,  rgb 20,30,40, rgb 50, 60,70, rgb 200,
210, 200
// so, data format is RGBRGBRGB in one chunk of data

unsigned char chInput[9] = {20,100,40,  50,70,60,  200,0,220};

// output format is a separate array for c, m, y and k..., all of them three
bytes in this case

char chOutputC[3];
char chOutputM[3];
char chOutputY[3];
char chOutputK[3];

// rest of the abbreviated code

hInProfile  = cmsOpenProfileFromFile("in.icc", "r");
hOutProfile = cmsOpenProfileFromFile("out.icc", "r");
hTransform = cmsCreateTransform(hInProfile, TYPE_RGB_8, hOutProfile,
TYPE_CMYK_8_PLANAR, INTENT_PERCEPTUAL, 0);

// do the transformation in one step...
cmsDoTransform(hTransform, chInput, ?????, 3);  // transform 3 pixels...

//==========================================================================
================================

Of course, this would be possible by converting the data to CMYKCMYKCMYK
format using lcms, and then copying it myself to the separate planes.
However, i think this would give me a speed penalty (does it?) since the
engine might be optimised to do such a conversion directly.
So, my question is: how do i offer the output data to the engine, if this is
at all possible, and what output type do i request from cmsCreateTransform??

Thanks for any suggestions..

Ilja Fiers




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to