Invisible ICC Profiles

Started by Drarakel, October 28, 2011, 05:49:59 AM

Previous topic - Next topic

Drarakel

Hi,

This is sort of a feature request.
I get quite some JPG files with ICC profiles which aren't recognized by ExifTool (and other tools). XnView or Imagemagick for example do show the ICC profile here. First, I wasn't sure if that's a bug or a problem in the files. But after comparing some files, it seems that the sequence number (and total number) in the APP2 profile is wrong in such cases. Usually, after the "ICC_PROFILE\0" term, there follows 0x0101 (for one chunk) - right? But in some of my files, there follows 0x0000. ??? Don't know which software writes that..

Sadly, there's no indication in the ExifTool output with that - for an ICC profile or for an error. Only with verbosity level 1 (or higher), I see that there's an APP2 profile (which looks empty for ExifTool). Maybe there could be at least a warning message? Or even better: Additionally to a warning, treat the strange 'sequence 0 out of 0' as just a simple 'sequence 1 out of 1'. Maybe that's what XnView makes.. Of course, if there were more chunks (bigger profiles), that wouldn't help. But I only experienced this problem with small profiles (one chunk).

Is such a change possible? Or would this lead to bigger problems (with corrupted ICC profiles)?

Here's an example: image

Phil Harvey

Thanks for this request and sample image.

It is a good suggestion.  I will add more validation of the ICC Profile block count.  Your image has block count of 0 as you mentioned, which is illegal.  But I will add the ability to read incorrectly written profiles like this and issue a warning.  This improvement will appear in Exiftool 8.69.

- Phil
...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 ($).

Drarakel

Sounds good!
And thanks for your really great ExifTool application!