how to set colorspace prior to a long series of converts

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
wfzimmerman
Posts: 8
Joined: 2013-04-17T11:31:14-07:00
Authentication code: 6789

how to set colorspace prior to a long series of converts

Post by wfzimmerman »

hi,

I want to set the colorspace as CMYK prior to a long series of (independent) convert commands in a bash script, then return it to sRGB when the script is done. How do I do that?

FredZ
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to set colorspace prior to a long series of converts

Post by snibgo »

Each convert command is independent of the others. You might use a shell variable in each convert command, of course.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to set colorspace prior to a long series of converts

Post by fmw42 »

convert image -colorspace CMYK tempimage
...
convert tempimage -colorspace sRGB result

HOWEVER, it is not recommended to process in CMYK colorspace. Many IM functions assume that the colorspace is RGB not CMYK and will not function properly if it is not RGB
Post Reply