Windows Explorer also likes the "XP" values (eg. EXIF_TAG_XPCOMMENT,
EXIF_TAG_XPAUTHOR), maybe try writing those as well?
Hmm. You seem to be right that explorer likes the XP values. However, I can't figure out how to write to them. I can see that they are BYTE values, but how to convert a string into the wanted bytes?

This is the result I get:
---- IFD0 ----
XP Comment                      : 態灳牥潃浭湥t
XP Author                       : 態灳牥畁桴牯

With this code:
byte[] bytesComment = ExifTagConstants.EXIF_TAG_XPCOMMENT.encodeValue(TiffFieldTypeConstants.FIELD_TYPE_ASCII, "KasperComment", set.byteOrder); byte[] bytesAuthor = ExifTagConstants.EXIF_TAG_XPAUTHOR.encodeValue(TiffFieldTypeConstants.FIELD_TYPE_ASCII, "KasperAuthor", set.byteOrder); TiffOutputField commentField = new TiffOutputField(ExifTagConstants.EXIF_TAG_XPCOMMENT, ExifTagConstants.EXIF_TAG_XPCOMMENT.dataTypes[0], bytesComment.length, bytesComment); TiffOutputField authorField = new TiffOutputField(ExifTagConstants.EXIF_TAG_XPAUTHOR, ExifTagConstants.EXIF_TAG_XPAUTHOR.dataTypes[0], bytesAuthor.length, bytesAuthor);
set.getOrCreateRootDirectory().add(commentField);
set.getOrCreateRootDirectory().add(authorField);

/Kasper

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to