Conversion from sRGB to CMYK: difference between JPEG and PDF

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
nathankerstens
Posts: 2
Joined: 2019-07-18T16:01:17-07:00
Authentication code: 1152

Conversion from sRGB to CMYK: difference between JPEG and PDF

Post by nathankerstens »

Hi all

I have the following source JPEG (in RGB colorspace):
Image

When I convert this image with the following command,

Code: Select all

convert source.jpg -profile "sRGB.icm" -profile "PSOcoated_v3.icc" cmyk.jpg
I get the following result:
Image

When converting it to a pdf, however, I get the following result:
http://pietercampo.be/magick/cmyk.pdf
I used this command:

Code: Select all

convert source.jpg -profile "sRGB.icm" -profile "PSOcoated_v3.icc" cmyk.pdf
The image in cmyk.pdf is in CMYK colorspace:

Code: Select all

pdfimages -list cmyk.pdf 

page   num  type   width height color comp bpc  enc interp  object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
   1     0 image    2592  1944  cmyk    4   8  jpeg   no         8  0    72    72 4341K  22%
Why the difference? Is this normal/common? Should the result be the same?

Thanks in advance!

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

Re: Conversion from sRGB to CMYK: difference between JPEG and PDF

Post by fmw42 »

Different profiles have different ranges of color gamuts. So it is not unexpected to see difference.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Conversion from sRGB to CMYK: difference between JPEG and PDF

Post by snibgo »

@nathankerstens : I can't see any difference. What difference do you see?

As Fred says, a gamut difference in different profiles can change colours slightly, especially if colours are saturated. But I can't see a problem here.
snibgo's IM pages: im.snibgo.com
nathankerstens
Posts: 2
Joined: 2019-07-18T16:01:17-07:00
Authentication code: 1152

Re: Conversion from sRGB to CMYK: difference between JPEG and PDF

Post by nathankerstens »

@snibgo: After you saying this, I checked on my phone, and there the difference is indeed very small, if existent at all. On my computer it's rather big. Like you guys said: that's just how it is then?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Conversion from sRGB to CMYK: difference between JPEG and PDF

Post by snibgo »

What software are you using to view the results? Some software will ignore embedded profiles, perhaps assuming the encoding is some "standard" like sRGB. Some software (such as Firefox) has settings to control this. For PDFs, I view with Adobe Acrobat Reader. I don't know how good that is with profiles.
snibgo's IM pages: im.snibgo.com
Post Reply