ExifTool Forum

ExifTool => Newbies => Topic started by: John McGinlay on March 04, 2024, 11:22:15 AM

Title: Problem with Exif Image Height/Width and Image Height/Width
Post by: John McGinlay on March 04, 2024, 11:22:15 AM
I used exiftools to export info to a text file to determine the physical dimensions of a file. Both  Exif Image Height and Image Height and Exif Image Width and Image Height both show the same values 1533 and 1094 respectively. The image seems to be much larger than that.

I then submitted the file to an on-line exif tool and the Exif Image Width And Height agree but the ImageWidth and ImageLength values were different and looked more like the correct values. I have included the exiftool data and the data from exifreader along with the image file.

 
Title: Re: Problem with Exif Image Height/Width and Image Height/Width
Post by: StarGeek on March 04, 2024, 03:51:40 PM
EXIF:ExifImageWidth/EXIF:ExifImageHeight (called PixelXDimension/PixelYDimension by the EXIF standard) are simply tags in the file and can be set to any value and are only accurate if the program creating or resizing the image properly sets them. This doesn't happen with a lot of programs.

IMO, these are useless tags, and I don't think I've ever found a program that reads them.  Instead, programs will read the actual image dimensions from the image data itself.

Using the command in FAQ #3 (https://exiftool.org/faq.html#Q3), the actual image size will be found in the File:ImageWidth/File:ImageHeight tags.  For example:
[File]          ImageWidth                      : 1749
[File]          ImageHeight                     : 1205