Good!

That can be done too..! But
accuracy/compliance-with-standards could be an issue.

Reference:
http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html

RGB -> CMYK
Black=minimum(1-Red,1-Green,1-Blue)
Cyan=(1-Red-Black)/(1-Black)
Magenta=(1-Green-Black)/(1-Black)
Yellow=(1-Blue-Black)/(1-Black)

CMYK -> RGB
Red=1-minimum(1,Cyan*(1-Black)+Black)
Green=1-minimum(1,Magenta*(1-Black)+Black)
Blue=1-minimum(1,Yellow*(1-Black)+Black)

NOTE: C, M, Y, K, R, G, and B  have a range of [0;1].

CAUTION: CMYK is hardware dependent profile and there
is something called ICM profile which you have to
follow. Why are you so strictly sticking to CMYK? Be
careful!

Hope that helps!

warm regards,
- Divya Rathore
www.ryze.com/go/divyarathore


--- Vorpal Swordsman <[EMAIL PROTECTED]> wrote:

> That seems straight-forward enough.
> Now for the next wrinkle...
> 
> The separations are in CMYK space, the output will
> be RGB.
> I'll start w/ SourceForge and carry on from there.
> 
> --Vorpal
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Divya Rathore
> Sent: Thursday, February 24, 2005 23:17
> To: [email protected]
> Subject: Re: [msvc] TIF and other image type
> manipulation
> 
> 
> Your problem can be broken into 2 parts..
> 
> 1. Handling TIF images. Do you have the capability
> of
> decoding TIF images? And encoding an image array
> into
> TIF format? If YES, Go straight to point-2. If NO,
> try
> to get an open source TIF reader/writer source code.
> www.sourceforge.net might be of help.
> 
> 2. Once point-1 above is sorted out, forming a
> 'composite image' from color separations is pretty
> easy. Assuming that you are working in RGB color
> space, following snippet should be indicative
> enough:
> ------------------------------------
> int composite_image[width*height*3]; // so as to
> handle RGB triples.
> int counter = 0; // to be used later.
> int Red[width][height]; // you already have this.
> int Green[width][height]; // you already have this.
> int Blue[width][height]; // you already have this.
> // Assuming that you have Red, Green, Blue
> // arrays with you..
> for (int i=0; i<width; i++)
> {
>     for (int j=0; j<height; j++)
>     {
>         composite_image[counter++] = Red[i][j];
>         composite_image[counter++] = Green[i][j];
>         composite_image[counter++] = Blue[i][j];
>     }
> }
> // After this loop 'composite_image' array is
> // ready to be fed to the TIF encoder so as to
> // form a color image.
> ---------------------------------------------
> 
> This of course is an answer and not the solution :)
> Feel free to revert back.
> 
> warm regards,
> - Divya Rathore
> www.ryze.com/go/divyarathore
> 
> 
> > ----- Original Message -----
> > From: "Vorpal Swordsman" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Thursday, February 24, 2005 9:43 PM
> > Subject: [msvc] TIF and other image type
> > manipulation
> >
> >
> > >
> > > Hi all,
> > > I'm beginning to research the feasibility of
> > creating a program to do some
> > > rather specific image manipulation of .tif
> files.
> > Specifically, I want to
> > > merge colour separations into a composite image.
> > >
> > > Can someone please suggest a resource where I
> > might find algorithms,
> > > classes
> > > or templates that would get me started?
> > >
> > > TIA
> > > Vorpal
> > >
> > >
> > > _______________________________________________
> > > msvc mailing list
> > > [email protected]
> > > See
> >
>
http://beginthread.com/mailman/listinfo/msvc_beginthread.com
> > for
> > > subscription changes, and list archive.
> > >
> >
> >
> >
> > _______________________________________________
> > msvc mailing list
> > [email protected]
> > See
> >
>
http://beginthread.com/mailman/listinfo/msvc_beginthread.com
> > for subscription changes, and list archive.
> >
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
> 
> _______________________________________________
> msvc mailing list
> [email protected]
> See
>
http://beginthread.com/mailman/listinfo/msvc_beginthread.com
> for
> subscription changes, and list archive.
> 
> 
> _______________________________________________
> msvc mailing list
> [email protected]
> See
>
http://beginthread.com/mailman/listinfo/msvc_beginthread.com
> for subscription changes, and list archive.
> 



        
                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to