Color distortion with ICC 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
fcaserio
Posts: 26
Joined: 2007-03-19T15:22:12-07:00

Color distortion with ICC profile

Post by fcaserio »

I'm having huge color distortion on CMYK images with embedded ICC profiles when converting it to RGB.
The resulting image is a lot lighter then the original.
When the image is converted to RGB on Photoshop (CS2) there is no distortion.

The command-line I'm using are:
1. CMYK to RGB:
convert -quality 92 +profile icc +profile icm -profile cmyk_photoshopcs2.icc VIP0387.cmykpcs2.jpg -profile rgb_photoshopcs2.icc VIP0387.rgbim.jpg
2. Just creating CMYK with IM (Even the CMYK JPG created by IM is showing difference from the original CMYK):
convert -quality 92 +profile icc +profile icm VIP0387.cmykpcs2.jpg VIP0387.cmykim.jpg

My images can be found at:
http://www.acasa.org.br/temp/VIP0387.cmykpcs2.jpg (original file)
http://www.acasa.org.br/temp/VIP0387.rgbpcs2.jpg (rgb created by photoshop CS2, with no distortion)
http://www.acasa.org.br/temp/VIP0387.rgbim.jpg (rgb created by IM)
http://www.acasa.org.br/temp/VIP0387.cmykim.jpg (cmyk created by IM)

The ICC profile is described with identify -verbose as:
Profile-icc: 724088 bytes
SWOP (Coated), 20%, GCR, Light

Any help is really welcome!!!

[]s
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Color distortion with ICC profile

Post by magick »

We used this command:
  • convert VIP0387.cmykpcs2.jpg -profile sRGB.icm VIP0387.rgbim.jpg
and we got similar results to those produced by Photoshop. The MAE normalized metric (see the compare command) was
  • 0.00392104
The MAE metric for your IM produced image is
  • 0.0219278
Which is a much greater difference. We're using ImageMagick 6.3.6-2.
fcaserio
Posts: 26
Joined: 2007-03-19T15:22:12-07:00

Re: Color distortion with ICC profile

Post by fcaserio »

Tks

That worked to convert a JPG CMYK (with ICC profile) to JPG RGB
But if my original file is a EPS CMYK (with ICC profile) I still have the same problem.

On both cases the resulting JPG RGB is a lot lighter then the JPG RGB created from Photoshop, using my original command-line or the suggested command-line:

Code: Select all

convert -quality 92 +profile icc +profile icm -profile cmyk_photoshopcs2.icc VIP0387.eps -profile rgb_photoshopcs2.icc VIP0387.rgbim.jpg
convert -quality 92 VIP0387.eps -profile sRGB.icm VIP0387.rgbim.jpg
My EPS file can be found at:
http://www.acasa.org.br/temp/VIP0387.eps

My profiles also can be found there (both exported from Photoshop CS2):
http://www.acasa.org.br/temp/rgb_photoshopcs2.icc
http://www.acasa.org.br/temp/cmyk_photoshopcs2.icc

I'm using IM 6.3.5-q16

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

Re: Color distortion with ICC profile

Post by magick »

EPS images are rendered by Ghostscript. Next we pass the pixels to the LCMS delegate for color conversion with profiles. Photoshop may have other processing options you did not account for such as gamma correction. Finally Photoshop's JPEG library may differ from the JPEG delegate library ImageMagick uses (JPEG is a lossy format, some color information is tossed). Any of these can account for minor differences in color appearance between an image processed by ImageMagick and one processed by Photoshop.
Post Reply