Page 1 of 1

Photoshop color conversion vs IM color conversion

Posted: 2015-04-28T05:21:52-07:00
by tom_dl
Version: ImageMagick 6.9.0-10 Q16 x64

I have created an ICC profile that I apply to my images. I use this command to apply it to my TIFF files (hitherto without profile):

Code: Select all

convert input.tif -profile myprofile.icc output.tif
When I open output.tif in Photoshop, Photoshop notices the profile and displays the image with its nice new colors. Converting to sRGB effectively bakes these colors in (so applications that don't support profiles can also see the nice new colors). So I don't see a visual difference when I make that conversion (I guess I don't see a difference because the sRGB conversion is effectively done at all times by PS for the GUI so my monitor displays it correctly?).

When I use this command in IM:

Code: Select all

convert input.tif -profile myprofile.icc -profile sRGB.icc output.tif
I expect the same result as Photoshop's sRGB conversion, but the result is considerably different (lower saturation of some colors, overall slightly brighter). If I use -black-point-compensation and -intent options these make no visible difference. Is there something I'm missing, or is this simply a result of LCMS and Adobe ACE engines working differently?

Thanks!

Re: Photoshop color conversion vs IM color conversion

Posted: 2015-04-28T05:39:18-07:00
by snibgo
tom_dl wrote:(I guess I don't see a difference because the sRGB conversion is effectively done at all times by PS for the GUI so my monitor displays it correctly?).
Yes. Whatever profile has been used to encode the image, I expect PS would display exactly the same image (provided there are no gamut issues).
tom_dl wrote:... but the result is considerably different ...
Two or more things influence the results.

1. "-intent" and BPC, but you have tried these.

2. Not all sRGB profiles are the same. Weird but true. When you convert in PS to sRGB, does this embed a profile? If so, you can probably extract the profile from the tiff:

Code: Select all

convert psFile.tiff PSsRGB.icc
Then you can use this profile to get (probably) the same results that PS gives you:

Code: Select all

convert input.tif -profile myprofile.icc -profile PSsRGB.icc output.tif
If you try this, let us know how it goes.

Re: Photoshop color conversion vs IM color conversion

Posted: 2015-04-28T08:29:49-07:00
by tom_dl
The solution for matching PS was:

Code: Select all

convert input.tif -profile myprofile.icc -intent relative -black-point-compensation -profile sRGB.icc output.tif
even though in PS I had converted from myprofile.icc to sRGB via Perceptual intent! When I wrote:
If I use -black-point-compensation and -intent options these make no visible difference.
I meant I had tried -intent with the matching setting!

This implies that PS doesn't (necessarily, at least) obey Perceptual. This may be because the colors in the image are not out of gamut, so it reverts to Relative Colormetric. According to Cambridge In Colour:
For [some] cases, relative colorimetric would yield more accurate results [than perceptual]. This is because perceptual intent compresses the entire color gamut — regardless of whether these colors are actually utilized.
so maybe PS would only obey Perceptual for images with colors out of gamut(?)

@Snibgo: Thanks for keeping me on the right path with your first suggestion - I just hadn't considered it would be Photoshop that would not behave as expected (when will I learn!?). The second suggestion is interesting. In my case, the sRGB profiles were identical. Cheers!

Re: Photoshop color conversion vs IM color conversion

Posted: 2015-04-28T09:11:54-07:00
by snibgo
I'm glad it's sorted.

I don't know PS, but I wouldn't be surprised if it "chooses" a more appropriate intent than the one asked for. The philosophy of ImageMagick is to do what it is told, and not to second-guess the user's intentions.