tif, transparency and CMYK

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

tif, transparency and CMYK

Post by pieterG » 2008-12-17T04:22:35-07:00

I'm new at IM but very impressed by what's possible.

What I cannot find is the following.... I've got a TIF-image picture with a transparent background in colorspace RGB
I want it in colorspace CMYK, with the transparency kept of course. It just doesn't work. It stays RGB.

Only if I take the original as a RGB JPG image, the background is white now, it converts to a CMYK TIF image,

Trying the following afterwards;

convert imageCMYK.tif -transparent white imageCMYKtransp.tif

It returned the image to the RGB colorspace again...

Anyone on how to convert my RGB tifs to CMYK tifs preserving the transparancy?

User avatar
Site Admin
Posts: 10574
Joined: 2003-05-31T11:32:55-07:00

Re: tif, transparency and CMYK

Post by magick » 2008-12-17T06:56:32-07:00

ImageMagick supports CMYKA but some of the options require the RGB colorspace such as -draw. However, -transparent does not. Note you will need to specify the transparent color in CMYK. Instead of -transparent white use -transparent 'cmyk(?,?,?,?)' where ? is whatever 0-255 value is needed to specify white. If that fails, make sure you have a current release of ImageMagick and try again.


Re: tif, transparency and CMYK

Post by pieterG » 2008-12-18T03:25:14-07:00

I've tried again.

Even with the latest version (ImageMagick-6.4.7-10-Q16-windows-dll.exe, tried on XP pro and VISTA home premium) I've got no success.

All my steps in a row;

I have got a picture. imageRGB.tif the background is transparent, colorspace is RGB. I want the colorspace to be CMYK.

Code: Select all

convert imageRGB.tif -colorspace CMYK imageCMYK.tif 
does not work

Code: Select all

convert imageRGB.jpg -colorspace CMYK imageCMYK.tif 
does work but then I need to add the transparency afterwards as .jpg does not allow transparency. After that I tried

Code: Select all

convert imageCMYK.tif -transparent "cmyk(0,0,0,0)" imageCMYKwithTransparency.tif 
This does not work either. It just returns this message "convert: Too many color components: 5, max 4. `JPEGLib' @ tiff.c/TIFFErrors/324."

Why can't is convert a RGB tif straight to a CMYK tif? Is this a bug? Am I missing something?

Post Reply

Who is online

Users browsing this forum: el_supremo and 17 guests