Android camera saves photo without ExIf

可紊 提交于 2020-01-04 19:06:56

问题


I want to take photo using MediaStore.ACTION_IMAGE_CAPTURE intent, and save with MediaStore.EXTRA_OUTPUT. My code is same as this link: http://developer.android.com/training/camera/photobasics.html

However, saved photo has no exif. It has only size information. Here is my log:

TAG_APERTURE: null
TAG_DATETIME: null
TAG_EXPOSURE_TIME: null
TAG_FLASH: null
TAG_FOCAL_LENGTH: null
TAG_GPS_ALTITUDE: null
TAG_GPS_ALTITUDE_REF: null
TAG_GPS_DATESTAMP: null
TAG_GPS_LATITUDE: null
TAG_GPS_LATITUDE_REF: null
TAG_GPS_LONGITUDE: null
TAG_GPS_LONGITUDE_REF: null
TAG_GPS_PROCESSING_METHOD: null
TAG_GPS_TIMESTAMP: null
TAG_IMAGE_LENGTH: 3264
TAG_IMAGE_WIDTH: 2448
TAG_ISO: null
TAG_MAKE: null
TAG_MODEL: null
TAG_ORIENTATION: 0
TAG_WHITE_BALANCE: null

I set INTERNET, CAMERA, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE permissions.

My device is Nexus 5 and android version is 5.1.1.


回答1:


There is no requirement for any camera app to necessarily store any particular EXIF headers in the files. What the camera app does is up to the authors of the camera app, not you.

If you need to force certain EXIF headers to exist, you will need to put those EXIF headers in the file yourself.



来源:https://stackoverflow.com/questions/31171204/android-camera-saves-photo-without-exif

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