Errors validating webp image

Started by tritium, April 02, 2023, 03:38:06 PM

Previous topic - Next topic

tritium

Hi there and thanks for this awesome tool!
i'm trying to add a valid EXIF UserComment tag containing some human readable JSON formatted text to a webp image but encountering some errors when i try to validate it using ExifTool.
i'm using piexifjs to create the exif data and node-webpmux to load the webp and set it.

Warning                         : [minor] Improper EXIF header
Exif Byte Order                 : Big-endian (Motorola, MM)
Warning                         : Non-standard format (string) for ExifIFD 0x9286 UserComment
Warning                         : Value for ExifIFD tag 0x9286 UserComment overlaps IFD
Warning                         : Invalid EXIF text encoding for UserComment
Unsure what is causing it.
What is strange is that while ExifTool(and Metadata++ ofc) is freaking out some other online tools do show the UserComment field as if it was a valid and recognized EXIF tag eg:
https://jimpl.com/results/uSrEKUk4jizCNyeh4jUNZCfS?target=exif
Attached are image and HTML hex dump.
Any tips pointing me in the right direction are appreciated.
Have a great Sunday.
Thanks!

Phil Harvey

It sounds like you need to read the EXIF specification.  Also, take a look at the file using the exiftool -htmldump output to try to make sense of this mess.

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

tritium

Thanks Phil,

managed to fix everything BUT this error, i am a bit stumped.
Warning                         : [minor] Improper EXIF headerI am using the Piexif library to inject this header "Exif\x00\x00\x4d\x4d\x00\x2a\x00\x00\x00\x08"Most online exif viewers are able to correctly parse the imageDescription field and its content but not all.
Attached image, htmldump and validateoutput

Have a great Week End.

Phil Harvey

The EXIF should begin with the TIFF byte-order mark.  Not with the JPEG EXIF Segment header.

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