problem with icc profile tags

Started by frigg, November 25, 2010, 09:40:54 AM

Previous topic - Next topic

frigg

Hi there,

some jpgs throws an exiftool error but Imagemagick's identify (ImageMagick 6.6.4-10 2010-10-10 Q16) shows the correct info and all icc-profile aware applikations (Photoshop, irfanview,GIMP,...) will show the image pretty well as the profile info too.

Exiftool version is 8.21 (linux) but 8.39 (win xp) shows this behavior too

Any advice or tip?

regards,

Frank

$ exiftool -s -s -s -DeviceModelDesc test-128-argb.jpg
Warning: Bad length ICC_Profile (length 560) - test-128-argb.jpg

$ exiftool -s -s -s -ProfileDescription test-128-argb.jpg
Adobe RGB (1998)

$ identify -verbose test-128-argb.jpg | sed -n "/Profile-icc.*bytes/{n;p;}" | sed 's/^[ \t]*//'
Adobe RGB (1998)

Needless to say: identify shows NOT the ProfileDescription, it shows the Device Model Description which fails in exiftool. Just for confusion is the fact that the string if the Adobe RGB icc Profile is the same for Device Model Description and Profile Description. But Device Model Description is a field which couldn't change by an user but Profile Description is a user changable field. For this reason the Device Model Description is reliable and Profile Description is not.

Look at the exiftool excerpt:
.
.
.
Warning                         : Bad length ICC_Profile (length 560)
.
.
.
Profile Creator                 : ADBE
Profile ID                      : 0
Profile Copyright               : Copyright 2000 Adobe Systems Incorporated
Profile Description             : Adobe RGB (1998)
.
.
.

$ exiftool -s -s -s -ProfileDescription test-128-prophotorgb.jpg
ProPhoto RGB
$
$ exiftool -s -s -s -DeviceModelDesc test-128-prophotorgb.jpg
Reference Output Medium Metric(ROMM)

Phil Harvey

#1
Hi Frank,

Thanks for this report, but I think ExifTool is doing what it is supposed to.

I looked at your first sample image in detail (test-128-argb.jpg), and here are my observations:

1) The actual length of the ICC_Profile data is 560 bytes, but the amount of data stored is about 130 kB. The rest is padded mostly with binary zeros.  ExifTool does a sanity check on the ICC_Profile length and issues a warning if these doesn't match, not because it is a waste of space if the data is longer than the reported ICC_Profile, but because it could be an indication that the ICC_Profile data is corrupted.  However, the warning is informational only and ExifTool will attempt to process the ICC_Profile data normally after issuing the warning.

2) There is no DeviceModelDesc information in this image.  When nothing is extracted, exiftool prints the last warning message if it exists because sometimes this helps diagnose the reason why the tag wasn't extracted.  In this case, the warning is unrelated to the fact that the DeviceModelDesc doesn't exist.  This tag does, however, exist in your second sample (test-128-prophotorgb.jpg), and is extracted properly by exiftool.  You can do a crude test to see if this tag exists with "grep dmdd FILE" since "dmdd" is the tag ID for the DeviceModelDesc.  Of course, this crude technique is prone to possible false matches.

- Phil

Edit:  Note that the DeviceModel tag (the machine-readable version of DeviceModelDesc) is stored in the ICC Profile header, so it exists in all profiles.  However, in your first image this tag is empty.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).