Splitting a CMYK Image

O

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

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?
 
M

Marco Schmidt

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top