ExifTool Forum

ExifTool => Newbies => Topic started by: tritium on April 02, 2023, 03:38:06 PM

Title: Errors validating webp image
Post by: tritium on April 02, 2023, 03:38:06 PM
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!
Title: Re: Errors validating webp image
Post by: Phil Harvey on April 02, 2023, 03:43:28 PM
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
Title: Re: Errors validating webp image
Post by: tritium on April 14, 2023, 04:13:06 PM
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.
Title: Re: Errors validating webp image
Post by: Phil Harvey on April 15, 2023, 05:36:18 AM
The EXIF should begin with the TIFF byte-order mark.  Not with the JPEG EXIF Segment header.

- Phil