Generate CMYK tif image from C, M, Y, K tif images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rubenedoc
Posts: 9
Joined: 2013-04-29T03:33:53-07:00
Authentication code: 6789

Generate CMYK tif image from C, M, Y, K tif images

Post by rubenedoc »

Hi guys,

I have 4 1-bit tif images ( one tif for each color CMYK), and I would like to combine them to get one tif with all CMYK colors.
How can I get this?

I used CopyMagenta, CopyYellow and CopyBlack, but it didn´t work fine, because black color seems not to be copied.

I´m using ImageMagick 6.8.4-10 for Linux.

Thanks in advance for your help.
bugbear
Posts: 33
Joined: 2010-10-21T03:06:35-07:00
Authentication code: 8675308

Re: Generate CMYK tif image from C, M, Y, K tif images

Post by bugbear »

http://www.imagemagick.org/Usage/color_ ... bine_other

However, I suspect you'll want to "inverse halftone" your files first, via blur and sub-sampling.

BugBear
rubenedoc
Posts: 9
Joined: 2013-04-29T03:33:53-07:00
Authentication code: 6789

Re: Generate CMYK tif image from C, M, Y, K tif images

Post by rubenedoc »

Hi bugbear, thanks for your fast reply.

I did this:

Code: Select all

convert image_?.tif -set colorspace CMYK -combine -colorspace RGB -negate  result_1.tif
convert image_?.tif -set colorspace CMYK -combine -colorspace CMYK -negate  result_2.tif
and both result_1.tif and result-2.tif are not correct. The results have 4 channels, but thay have no sense (sorry, I cannot attach the images).

I tried the following, where 1-2-3-4 are C-M-Y-K:

Code: Select all

convert image_1.tif bmp1.bmp
convert image_2.tif bmp2.bmp
convert image_3.tif bmp3.bmp
convert image_4.tif bmp4.bmp
convert bmp_?.bmp -set colorspace Gray -combine -colorspace CMYK combined_result.tif
and it works fine but there is NOT black color. It seems K-channel is not applied. This issue happens with CopyBlack, too.

Thank you very much in advance for your help.
rubenedoc
Posts: 9
Joined: 2013-04-29T03:33:53-07:00
Authentication code: 6789

Re: Generate CMYK tif image from C, M, Y, K tif images

Post by rubenedoc »

Hey guys,

I think I found a solution by myself.

I´ve been watching the examples here http://www.imagemagick.org/Usage/color_ ... bine_other, and I have realized that in separated images, white color means there is "a lot" of the corresponding color. For example, in the separated image for cyan color, when there is a white area means that this area has a lot of cyan color.

So, in my particular case, I just had to convert .tif images to .gif images, then negate the .gif images and then combine them:

Code: Select all

convert image_1.tif imageO_1.gif
convert image_2.tif imageO_2.gif
convert image_3.tif imageO_3.gif
convert image_4.tif imageO_4.gif
convert imageO_1.gif -negate imageO_1.gif
convert imageO_2.gif -negate imageO_2.gif
convert imageO_3.gif -negate imageO_3.gif
convert imageO_4.gif -negate imageO_4.gif
convert imageO_?.gif -set colorspace CMYK -combine -colorspace CMYK result.gif
Thank you very much for your help!
bugbear
Posts: 33
Joined: 2010-10-21T03:06:35-07:00
Authentication code: 8675308

Re: Generate CMYK tif image from C, M, Y, K tif images

Post by bugbear »

Using some test data I had lying around, I came up with this (escaped for Unix shell)

Code: Select all

convert \( half.c -depth 8 -blur 8x8  -resize '12.5%x12.5%' -negate \) \
\( half.m -depth 8 -blur 8x8  -resize '12.5%x12.5%' -negate \) \
\( half.y -depth 8 -blur 8x8  -resize '12.5%x12.5%' -negate \) \
\( half.k -depth 8 -blur 8x8  -resize '12.5%x12.5%' -negate \) \
-set colorspace CMYK  -combine v_cmyk.tif
The test data is:

Code: Select all

identify half.c
half.c TIFF 3000x3729 3000x3729+0+0 1-bit Bilevel DirectClass 1.399MB 0.000u 0:00.009
And I used:

Code: Select all

identify -version
Version: ImageMagick 6.7.7-10 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP    

BugBear
Post Reply