我想创建一个 jpg 并编辑它的 exif。
之前,我使用 ExifInterface:
ExifInterface exifInterface = new ExifInterface(filePath)
exifInterface.setAttribute(...)
exifInterface.setAttribute(...)
exifInterface.saveAttributes();
但在 Android Q 中,我只是从 MediaStore API 获得了一个图像 uri,而不是文件路径。我尝试使用它:
new ExifInterface(inputStream)
但是当我打电话时saveAttributes()
,它显示如下
java.io.IOException: Failed to copy original file to temp file
那么,有没有另一种方法来处理这个问题