converting no icc to cmyk?

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
jedierikb
Posts: 20
Joined: 2012-12-13T13:59:27-07:00
Authentication code: 6789

converting no icc to cmyk?

Post by jedierikb »

I need to simulate opening an RGB file in photoshop and converting to USWebCoatedSWOP.icc

My attempts with convert are not working.

For this example, assume src_rgb.jpg does not have an embedded profile.

Code: Select all

convert src_rgb.jpg -profile USWebCoatedSWOP.icc cmyk.jpg
When I try to open this in Photoshop, I get an error "The embedded ICC profile cannot be used because the ICC profile is invalid. Ignoring the profile."

Any suggestions?
jedierikb
Posts: 20
Joined: 2012-12-13T13:59:27-07:00
Authentication code: 6789

Re: converting no icc to cmyk?

Post by jedierikb »

This code produces images which open in photoshop, and which have the right profile, but their colors are slightly off...

Code: Select all

convert src_rgb.jpg +profile icm -profile sRGB_v4_ICC_preference.icc -profile USWebUncoated.icc src_cmyk.jpg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: converting no icc to cmyk?

Post by snibgo »

For an image that has no profile, "-profile" just adds that profile as a setting in the file without changing pixel values. If your image is sRGB but you add a CMYK profile, software won't like it.

So you should "-profile" to add the correct profile (sRGB), then do another "-profile" which will convert pixel values (in this case from sRGB to CMYK) as well as putting the profile in the file. Colours will be slightly off if you used the wrong sRGB profile.
snibgo's IM pages: im.snibgo.com
jedierikb
Posts: 20
Joined: 2012-12-13T13:59:27-07:00
Authentication code: 6789

Re: converting no icc to cmyk?

Post by jedierikb »

Wow, thanks. I used sRGB_IEC61966-2-1_black_scaled.icc and got much closer to the output in photoshop.

It appears that Photoshop uses, as default, an option called intent saturation.

If I change the preferences in photoshop in the Convert to Profile menu from intent saturation to intent perceptual I get exactly the same output as ImageMagick!

Where/how in ImageMagick would I be able to control that option?
jedierikb
Posts: 20
Joined: 2012-12-13T13:59:27-07:00
Authentication code: 6789

Re: converting no icc to cmyk?

Post by jedierikb »

jedierikb
Posts: 20
Joined: 2012-12-13T13:59:27-07:00
Authentication code: 6789

Re: converting no icc to cmyk?

Post by jedierikb »

Ha.. actually, looks like it was actually

Code: Select all

-black-point-compensation -intent Relative
Post Reply