Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Splitting a CMYK Image

Reply
Thread Tools

Splitting a CMYK Image

 
 
Oracle3001
Guest
Posts: n/a
 
      10-03-2003
If I have an RGB image, I know I can split it into the 3 grey-scale images,
by applying the following AND bitwise masking

int r = (c & 0xff0000) >> 16;

int g = (c & 0xff00) >> 8;

int b = c & 0xff;



If I have an image in CMYK, what is the bitwise AND masking I require to
extract the 4 greyscale images representing one for each colour?



 
Reply With Quote
 
 
 
 
Marco Schmidt
Guest
Posts: n/a
 
      10-04-2003
Oracle3001:

>If I have an RGB image, I know I can split it into the 3 grey-scale images,
>by applying the following AND bitwise masking

[...]
>If I have an image in CMYK, what is the bitwise AND masking I require to
>extract the 4 greyscale images representing one for each colour?


That depends on the encoding which was used. Where do you get those
CMYK samples from?

Anyway, you could just try a couple of straight-forward encodings,
e.g.

cyan = (c & 0xff000000) >> 24;
magenta = (c & 0x00ff0000) >> 16;
yellow = (c & 0x0000ff00) >> 8;
black = c & 0xff;

Regards,
Marco
--
Please reply in the newsgroup, not by email!
Java programming tips: http://jiu.sourceforge.net/javatips.html
Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need low resource, simple image editor that handles CMYK, Tif, andpostscript. mechphisto@gmail.com Digital Photography 5 01-12-2008 08:15 PM
CMYK colour spaces and RGB-CMYK conversion Alfred Molon Digital Photography 3 06-26-2005 06:26 PM
Re: Splitting up the definitions of a class into different files (splitting public from private)? John Dibling C++ 0 07-19-2003 04:41 PM
Re: Splitting up the definitions of a class into different files (splitting public from private)? Mark C++ 0 07-19-2003 04:24 PM
Re: Splitting up the definitions of a class into different files (splitting public from private)? John Ericson C++ 0 07-19-2003 04:03 PM



Advertisments