2

In Android 2.2 is there a way to rotate a photograph without losing the Exif and other metadata? I tried using the Matrix class but it drops the metadata.

2 Answers 2

3

You could read the EXIF data, rotate the image, and then write the EXIF data. ExifInterface has been available since API 5. I found an example of writing exif here: Android write EXIF GPS Latitude and Longitude onto JPEG failed

1

Based on my research (Nov 2012), there is no way to preserve the exif metadata automatically if you resize the image (or otherwise process it via the Bitmap* classes).

You must specifically retrieve and copy the exif properties by name. This blog post was very helpful:

http://vikaskanani.wordpress.com/2011/07/17/android-re-size-image-without-loosing-exif-information/

And I wrote up my own experience here:

Android Image Resizing and Preserving EXIF data (Orientation, Rotation, etc)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.