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?".
convert -render -layers merge "input.psd" -black-point-compensation -intent Relative -profile "sRGB Color Space Profile.icm" -profile "USWebCoatedSWOP.icc" "output.tiff"
If I do the same thing with the input image in Adobe Photoshop (Edit->Convert to profile and enable black point compensation and the same profile), I end up with a pretty similar result (Photoshop against ImageMagick) but if the histograms are inspected, they are visibly different.
Also, when I compare each color channel separately, I can see slight differences.
Is there anything else I can do with ImageMagick to get closer results to Photoshop?
I've tried building the latest ImageMagick against the LCMS 2.0 beta 3 and I still have this problem.
Also, I may have encountered a bug in ImageMagick with profile assignment. When I open the "cmyk from imagemagick.tiff" file in Photoshop, I get a warning about the color profile being invalid. There's no problem when I look at it in Apple's Preview.app, though.
In addition, I tried using the tificc tool in lcms 2.0 on a tiff version of the original psd file (with no color changes) and I got a different result from the other two.
I ran
jyelloz wrote:Also, I may have encountered a bug in ImageMagick with profile assignment. When I open the "cmyk from imagemagick.tiff" file in Photoshop, I get a warning about the color profile being invalid. There's no problem when I look at it in Apple's Preview.app, though.
I think with PSD files it's recommended to add "-strip" before you assign the color profiles (your input file already shows a sRGB profile!). If I omit -strip, it gives me a result like your "cmyk from imagemagick.tiff", and it almost seems that two color profiles are embedded..? For example: Irfanview opens it alright and shows only the SWOP profile. But ImageMagick/identify shows only a sRGB profile within the CMYK image.(!)
But with -strip in the former command, ImageMagick gives me a valid file (with only the US Web Coated SWOP profile).
The reason I put the sRGB profile at the beginning was to perform a conversion from any other RGB profile. It has no effect on the output image. Both outputs have the same histograms in Photoshop. I would prefer not to use the -strip option because I don't want to re-assign profiles, I want to convert between them. A better option is probably to remove non-icc profiles instead doing something like:
It shouldn't do any harm (with two sRGB profiles at the start), but this is not the proper way to do a conversion.
If you want to use the profile of the input file, you don't need the first '-profile profile.icc' part. If you want to add the first profile manually, you should use '-strip' or at least '+profile "icc,icm"' before adding that part.
But: With PSDs, it's generally recommended to use '-strip' before you assign the profiles manually - as the usage of the embedded color profiles is not totally reliable there, I think.
One should always make sure that there are only two color profiles (not more, not less) involved in a such a conversion. The target profile will be automatically saved with your output file, if possible (unless you add another '-strip' or '+profile icc' after your target profile).
Regarding the small color differences in the different conversions.. I can't help you there, sorry.
By the way: The Rapidshare link doesn't work anymore.
Slight differences between color histograms resulting from color-space conversion by Adobe ACE and ImageMagick may result from different conversion "intents", or different algorithms to implement the same intents. The "intent" defines how you deal with colors that exist in one color-space and not in the other. E.g. it says whether you intend to keep most colors unmodified after conversion (colors that exist in both color-spaces) or whether you intend to keep color differences.
In brief, there isn't a unique way to convert.
I don't know if ImageMagick allows for the same intents as Adobe ACE and implements them the same way. I'd be interested to know.