Android相机无需ExIf即可保存照片 [英] Android camera saves photo without ExIf

查看:232
本文介绍了Android相机无需ExIf即可保存照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用MediaStore.ACTION_IMAGE_CAPTURE意向拍照,并使用MediaStore.EXTRA_OUTPUT保存. 我的代码与此链接相同: http://developer.android.com/training/camera/photobasics.html

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

但是,保存的照片没有exif.它仅具有尺寸信息. 这是我的日志:

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

我设置了INTERNET,CAMERA,READ_EXTERNAL_STORAGE和WRITE_EXTERNAL_STORAGE权限.

I set INTERNET, CAMERA, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE permissions.

我的设备是Nexus 5,Android版本是5.1.1.

My device is Nexus 5 and android version is 5.1.1.

推荐答案

不需要任何相机应用程序在文件中存储任何特定的EXIF标头.相机应用程序的工作取决于相机应用程序的作者,而不是您自己.

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.

如果您需要强制某些EXIF标头存在,则需要自己将这些EXIF标头放入文件中.

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

这篇关于Android相机无需ExIf即可保存照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆