Question on ICC profile conversion behaviour - answered

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
fredrik@axpa.se

Question on ICC profile conversion behaviour - answered

Post by fredrik@axpa.se » 2009-01-13T07:19:00-07:00

I have not been able to find any documentation on this, so I thought I should just ask.

If I do a CMYK - RGB conversion from the command line using -profile, does an embedded profile override one that is defined in the command?

Example:

convert CMYK.tif -profile "CMYK.icc" -profile "RGB.icc" RGB.tiff

This should use CMYK.icc as the in-profile and RGB.icc as the out-profile.
But what if the image CMYK.tiff already has an embedded profile?

Is one of the cmyk-profiles ignored?
If so, which one: the embedded or the command line one?
If not, will the command invoke a CMYK-CMYK-RGB conversion?

Thanks

Fredrik
Last edited by fredrik@axpa.se on 2009-01-14T06:45:50-07:00, edited 1 time in total.

fredrik@axpa.se

Re: Question on ICC profile conversion behaviour

Post by fredrik@axpa.se » 2009-01-14T06:45:07-07:00

After a bit more testing I think I can answer my own question.

Specifying both "from-profile" and "to-profile" in the command line WILL invoke a double conversion if the original image does contain an ICC profile.

If the original image is CMYK with profile this means that the example:

convert CMYK.tif -profile "CMYK.icc" -profile "RGB.icc" RGB.tiff

results in a CMYK-CMYK-RGB conversion.

What is more:
Since ICC profiles are not necessarily symmetric (meaning that conversion to profile and from profile can be different) the extra conversion step can make a lot of difference.
CMYK profiles are often VERY assymetric since they involve 3->4 and 4->3 channel mapping.

So you always need to know if your original image has an included profile or not when you do conversions.

It would be great if this could be documented somewhere.

Best regards
Fredrik

User avatar
magick
Site Admin
Posts: 10690
Joined: 2003-05-31T11:32:55-07:00

Re: Question on ICC profile conversion behaviour - answered

Post by magick » 2009-01-14T07:16:57-07:00

We'll update the documentation within a day or two. Thanks.

Post Reply