Page 1 of 1

Incorrect color display with CMYK images

Posted: 2010-08-29T03:04:31-07:00
by harrison
Found ImageMagick Display can't display CMYK colors correctly, see images created by Adobe Photoshop CS2, the dark blue color around the image is shown as green color.

Images are uploaded at: http://drop.io/8mqwjur

Re: Incorrect color display with CMYK images

Posted: 2010-08-29T10:50:42-07:00
by fmw42
if you add profiles to the display command before your image, then it converts to rgb and displays properly

display -profile <cmykprofile> -profile <rgbprofile> cmykimage

Re: Incorrect color display with CMYK images

Posted: 2010-08-29T14:36:12-07:00
by Drarakel
And for those special test files, you probably only need:
display -profile <rgbprofile> cmykimage
(Or perhaps "display -colorspace RGB cmykimage". But that one won't be as good.)

Apart from that..
harrison wrote:the dark blue color around the image is shown as green color
Where is a "dark blue color" in the images? I only see a lot of green (also in the 'Adobe Photoshop display.png' screenshot).

Re: Incorrect color display with CMYK images

Posted: 2010-09-03T08:35:30-07:00
by harrison
Sorry, should be the "the dark-green color around the image is shown wrongly as light-green color"

The CMYK images can be displayed correctly by Windows Picture and Fax Viewer also.

It seems ImageMagick has a bug to handle such CMYK image embedded with ICC profile.

Re: Incorrect color display with CMYK images

Posted: 2010-09-03T15:30:45-07:00
by Drarakel
I first thought that you were using partly Windows, partly Mac (or something). But now, it seems that you're only on Windows. You should have said that. :wink:
So, you're talking about 'IMDisplay', not 'display' - right? (These are different applications for different operating systems.)

If yes, then the described behaviour is not a bug. 'imdisplay' has to display the pictures as RGB - and probably does so by using something similar to "convert -colorspace RGB". That's only a rough conversion.
You will get the correct colors by using color profiles (with "convert") and feeding that result to imdisplay (or any other viewer). Your CMYK files already have embedded source color profiles. But you have to specify the destination color profile, e.g. a sRGB profile. ImageMagick (or ImageMagick's imdisplay) won't just assume some destination profile.
See also:
http://www.imagemagick.org/script/comma ... colorspace
http://www.imagemagick.org/Usage/formats/#color_profile

By the way: The Windows Picture Viewer (also the Microsoft Office Picture Manager) uses some color profiles per default, but not always in a correct manner. The conversion is usually better as with "-colorspace RGB". But with CMYK pictures, you won't get totally correct colors - as Windows uses some sort of hardcoded profiles there, and ignores the embedded profiles (at least on my Windows).