Closed ivanooi closed 6 years ago
@ivanooi you can try this: TiffTag.WINDOWS_XP_COMMENT.getFieldAsString(exif.getImageIFD().getField( TiffTag.WINDOWS_XP_COMMENT).getData()).
It is a bit complex as WINDOWS_XP_COMMENT is actually a byte type field not an ASCII field. Hope this will work for you.
Wen
Thanks! it work! ya... not easy to figure out this. Nice if this will included in wiki as well. :-D 👍
Thanks
hmm...sorry, this 2 a bit strange. the 2nd statement able to return the value but not the 1st one.
lobj_value = TiffTag.COPYRIGHT.getFieldAsString(exif.getImageIFD().getField( TiffTag.COPYRIGHT).getData());
System.out.println(lobj_value);
System.out.println("COPYRIGHT=" + exif.getImageIFD().getFieldAsString( TiffTag.COPYRIGHT ));
@ivanooi to make it consistent, I have changed the IFD.getFieldAsString(Tag) method. Please pull the latest change and give it a try. From now on, the second one will work for all cases.
Great! Thanks! :-D
Hi,
I'm so sorry. I can't find a way to read the XP Comments data out.,,
Exif exif = (JpegExif)metadataMap.get(MetadataType.EXIF ); exif.getImageIFD().getFieldAsString( TiffTag.WINDOWS_XP_COMMENT )
and it return this :
[0x10,0x30,0xF3,0x97,0xA7,0x63,0x11,0x30,0x49,0x84 ...] => 【音控】葉曙欽(濟洸)在測試音響testing 123..
anyway that I can just get the real comments?
Thanks