我正在将图像复制到私人目录,如下所示:
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数据.轮换不再有效.有什么方法可以复制图像文件而不会丢失数据吗?谢谢你的任何建议.