I can’t understand a couple of days how to solve my inverted picture from the front camera on Android 4.
I want to turn them along this path, but for some reason the android does not detect the rules for the front camera and OS version.
public static float getDegree(int exifOrientation) {
if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_90)
return 180;
else if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_180)
return 270;
else if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_270)
return 0;
Camera.CameraInfo info = new Camera.CameraInfo();
android.hardware.Camera.getCameraInfo(0, info);
if (android.os.Build.VERSION.SDK_INT>13 && info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT)
{
return 270;
}
else {
return 90;
}
Any suggestions?
source
share