Different results with grouping

Started by renambot, November 25, 2012, 11:45:07 AM

Previous topic - Next topic

renambot

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

Phil Harvey

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

renambot

I didn't know that NEF was TIFF-based.
Ok, Thanks !

Luc