ExifTool Forum

ExifTool => Newbies => Topic started by: DaveBurton on July 15, 2023, 03:04:13 AM

Title: Does .webp format not support the "Comment" metadata field
Post by: DaveBurton on July 15, 2023, 03:04:13 AM
Thank you, Phil, for making a terrific tool!

Does .webp format not support the "Comment" metadata field?

Attached are two versions of the same image: temp5.webp and temp5.jpg. I used Irfanview to make temp5.jpg from temp5.webp. Exiftool can add a Comment metadata field to temp5.jpg, but not to temp5.webp:

W:\tempfolder>dir temp5*
 Volume in drive W is samba1
 Volume Serial Number is 1526-374B

 Directory of W:\tempfolder

07/13/2023  02:34 AM            76,858 temp5.webp
07/13/2023  02:34 AM           144,848 temp5.jpg
               2 File(s)        221,706 bytes
               0 Dir(s)  1,394,536,792,064 bytes free

W:\tempfolder>exiftool -comment="This is a comment" temp5.webp temp5.jpg
    1 image files updated
    1 image files unchanged

W:\tempfolder>dir temp5.*
 Volume in drive W is samba1
 Volume Serial Number is 1526-374B

 Directory of W:\tempfolder

07/13/2023  02:34 AM            76,858 temp5.webp
07/15/2023  01:53 AM           144,869 temp5.jpg
07/13/2023  02:34 AM           144,848 temp5.jpg_original
               3 File(s)        366,575 bytes
               0 Dir(s)  1,394,536,640,512 bytes free

W:\tempfolder>

I also tried "exiftool -tagsfromfile temp5.jpg temp5.webp". It did not copy the Comment field, though it did add some other fields:

Exif Byte Order                 : Big-endian (Motorola, MM)
X Resolution                    : 1
Y Resolution                    : 1
Resolution Unit                 : None
Y Cb Cr Positioning             : Centered
XMP Toolkit                     : Image::ExifTool 12.64
Bits Per Sample                 : 8
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)

I'm using exiftool 12.64 on Windows 10, installed with the 64-bit Oliver Betz installer.
Title: Re: Does .webp format not support the "Comment" metadata field
Post by: Phil Harvey on July 17, 2023, 08:48:16 AM
ExifTool can write any EXIF or XMP tag to WebP.  Comment is a JPEG-specific tag.  I suggest writing this to XMP:Description or something like that in a WebP file.

- Phil
Title: Re: Does .webp format not support the "Comment" metadata field
Post by: StarGeek on July 17, 2023, 03:37:06 PM
Additionally, the jpeg Comment tag is extremely fragile, as some programs will overwrite this with their own data.  For example, older versions of Photoshop would write "File written by Adobe Photoshop" to the comment field.

Here are some other jpeg comments I've seen that would probably have overwritten the Comment tag
Image Alchemy
Generated by  IJG JPEG Library
LEAD Technologies Inc
ACD Systems Digital Imaging
AppleMark
CREATOR: gd-jpeg
Processed By eBay with ImageMagick