-separete -combine error

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
anakein

-separete -combine error

Post by anakein »

I put this:
convert img.jpg -colorspace CMYK -channel C -separate imgx_C.gif
convert img.jpg -colorspace CMYK -channel Y -separate imgx_Y.gif
convert img.jpg -colorspace CMYK -channel M -separate imgx_M.gif
convert img.jpg -colorspace CMYK -channel K -separate imgx_K.gif

I have one error, K channel is mirror image from original image, I solved with : convert img.jpg -colorspace CMYK -flip -rotate 180 -channel K -separate imgx_K.gif

but....

if I want combine image again with:
convert imgx_C.gif imgx_Y.gif imgx_M.gif imgx_K2.gif -channel cmyk -combine final.gif

I have wrong image with strange color.
Why?
Can anynody help me?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -separete -combine error

Post by fmw42 »

try

convert imgx_C.gif imgx_Y.gif imgx_M.gif imgx_K2.gif -set channel cmyk -combine final_cmyk.jpg

see http://www.imagemagick.org/Usage/channe ... bine_other

Note that this works fine for me with no mirror on IM 6.5.9-5 Q16. Perhaps you need to upgrade your IM.

convert logo: -colorspace CMYK -channel K -separate logo2_K.gif

Also the convert to cmyk, you don't have to separate channels, but gif does not supports cmyk (4 channels), but jpg does.

convert logo: -colorspace CMYK logo2_cmyk.jpg
Post Reply