我有一张图片和一张缩略图。我想将缩略图的ExifInterface
设置为图像的ExifInterface
。我使用此代码,但它不起作用:
ExifInterface of = new ExifInterface(lastFile);
int orientation = of.getAttributeInt(
ExifInterface.TAG_ORIENTATION, 0); //orientation=6
ExifInterface exifi = new ExifInterface(strFileThumnail);
// exifi.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0) =0
exifi.setAttribute(ExifInterface.TAG_ORIENTATION,String.valueOf(orientation));
exifi.saveAttributes();
// exifi.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0) =6
设置完成后,我使用此代码获取信息:
exifi = new ExifInterface(strFileThumnail);
// result still : exifi.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0) =0
如何将ExifInterface
设置为缩略图图像?