sephiroth74 / Android-Exif-Extended

Exif extended library for Android, based on jhead c library (http://www.sentex.net/~mwandel/jhead/)
Other
135 stars 45 forks source link

v1.0.6. writeExif(String dstFilename) does not save exif metadata #12

Open kestasb opened 9 years ago

kestasb commented 9 years ago

If I set a new TAG_ORIENTATION value using exifInterface.setTagValue(ExifInterface.TAG_ORIENTATION, newValue); and then use exifInterface.writeExif(dstFilename), new orientation value is not saved.

Robyer commented 8 years ago

You need to use buildTag() and setTag() instead of setTagValue().

ExifInterface exif = new ExifInterface();
exif.setTag(exif.buildTag(ExifInterface.TAG_ORIENTATION, ExifInterface.getOrientationValueForRotation(rotation)));
exif.writeExif(...);