Project

General

Profile

I cannot write Byte value to Exif.Image.XPKeywords (Exif.Image.XPAuthor)

Added by Ge Bu over 11 years ago

I cannot write Byte value to Exif.Image.XPKeywords
My command:
del Exif.Image.XPKeywords
set Exif.Image.XPKeywords jedna

Error message:
Set Exif.Image.XPKeywords "jedna" (Byte)
Warning: Exif.Image.XPKeywords: Failed to read Byte value "jedna"

Byte is default value. When I set it to Ascii it works.
When I wrote this tag by Windows explorer it is Byte.
Strange.

It is the same with Exif.Image.XPAuthor


Replies (2)

RE: I cannot write Byte value to Exif.Image.XPKeywords (Exif.Image.XPAuthor) - Added by Steve Wright over 11 years ago

Coincidentally, I've been puzzling out these "XP tags" myself this week.

What I've so far uncovered is this:
1. The Byte code Exiv2 wants is the two- and three-number ASCII code for each letter in your text string.
2. Trust Microsoft to not make things quite that easy, however, as when you use, for example, one of the
online text-to-ASCII encoder pages, such as http://www.cs.carleton.edu/faculty/adalal/teaching/f05/107/applets/ascii.html ,
the string you get still isn't properly formatted for an XP tag.
Try pasting one in on the command line as part of an '-M"set Exif.Photo.XPComment"' or other such tag-appending command,
and what you'll see in the Summary tab of Properties for that file is either Chinese pictograms (if you have Asian
Language Services for Office installed) or non-printable characters (empty rectangles, dainty little squares, dingbat
diamonds etc).
3. The correct format involves putting three-character zero-space strings in between the numerical ASCII code, and three zeros, likewise spaced, at the end of the string, as in this example:
84 0 104 0 111 0 115 0 101 0 0 0 32 0 101 0 121 0 101 0 115 0 0 0 32 0 45 0 45 0 0 0 32 0 116 0 104 0 101 0 121 0 0 0 32 0 100 0 111 0 0 0 32 0 116 0 104 0 105 0 110 0 103 0 115 0 0 0 32 0 116 0 111 0 0 0 32 0 121 0 111 0 117 0 46 0 0 0
I've been able to do so manually with some success, using a BASH script I could easily upload to the Forum to generate the ASCII numbers and at least most of the zero-space stuff in between. My own preferred next step is to get this working well enough that it's interpreted correctly by both Explorer and GUI apps (XnView being one) that parse EXIF tags regardless of usefulness or origin, so as to automate the "interpretation" process. It seems, to me, much more courteous than asking Andreas to write transcoding into Exiv2 itself.

In fact, this is what I was logging in to post about this afternoon. Good show I looked for someone else's post on the same or nearly the same topic. :)

Steve Wright.

RE: I cannot write Byte value to Exif.Image.XPKeywords (Exif.Image.XPAuthor) - Added by Steve Wright almost 10 years ago

My vote is for making all the XP tags read-only unless and until Andreas can somehow simplify writing them. It's not impossible: Phil Harvey's Exiftool does it. If I could stand to use a utility that created "relics" (.original files) on the fly instead of modifying the original file, I'd use ET a lot more often. In the meantime, until writing these Tags is as easy as writing any other freely editable EXIF tag (ie, UserComment or ImageDescription), I think it's best that we Exiv2 users should resign ourselves to a read-only status for them and leave off the temptation to try to encode our plain text strngs into the peculiar kind of UCS8 Byte Microsoft uses for them.

Someone on this forum suggested using type Ascii as a means to enter data on these tags and avoid the errors. While that may work in Exiv2 on the command line, it doesn't in Windows Explorer (and I've tried it in both W7 Home Premium and Xp Pro SP3); the tag values one enters are not displayed.

The script I mentioned in my last post is here -- http://dev.exiv2.org/boards/3/topics/531 .

SJ Wright

    (1-2/2)