Converting CMYK JPEG's 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
cchd
Posts: 2
Joined: 2011-05-29T12:09:00-07:00
Authentication code: 8675308

Converting CMYK JPEG's to RGB

Post by cchd » 2011-05-29T14:54:22-07:00

I have many JPEG's produced by pdf2html from a professional Quark-generated pdf source. The identify command says these are in the CMYK colorspace but do not have any profile.

I have tried converting them from CMYK to RGB using -colorspace RGB and also with -profile parameters and two different sets of downloaded profiles.

In all cases the resulting jpg seems identical (through Gwenview or a browser) to the original, though identify confirms that it has been processed.

To save space here I have posted the details on http://archives.felsted.org/pdfprob/

Can anyone save me from banging my head on this brick wall?

User avatar
fmw42
Posts: 25656
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting CMYK JPEG's to RGB

Post by fmw42 » 2011-05-29T16:13:12-07:00

I believe that your image may be a negated (by your software?) CMYK. The following seems to work for me.

convert index-1_8.jpg -negate -profile Profiles/USWebCoatedSWOP.icc -profile Profiles/sRGB.icc index-1_8_neg_uswebswop_srgb.jpg

But I will defer to others more expert than I with CMYK images.

cchd
Posts: 2
Joined: 2011-05-29T12:09:00-07:00
Authentication code: 8675308

Re: Converting CMYK JPEG's to RGB

Post by cchd » 2011-05-30T00:03:34-07:00

You are FANTASTIC! Very many thanks. The '-negate' is the answer, and it works in all varieties of the commands I tried - whichever [sensible] color profiles I use, and even with the simple convert -negate -colorspace RGB index-1_8.jpg rgb6.jpg.

[The results from use of the different profile files are probably slightly different, but not to my untutored eye.]

But once again, many thanks, and I can now proceed with this project.

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Converting CMYK JPEG's to RGB

Post by anthony » 2011-05-30T19:01:40-07:00

RGB and CMY are just a -negate of the colorspace.
Note however the CMYK has the extra complication of a 'Black'.
Black = minimum of CMY, which is then subtracted for all channels. As such for any specific pixel one CMY channel value will be zero!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

Post Reply