Finding color profile information in a file



By mjhammel ~ January 16th, 2010. Filed under: Commentary.

There is an ongoing discussion on the GIMP User mailing list regarding color profiles.  One user was having problems with GIMP reading proper profile information from files produced by Pentax cameras.  It turns out that the camera was placing the information in custom fields so GIMP EXIF support never sees it.

What I found interesting about this discussion was the tip from Milan Knizek, who showed how he checked the files for color profile information.  He used two commands:

exiftool -a -G -H _GOR3359.JPG | grep Color

Obviously the .JPG is the source image filename.  This command produced information that looked like this:

[File]               – Color Components                : 3
[EXIF]          0xa001 Color Space                     : Uncalibrated
[MakerNotes]    0×0037 Color Space                     : Adobe RGB

This is how he found that the color space specified in the file (Adobe RGB) was not actually specified in the EXIF fields.  The second command was exiv2:

exiv2 -pa _GOR3359.JPG | grep Color

This command produced information like so:

Exif.Pentax.ColorSpace                       Short       1  Adobe RGB
Exif.Pentax.ColorTemperature                 Short       1  0
Exif.Pentax.ColorInfo                        Undefined  18  32 131 31
100 31 125 32 156 33 72 32 246 31 51 31 10 0 0
Exif.Photo.ColorSpace

It’s unclear to me what this is telling us but it appears that the Pentax information is in a special area of the EXIF data in the file.  In any case, finding out what color space is specified in an image file, and most cameras do this now, is pretty easy with these two commands.  On Fedora, the exiv2 program is found in the exiv2 package while the exiftool program is found in the perl-Image-ExifTool package.  Having this information may make it a little easier to configure GIMP’s color management too.


Related posts

Tags: , , , , , , , , , , , ,

Leave a Comment