I want to read exif info in image in android. I can read exif from image in gallery but i cannot read exif photo taken from the camera

自古美人都是妖i 提交于 2019-12-11 13:08:46

问题


As shown in the figure above.I chose the take a picture exif information is null. I chose image from phone option and exif information is not null.


回答1:


You cannot read exif data from a Stream using the android api. ExifInterface doesn't have a constructor with an InputStream.

However, You can use the metadata-extractor and use the constructor with an InputStream to build an InputStream backed by your byte[] using a ByteArrayInputStream




回答2:


It is now possible to read EXIF data from streams through the ExifInterface Support Library.

compile "com.android.support:exifinterface:25.1.0"

Source: https://android-developers.googleblog.com/2016/12/introducing-the-exifinterface-support-library.html




回答3:


Android API do not read EXIF from Stream.

Check this one - https://stackoverflow.com/a/12952370/842607



来源:https://stackoverflow.com/questions/36593739/i-want-to-read-exif-info-in-image-in-android-i-can-read-exif-from-image-in-gall

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