compile "com.android.support:exifinterface:25.1.0"
来源:https://android-developers.googleblog.com/2016/12/introducing-the-exifinterface-support-library.html
本文介绍了ExifInterface支持库的使用方法。ExifInterface支持库是一个用于读写JPEG格式图像文件的API,它允许您读取和写入照片中的EXIF元数据。该支持库允许您检索有关照片的信息,例如拍摄日期、焦距、曝光时间等。此外,该支持库还提供了一种将GPS位置信息添加到照片中的方法。使用Android API无法从流中读取exif数据。ExifInterface没有带有InputStream的构造函数。
然而,您可以使用metadata-extractor并使用带有InputStream的构造函数,通过ByteArrayInputStream将您的字节数组作为支持的InputStream来构建。
Android API无法从Stream
中读取EXIF信息。