Java tutorial
//package com.java2s; //License from project: Open Source License import android.media.ExifInterface; public class Main { private static float exifOrientationToDegrees(int exifOrientation) { float angle; switch (exifOrientation) { case ExifInterface.ORIENTATION_ROTATE_90: angle = 90; break; case ExifInterface.ORIENTATION_ROTATE_180: angle = 180; break; case ExifInterface.ORIENTATION_ROTATE_270: angle = 270; break; default: angle = 0; break; } return angle; } }