ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: garpin on July 01, 2021, 04:58:45 AM

Title: PNG eXIf chunk location before IDAT for web browsers
Post by: garpin on July 01, 2021, 04:58:45 AM
Hi!

I added orientation data to a PNG file using ExifTool 12.28 on Linux with this command:

exiftool -Orientation=6 -n image.png

It seems that ExifTool adds the eXIf chunk after the IDAT image data.

Web Browser vendors have decided that the eXIf chunk needs to be before image data, otherwise web browsers will ignore it: https://github.com/w3c/csswg-drafts/issues/4929

It would be great if the exiftool was changed so that the eXIf chunk is written before the IDAT image data so that web browsers will be able to use it.

Also, macOS 11.4 Preview App seems to expect the eXIf chunk to be before IDAT, otherwise it doesn't recognize it.

Thanks!

System type: Linux
ExifTool version: 12.28
Command line: exiftool -Orientation=6 -n image.png


Title: Re: PNG eXIf chunk location before IDAT for web browsers
Post by: Phil Harvey on July 01, 2021, 06:43:18 AM
I just love the way that specifications mean nothing.

OK, thanks.  I'll look into this.

- Phil
Title: Re: PNG eXIf chunk location before IDAT for web browsers
Post by: Phil Harvey on July 09, 2021, 02:56:40 PM
ExifTool 12.29 (just released) writes PNG eXIf before the IDAT chunk.

- Phil
Title: Re: PNG eXIf chunk location before IDAT for web browsers
Post by: garpin on July 19, 2021, 03:07:08 AM
Thank you for changing it! I tried ExifTool 12.29. PNG images with exif data are now properly recognized by Mac Preview and Safari. Great!