Page 1 of 1

profile conversion incomplete w/o metadata update

Posted: 2016-10-31T08:10:52-07:00
by mikmach
Profile conversion is incomplete without updating of relevant metadata fields.

Note: for proper review of problem you may need to download all files into your disk and use program like Windows Photography Viewer (built-in Windows app) which are understanding color management partially.

Lets take into account file:
https://drive.google.com/open?id=0B6_Yh ... FNpTHo2MDg
File is in AdobeRGB
Convert it with IM

Code: Select all

convert file.jpg -profile sRGB.icc file-srgb.jpg
Result is:
https://drive.google.com/open?id=0B6_Yh ... HdZZGFpdTg

It was successully converted into sRGB and programs with advanced color management support will display it properly because the will dive into guts of embedded profile but less advanced programs will look into metadata and still will see 'Adobe RGB'. When I do conversion with Photoshop file looks like below:
https://drive.google.com/open?id=0B6_Yh ... F81NFFVVjA

Not only file is converted but all relevant metadata fields are updated. You can check with exiftool (don't mind minor profile description differences for different versions of sRGB profile). The real problem is with IM not updating field EXIF:ColorSpace (and XMP:ICCProfileName - but only EXIF is really important).

Solution is to update field with:

Code: Select all

exiftool -EXIF:ColorSpace=sRGB "-XMP:ICCProfileName<ICC_Profile:ProfileDescription" -o file-srgb-etcorr.jpg file-srgb.jpg
Result:
https://drive.google.com/open?id=0B6_Yh ... 3RMMERUSE0

But it is really only bandaid. I understand that IM is graphics manipulation program and doesn't want to dive into this galaxy of problems but some minimum is required for proper interoperability with other programs (at least mention in documentation about possible problems would be cool).

IM version:

Code: Select all

Version: ImageMagick 6.9.3-5 Q8 x64 2016-02-20 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib