Commandline-Problem writing a Long Value to Exif.Image.ExifTag
Added by Picture Lover almost 10 years ago
In a Windows 7-Commandline-Batch I write the values from a picture AJ.jpg to a file, getting the following values:
Exif.Image.ExifTag Long 2110
Exif.Image.XPKeywords Byte 65 0 110 0 103 0 101 0 108 0 105 0 110 0 97 0 32 0 74 0 111 0 108 0 105 0 101 0 0 0
Xmp.dc.subject XmpBag Angelina Jolie
Xmp.MicrosoftPhoto.LastKeywordXMP XmpBag Angelina Jolie
Xmp.xmpMM.InstanceID XmpText uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b
After deleting all the tags with the command
exiv2.exe -k rm AJ.jpg
and inspecting that they are really gone, I would like to add the values back, as an example with
exiv2.exe -M"set Exif.Image.ExifTag Long 2110" AJ.jpg
This process works fine for the other 4 keys, but not for the first one (Type: Long).
The -v switch gives no error:
exiv2.exe -v -M"set Exif.Image.ExifTag Long 2110" AJ.jpg
File 1/1: AJ.jpg
Set Exif.Image.ExifTag "2110" (Long)
but the Long-value 2110 and the key will not be added to the picture.
How do I have to handle the type Long to add it to a picture?
Replies (5)
RE: Commandline-Problem writing a Long Value to Exif.Image.ExifTag - Added by Andreas Huggel almost 10 years ago
That's right, you can't change this tag. The long value is a pointer which is part of the Exif structure (it points to the Exif IFD) and Exiv2 calculates it and sets it to the correct value automatically, as long as there is any tag in the Exif IFD (any tag with a key Exif.Photo.*). There are a few more similar tags for other IFDs, with the tag docs you should usually be able to clarify.
Andreas
RE: Commandline-Problem writing a Long Value to Exif.Image.ExifTag - Added by Andreas Huggel almost 10 years ago
On the other hand, you shouldn't have any problem setting the Long value of another tag in general, like e.g., Exif.Image.ImageNumber: "set Exif.Image.ImageNumber 123" or "set Exif.Image.ImageNumber Long 123".
Andreas
RE: Commandline-Problem writing a Long Value to Exif.Image.ExifTag - Added by Picture Lover almost 10 years ago
Thank you for your answer, Andreas.
My Win7 write this Exif.Image.ExifTag as soon as I type in a 'Keyword' (german: Markierung) for a picture.
It seems this Exif.Image.ExifTag is not really necessary, because there is no additional key Exif.Photo.*
RE: Commandline-Problem writing a Long Value to Exif.Image.ExifTag - Added by Andreas Huggel almost 10 years ago
Strange. When you check with exiv2 -u -pa image.jpg
, you don't see any Exif.Photo.* tags?
Andreas
RE: Commandline-Problem writing a Long Value to Exif.Image.ExifTag - Added by Picture Lover almost 10 years ago
Ups, there are two more lines with your command:
Exif.Image.ExifTag Long 1 2110 Exif.Photo.0xea1c Undefined 2060 (Binary value suppressed) Exif.Image.XPKeywords Byte 30 Angelina Jolie Exif.Image.0xea1c Undefined 2060 (Binary value suppressed) Xmp.dc.subject XmpBag 1 Angelina Jolie Xmp.MicrosoftPhoto.LastKeywordXMP XmpBag 1 Angelina Jolie Xmp.xmpMM.InstanceID XmpText 41 uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1bBut I can't find any information about this Exif.Photo.0xea1c and Exif.Image.0xea1c in your linked Tag documentation (http://www.exiv2.org/tags.html). Do you know something about this (MS-specific??) tag?
.
.
BTW: If I click on your PDF-link at http://www.exiv2.org/tags.html I get an error about a broken PDF-file. If I copy the URL and paste it in a new tab of my browser (http://www.exif.org/Exif2-2.PDF) it works fine .-)