ExifTool Forum

General => Metadata => Topic started by: rpbourret on October 31, 2015, 02:07:29 PM

Title: Difference between PixelXDimension and ImageWidth?
Post by: rpbourret on October 31, 2015, 02:07:29 PM
What is the difference between exif:PixelXDimension and tiff:ImageWidth? Similarly, between exif:PixelYDimension and tiff:ImageHeight? Is either used more commonly than the other?

Thanks,

-- Ron
Title: Re: Difference between PixelXDimension and ImageWidth?
Post by: Phil Harvey on November 01, 2015, 04:05:29 PM
Hi Ron,

There is no ExifTool tag called PixelXDimension.  ExifTool calls it ExifImageWidth, because it is the image width, duplicated in the EXIF information.

- Phil
Title: Re: Difference between PixelXDimension and ImageWidth?
Post by: rpbourret on November 01, 2015, 10:51:35 PM
Hi, Phil,

Maybe I'm asking the wrong question.

There are two pairs of tags listed on the Exif Tags web page [1] that appear to describe the width and height of an image: 0x0100 (ImageWidth) / 0x0101 (ImageHeight) and 0xa002 (ExifImageWidth, aka PixelXDimension) / 0xa003 (ExifImageHeight, aka PixelYDimension).

What is the difference between these pairs? Do they contain the same values, with ImageWidth/ImageHeight defined by TIFF and ExifImageWidth/ExifImageHeight defined by Exif? Is one set of tags used more commonly than the other?

I'm writing software that checks metadata across sets of related images and trying to understand which tags I need to check. (Since I don't know the origin of the images, it seems safest to check both pairs of values, but I don't really understand why there are two different pairs of values that appear to describe the same thing.)

Thanks,

-- Ron

[1] http://www.exiftool.org/TagNames/EXIF.html
Title: Re: Difference between PixelXDimension and ImageWidth?
Post by: Phil Harvey on November 02, 2015, 08:00:27 AM
Hi Ron,

I don't know why EXIF stores another image width/height, but the ImageWidth/ImageHeight are the ones you should look at since these are the ones used by image viewers.  ExifImageWidth/ExifImageHeight are superfluous as far as I can tell, don't necessarily contain valid image dimensions, and aren't guaranteed to exist.

- Phil
Title: Re: Difference between PixelXDimension and ImageWidth?
Post by: rpbourret on November 02, 2015, 12:44:12 PM
Thanks!

-- Ron