ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: tbrown92030 on September 08, 2017, 05:24:07 PM

Title: Confusion around File:ImageWidth, File:ImageHeight and other EXIF tags
Post by: tbrown92030 on September 08, 2017, 05:24:07 PM
A fundamental question is where do the values for the [File] group come from? Are they purely computed from other tags (in other groups)?

I ask because I'm looking at an image (from a Nikon d300) that reports a [File] Image Width and [File] Image Height, but in [EXIF] none of the following tags exist:
  0x0100 ImageWidth
  0x0101 ImageHeight
  0xA002 ExifImageWidth
  0xA003 ExifImageHeight

And, according the to EXIF spec, the first two are really not to be used for JPEG encoded data in the first place (they apply only to uncompressed images).
Title: Re: Confusion around File:ImageWidth, File:ImageHeight and other EXIF tags
Post by: StarGeek on September 08, 2017, 07:32:04 PM
The File values will be decoded from the image itself and are not alterable metadata.  For example, in a jpeg, it would be decoded from the SOFn chunk, the same way an image viewer would do.

Previously, Phil has called the ExifImageWidth and ExifImageHeight superfluous (https://exiftool.org/forum/index.php/topic,6823.msg34130.html#msg34130) and I tend to agree.  You can change them to whatever value you want and I have yet to see an image viewer pay any attention to them.
Title: Re: Confusion around File:ImageWidth, File:ImageHeight and other EXIF tags
Post by: tbrown92030 on September 11, 2017, 10:03:19 AM
Makes sense, thanks.