Bug: PNG image size does not appear in "File" group

Started by nneil, November 15, 2022, 02:49:48 AM

Previous topic - Next topic

nneil

For some file formats ExifTool helpfully copies the image width and height to File:ImageHeight, etc. But it does not do this for PNG files (and maybe others that I don't know about).

$exiftool -G *.png | egrep -i "width|height|orien|rotat"
[PNG]           Image Width                     : 120
[PNG]           Image Height                    : 120

$ exiftool -G 20221022_132527883_iOS.heic | egrep -i "width|height"
[File]          Image Width                     : 4032
[File]          Image Height                    : 3024
[EXIF]          Exif Image Width                : 4032
[EXIF]          Exif Image Height               : 3024

Phil Harvey

Yes, very true.  Running through my sample files, here are all of the various possiblities for ImageWidth (with the -G0:1 option):

[APP8:SPIFF]    Image Width
[ASF]           Image Width
[Composite]     Image Width
[DjVu]          Image Width
[EXIF:ExifIFD]  Image Width
[EXIF:IFD0]     Image Width
[EXIF:IFD1]     Image Width
[EXIF:IFD2]     Image Width
[EXIF:IFD3]     Image Width
[EXIF:IFD4]     Image Width
[EXIF:IFD5]     Image Width
[EXIF:IFD6]     Image Width
[EXIF:IFD7]     Image Width
[EXIF:IFD8]     Image Width
[EXIF:IFD9]     Image Width
[EXIF:IFD10]    Image Width
[EXIF:IFD11]    Image Width
[EXIF:IFD12]    Image Width
[EXIF:IFD13]    Image Width
[EXIF:ProfileIFD] Image Width
[EXIF:ProfileIFD1] Image Width
[EXIF:SRF6]     Image Width
[EXIF:SubIFD]   Image Width
[EXIF:SubIFD1]  Image Width
[EXIF:SubIFD2]  Image Width
[EXIF:SubIFD3]  Image Width
[EXIF:SubIFD4]  Image Width
[EXIF:SubIFD5]  Image Width
[File]          Image Width
[Flash]         Image Width
[FlashPix]      Image Width
[GIF]           Image Width
[GIMP]          Image Width
[H264]          Image Width
[Jpeg2000]      Image Width
[Lytro]         Image Width
[MakerNotes:CanonRaw] Image Width
[MakerNotes:CIFF] Image Width
[MakerNotes:MinoltaRaw] Image Width
[MakerNotes:PhaseOne] Image Width
[MakerNotes:Track1] Image Width
[MakerNotes:Track2] Image Width
[MakerNotes:Track3] Image Width
[Matroska:Track1] Image Width
[MIFF]          Image Width
[MNG]           Image Width
[MPEG]          Image Width
[MXF:Track1]    Image Width
[MXF:Track2]    Image Width
[MXF:Track3]    Image Width
[MXF:Track9]    Image Width
[MXF]           Image Width
[PhotoCD]       Image Width
[Photoshop]     Image Width
[PNG]           Image Width
[PSP]           Image Width
[QuickTime:Track1] Image Width
[QuickTime:Track2] Image Width
[QuickTime:Track3] Image Width
[QuickTime:Track6] Image Width
[Red]           Image Width
[RIFF]          Image Width
[SigmaRaw]      Image Width
[SVG]           Image Width
[Theora]        Image Width
[XMP:XMP-dc]    Image Width
[XMP:XMP-exif]  Image Width
[XMP:XMP-GDepth] Image Width
[XMP:XMP-tiff]  Image Width
[XMP:XMP-tmp0]  Image Width

The "File" group is generally used for file types where the image width/height information isn't part of the metadata.  I suppose the JPEG ImageWidth/Height should really be an a "JPEG" group, but I don't think it would be good to move them at this point.  Also, I have been using the File group more often recently for these tags because ExifTool now supports so many different formats and the number of groups was getting out of hand.

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