3

How could I get current rotation of image on Android 1.6? As for android 2.0 I use ExifInterface , but it isn't available at android 1.6 I want realize smth like this on android 1.6

ExifInterface exif = new ExifInterface(path);
             int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1);
             if (orientation != -1) {
                     // recognize a subset of orientation tag values.
                     switch (orientation) {
                     case ExifInterface.ORIENTATION_ROTATE_90:
                         degree = 90;
                         break;
                     case ExifInterface.ORIENTATION_ROTATE_180:
                         degree = 180;
                         break;
                     case ExifInterface.ORIENTATION_ROTATE_270:
                         degree = 270;
                         break;
                     default:
                         degree = 0;
                         break;
                     }
                 }
vic
  • 31
  • 2

0 Answers0