如何将ExifInterface设置为缩略图?

时间:2014-05-07 09:41:52

标签: android android-image

我有一张图片和一张缩略图。我想将缩略图的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设置为缩略图图像?

0 个答案:

没有答案