CMYK to RGB

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
digilover

CMYK to RGB

Post by digilover »

Using iMagick I've converted a CMYK EPS file to RGB JPEG. The colours however, are quite different after conversion with for example the main dark blue being converted to a more vibrant blue.

Is there anything I need to bear in mind when converting from CMYK to RGB? I've seen people talk about color profiles and colorspaces but to be honest I don't know much about them.

I tried explicitly setting the colorspace using:

Code: Select all

$im->setImageColorspace(Imagick::COLORSPACE_RGB);
but no joy.

I've not posted in the iMagick forum as I think this is probably more a fundamental ImageMagick question than it is an iMagick question but correct me if I'm wrong.

Can anyone shed any light on why I'm getting the color transformations and what I can do to prevent it?

Thanks,

James.
digilover

Re: CMYK to RGB

Post by digilover »

After some more searching I found some notes on getting Ghostscript to convert CMYK to RGB more effectively as apparently the default conversion isn't very good. I checked out this page: http://john.ukmn.com/2007/06/19/imagema ... yk-to-rgb/ but unfortunately it didn't work for me though I have a feeling I could be missing something.

Any advice appreciated.

James.
digilover

Re: CMYK to RGB

Post by digilover »

Please ignore my stupidity, I edited the wrong file. The -dUseCIEColour command line flag worked a treat after all.

James.
2levelsabove

Re: CMYK to RGB

Post by 2levelsabove »

Yes that advice worked great. I was having same issues with converting PDF's to JPEGS.



Thanks
mondobizzaro

Re: CMYK to RGB

Post by mondobizzaro »

How do I convert a jpeg image from cmyk to rgb if I have to use the command line tools?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: CMYK to RGB

Post by magick »

To properly convert a CMYK JPEG to RGB you need color profiles. The fastest method is simply:
  • convert cmyk.jpg -colorspace rgb rgb.jpg
mondobizzaro

Re: CMYK to RGB

Post by mondobizzaro »

Great, thanks!
Post Reply