Page 1 of 1

Getting ICC Profile Name

Posted: 2016-09-26T12:06:24-07:00
by vfrisina
I need to inspect images to determine which processing steps I need to run, and one of the checks is to determine which if any ICC profile is embedded in the image. Is there a way to read the ICC profile name with identify? I can see that there is an ICC profile, but I cannot get any information about it.

I am running version

Code: Select all

Version: ImageMagick 6.9.5-9 Q16 x86_64 2016-09-21 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC OpenMP 
Delegates (built-in): bzlib djvu fontconfig freetype jng jpeg openexr pangocairo png tiff wmf x xml lib
on Linux.

I have seen recommendations to use

Code: Select all

identify -format "%[profile:icc]" /path/to/image
but that just gives me

Code: Select all

identify: unknown image property "%[profile:icc]" @ warning/property.c/InterpretImageProperties/3785.
When I run the version I get from MacPorts I see the ICC profile name is a property that I can scrape from the output, but that does not help me on my linux target.

Code: Select all

Version: ImageMagick 6.9.5-8 Q16 x86_64 2016-09-21 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules 
Delegates (built-in): bzlib djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr png ps tiff webp x xml lib

Re: Getting ICC Profile Name

Posted: 2016-09-26T13:10:32-07:00
by snibgo
identify -format "%[profile:icc]" /path/to/image
That should work. If there is no icc profile, you'll get the "unknown image property" warning.

If it doesn't work on a JPEG that does have an ICC, please upload it somewhere and paste the link here.

Re: Getting ICC Profile Name

Posted: 2016-09-26T13:51:33-07:00
by vfrisina
Here is an example:
https://webkit.org/blog-files/color-gam ... wer-P3.jpg
Image

I see that I can get the ICC name with the Mac OS X build but not the Linux build. Is there some config option that could have been set incorrectly that would affect this?
snibgo wrote:
identify -format "%[profile:icc]" /path/to/image
That should work. If there is no icc profile, you'll get the "unknown image property" warning.

If it doesn't work on a JPEG that does have an ICC, please upload it somewhere and paste the link here.

Re: Getting ICC Profile Name

Posted: 2016-09-26T14:12:47-07:00
by snibgo
For that file, the command works fine in the pre-built Windows binary, v6.9.5-3.

This facility may need LCMS, which you have on one system but not the other.