What is the difference between the following statements for setting a comment string
exiv2 -c tera img.JPG
exiv2 -M"set Exif.Photo.UserComment adagio" img.JPG
I can access them with
$ exiv2 -p c img.JPG
tera
$ exiv2 -p S img.JPG | grep adagio
450 | 0x9286 UserComment | UNDEFINED | 14 | 38546 | ........adagio
What would be the proper way to add simple ASCII characters that won't longer than a dozen of characters.
The first command saves the text to the jpeg COM block (see Jpeg Syntax and structure). This is a jpeg only piece of metadata.
The second command saves the text to the EXIF UserComment
tag. This is part of the EXIF standard of metadata.
The jpeg COM comment is a fairly fragile place to put metadata, as some programs will either not save it or overwrite it with their own text. The UserComment
is less likely to be lost or overwritten by most programs.