Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.media.ExifInterface;

public class Main {
    /**
     * Converts the given Exif Orientation to a degree for rotation.
     * 
     * @param exifOrientation
     *            the ExifInterface code for the orientation
     * @return the rotation as a <code>float</code>
     */
    private static float exifOrientationToDegrees(int exifOrientation) {
        if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_90) {
            return 90;
        } else if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_180) {
            return 180;
        } else if (exifOrientation == ExifInterface.ORIENTATION_ROTATE_270) {
            return 270;
        }
        return 0;
    }
}