Page 1 of 1
TIFF RGBa multichannel conversion to CMYK
Posted: 2011-02-03T07:30:57-07:00
by sqlabs
Hello,
I have a TIFF image in RGBa format (RGB plus the alpha channel) and I need to create a new TIFF CMYK image composed by the 4 channels of the source image.
For example the R channel of the source image should became the C channel of the dest image (then G -> M, B->Y and the alpha channel should became the Y channel).
Once done I would need another way to reconvert this TIFF CMYK image back to a RGBa TIFF image reverting this channel conversion process.
Any help would be really appreciated.
Thanks.
Re: TIFF RGBa multichannel conversion to CMYK
Posted: 2011-02-03T11:07:01-07:00
by fmw42
try
convert rgba.tiff -set colorspace cmyk cmyk.tiff
this make r->c, g->m, b->y, a->k
If you want other orders then, you need to use -separate and the shuffled the images around (-swap) and then recombine in the order desired.
see
http://www.imagemagick.org/Usage/channe ... bine_other
Re: TIFF RGBa multichannel conversion to CMYK
Posted: 2011-02-03T16:13:56-07:00
by sqlabs
Do I need to install something more other than imagemagick on OSX?
I continue to receive a segmentation fault error message each time I try to execute the command you suggested me.
Thanks a lot.
Re: TIFF RGBa multichannel conversion to CMYK
Posted: 2011-02-03T16:56:41-07:00
by sqlabs
fmw42:
so far I think to have just one step missed, I need to recombine 4 tif images into one single RGBa image.
(myimages_1.tif, myimages_2.tif, myimages_3.tif, myimages_4.tif)
I tried with a command like:
convert myimages_?.tif -set colorspace RGB -combine -colorspace RGB final_image.tif
but obviously the alpha channel is not set and I guess that myimages_4.tif is not used.
How can I specify myimages_4.tif as the alpha channel for my RGBa final_image.tif?
Thanks a lot for your help.
Re: TIFF RGBa multichannel conversion to CMYK
Posted: 2011-02-03T18:12:21-07:00
by fmw42
I presume each of your 4 images are grayscale and represent rgba channels already. If so try
convert myimages_?.tif -alpha on -channel rgba -colorspace rgb -combine final_image.tif
If that does not work, then
convert myimages_0.tif myimages_1.tiff myimages_3.tiff -colorspace rgb -combine myimages_4.tif -alpha off -compose copy_opacity -composite final_image.tif
That will put the 4th image into the alpha channel. see
http://www.imagemagick.org/Usage/compose/#copyopacity
However, I thought you wanted cmyk?