小编Mat*_* D.的帖子

复制图像会丢失Exif数据

我正在将图像复制到私人目录,如下所示:

FileChannel source = null;
FileChannel destination = null;
source = new FileInputStream(sourceFile).getChannel();
destination = new FileOutputStream(destFile).getChannel();
destination.transferFrom(source, 0, source.size());
source.close();
destination.close();
Run Code Online (Sandbox Code Playgroud)

..但是当我把它插回到Gallery中时,未被触及,以后:

private void moveImageToGallery(Uri inUri) throws Exception {
    MediaStore.Images.Media.insertImage(getContentResolver(), ImageUtil.loadFullBitmap(inUri.getPath()), null, null);
}
Run Code Online (Sandbox Code Playgroud)

..显然失去了它的Exif数据.轮换不再有效.有什么方法可以复制图像文件而不会丢失数据吗?谢谢你的任何建议.

android exif image

5
推荐指数
1
解决办法
1403
查看次数

标签 统计

android ×1

exif ×1

image ×1