You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
CameraView/camerakit/src/main/utils/com/otaliastudios/cameraview/ExifUtils.java

28 lines
855 B

package com.otaliastudios.cameraview;
import android.support.media.ExifInterface;
class ExifUtils {
public static int getOrientationTag(int rotation, boolean flip) {
switch (rotation) {
case 90:
return flip ? ExifInterface.ORIENTATION_TRANSPOSE :
ExifInterface.ORIENTATION_ROTATE_90;
case 180:
return flip ? ExifInterface.ORIENTATION_FLIP_VERTICAL :
ExifInterface.ORIENTATION_ROTATE_180;
case 270:
return flip ? ExifInterface.ORIENTATION_TRANSVERSE :
ExifInterface.ORIENTATION_ROTATE_270;
case 0:
default:
return flip ? ExifInterface.ORIENTATION_FLIP_HORIZONTAL :
ExifInterface.ORIENTATION_NORMAL;
}
}
}