ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: renambot on November 25, 2012, 11:45:07 AM

Title: Different results with grouping
Post by: renambot on November 25, 2012, 11:45:07 AM
I'm not sure if it's a bug or a mistake on my part, but it seems odd: I get a different image widths with different groupings:

This is correct value:
exiftool -j  d3_image.NEF | grep -i width
  "ImageWidth": 4288,

Looks incorrect:
exiftool -j -G  d3_image.NEF | grep -i width
  "EXIF:ImageWidth": 160,

exiftool -j -G1 d3_image.NEF | grep -i width
  "IFD0:ImageWidth": 160,
  "SubIFD1:ImageWidth": 4288,

Is this the expected behavior ?

thanks,

Luc
Title: Re: Different results with grouping
Post by: Phil Harvey on November 25, 2012, 02:36:46 PM
Hi Luc,

NEF files are based on the TIFF format which allows multiple images to be stored in different IFD's of the same file.  The image in IFD0 is a small thumbnail image (which you will probably see if you rename the file to .TIF and open it with most viewers).  As you have seen, SubIFD1 contains the full raw image.

In a TIFF-format image, when you just ask for "ImageWidth" (without specifying a group), ExifTool returns ImageWidth from the IFD which has a SubfileType of "Full-resolution Image".

- Phil
Title: Re: Different results with grouping
Post by: renambot on November 25, 2012, 06:46:17 PM
I didn't know that NEF was TIFF-based.
Ok, Thanks !

Luc