Hi,

I've misunderstood that dwInput and dwOutput are just for indicating
the colorimetrics.
Now I can get the code work well.

Thanks,


------
Takashi Kawasaki <[EMAIL PROTECTED]>
CELARTEM TECHNOLOGY INC. http://www.celartem.com 

> Hi,
> 
> >...
> >Although I've found that cmsSetUserFormatters is just 
> prepared for this 
> >purpose, it seems there're no variable that can be used 
> within the user 
> >program.
> 
> There is a way to do that. Note that cmsSetUserFormatters 
> does have two additional parameters:
> 
> cmsSetUserFormatters(cmsHTRANSFORM hTransform, DWORD dwInput, 
>  cmsFORMATTER Input,
>                                                               
>  DWORD dwOutput, cmsFORMATTER Output)
> 
> Then, dwInput and dwOutput are stored as "user cargo" into 
> InputFormat and OutputFormat members of LPcmsTRANSFORM 
> struct. Since they are unsigned 32 bits values, you can use 
> them to keep pointers to your struct.
> 
> Example
> 
> typedef struct {
>                       ... your data
>                     } MY_INFO;
> 
> MY_INFO MyCargo;
> 
> cmsSetUserFormatters(hTransform, (DWORD) &MyCargo, MyUnroll,...
> 
> And then
> 
> LPBYTE MyUnroll(
>     register _LPcmsTRANSFORM info,
>     register WORD wIn[],
>     register LPBYTE accum)
>   {
>     MY_INFO *myinfo = (MY_INFO*) info -> InputFormat;
>     ...
>   
> I'm using it in such way in some of my programs.
> 
> Hope this helps
> Marti Maria
> The little cms project
> http://www.littlecms.com
> [EMAIL PROTECTED]
> 
> 
> ----- Original Message -----
> From: "Takashi Kawasaki" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 14, 2004 11:32 AM
> Subject: [Lcms-user] Any user defined parameter for cmsHTRANSFORM ?
> 
> 
> Hi Marti,
> 
> I'm currently create a program that converts the colorspace 
> and layouts
> of Grayscale, RGB, CMYK images.
> Since some information (not color channels) is added to the trail of
> the normal channels, the number of channels (both normal and extra)
> are not fixed.
> Although I've found that cmsSetUserFormatters is just 
> prepared for this
> purpose, it seems there're no variable that can be used within the
> user program. For example:
...



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to