Writing arbitrary metadata to EXIF in Android

放肆的年华 提交于 2019-12-11 06:32:55

问题


This question originated here: Writing EXIF metadata to images in Android .

Can we use EXIF to write arbitrary metadata, i.e. other than those specified in the ExifInterface documentation (like latitude, longitude, flash etc). If not, what could be a preferred method of writing arbitrary metadata to image files?


回答1:


The ExifInterface is only a very limited implementation of the EXIF standard and will not allow you to read/write tags other than the ones documented/defined. In the chosen answer of this post an alternative method is described.

Arbitrary data could be written to one of the following tags

Tag-hex     Tag-dec IFD     Key                             Type    
0x010e      270     Image   Exif.Image.ImageDescription     Ascii
0x9286      37510   Photo   Exif.Photo.UserComment          Comment

whereby UserComment has less restrictions regarding the character set used



来源:https://stackoverflow.com/questions/15901971/writing-arbitrary-metadata-to-exif-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!