Android camera saves photo without ExIf

2019-07-23 11:08发布

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条回答
男人必须洒脱
2楼-- · 2019-07-23 11:48

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.

查看更多
登录 后发表回答