Page 1 of 1

CMYK separation - with colored channels

Posted: 2015-09-20T05:58:33-07:00
by Lars-Daniel
Can anyone tell me, how to separate a CMYK into its channels and recolor them?
You can find all the demo files here: http://ge.tt/7OSDMEO2

I've tried different ways, but never had any success... I tried:
viewtopic.php?t=20729
viewtopic.php?t=21353
viewtopic.php?t=15571
http://stackoverflow.com/questions/2127 ... cmyk-black
and others

Sure, this works, but creates greyscale images only:
convert seperate_me.tif -colorspace CMYK -separate separate_CMYK_%d.tif
I tried to recolor them, but -tint 100 introduced some black and greyscale dots or colors. Seems like dithering?

Anyone with an idea? The profile of the incoming CMYK image is ECI v2 300% (current European PrePress standard with 300%)

Re: CMYK separation - with colored channels

Posted: 2015-09-20T06:20:44-07:00
by snibgo
On your first link, "download all" does nothing for me.

Separating an image creates one grayscale image per channel. If you want to colour that grayscale image with the appropriate color, "+level-colors" is convenient. See http://www.imagemagick.org/script/comma ... vel-colors

For example, if you want black to become cyan but white to stay white:

Code: Select all

convert in.png +level-colors cyan,white out.png

Re: CMYK separation - with colored channels

Posted: 2015-09-20T08:35:46-07:00
by Lars-Daniel
snibgo wrote:On your first link, "download all" does nothing for me.
It works now. Seems like there's a cronjob running once an hour or so until the ZIP gets created :D

Re: CMYK separation - with colored channels

Posted: 2015-09-20T09:01:52-07:00
by snibgo
It still does nothing for me. Have I answered your question?

Re: CMYK separation - with colored channels

Posted: 2015-09-20T09:18:11-07:00
by Lars-Daniel
snibgo wrote:It still does nothing for me. Have I answered your question?
partially :) Thanks for your help!

This finally did it for me:

Code: Select all

/usr/bin/convert seperate_me.tif -colorspace cmyk -channel c -negate -separate channel_c.tif
/usr/bin/convert seperate_me.tif -colorspace cmyk -channel m -negate -separate channel_m.tif
/usr/bin/convert seperate_me.tif -colorspace cmyk -channel y -negate -separate channel_y.tif
/usr/bin/convert seperate_me.tif -colorspace cmyk -channel k -negate -separate channel_k.tif

/usr/bin/convert channel_c.tif +level-colors cyan,white channel_c_colored.tif
/usr/bin/convert channel_m.tif +level-colors magenta,white channel_m_colored.tif
/usr/bin/convert channel_y.tif +level-colors yellow,white channel_y_colored.tif
One last thing. I've figured out, the images created in the last step are RGB. Seems like I have to add "-colorspace cmyk", don't I?

Re: CMYK separation - with colored channels

Posted: 2015-09-20T09:46:21-07:00
by snibgo
Good stuff. You can conflate the seven commands into one, if you want, which saves re-reading images. Windows BAT syntax:

Code: Select all

convert ^
  rose: ^
  -colorspace CMYK ^
  -separate -negate ^
  ( -clone 0 ^
    +write channel_c.tif ^
    +level-colors cyan,white ^
    +write channel_c_colored.tif ^
    +delete ) ^
  -delete 0 ^
  ( -clone 0 ^
    +write channel_m.tif ^
    +level-colors magenta,white ^
    +write channel_m_colored.tif ^
    +delete ) ^
  -delete 0 ^
  ( -clone 0 ^
    +write channel_y.tif ^
    +level-colors yellow,white ^
    +write channel_y_colored.tif ^
    +delete ) ^
  -delete 0 ^
  channel_k.tif