Default ICC profile for CMYK images without embedded profile?

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
giskard22
Posts: 1
Joined: 2016-03-01T12:03:10-07:00
Authentication code: 1151

Default ICC profile for CMYK images without embedded profile?

Post by giskard22 »

I'm converting files to RGB JPEGs. Specifically, I'm using `-profile /path/to/sRGB.icc -colorspace sRGB`. Inputs are mostly CMYK TIFFs, but could be RGB and/or JPEG. The output file's colors closely match the input when the input image has an embedded ICC profile. For CMYK inputs without an embedded profile, there is a significant change in appearance.

I'm trying to figure out how to resolve this within certain limitations. The convert command is being run as a call-out from another process. I can only run a one-line command that is valid for all input images; I cannot write a whole script with logic built in. (I'm not even sure I can use bash built-ins.) For example, I can fix the specific problem if I change the command to `-profile /path/to/CMYK.icc -profile /path/to/sRGB.icc -colorspace sRGB`. But that would add extra conversions for most other images, decreasing output quality.

In programs like Photoshop, you assign default profiles that are used when needed. I thought that might be relevant here. Is there somewhere to assign or provide a default CMYK profile?

If not, any other ideas?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Default ICC profile for CMYK images without embedded profile?

Post by snibgo »

Can you use back-quotes within your command? If not, then I can't see a solution.

Using "-profile /path/to/CMYK.icc -profile /path/to/sRGB.icc -colorspace sRGB" should work for all CMYK files, whether or not they already have profiles. It should also work on images in any colorspace, provided they have embedded profiles.

It won't work on sRGB images that have no profile.
snibgo's IM pages: im.snibgo.com
Post Reply