Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.media.ExifInterface;

import java.io.IOException;

public class Main {

    public static int getOrientationFromExif(String localPath) {
        ExifInterface exif = null;
        int orientation = 0;
        try {
            exif = new ExifInterface(localPath);
            orientation = exif.getAttributeInt("Orientation", 0);
        } catch (IOException ex) {
        }
        return orientation;
    }
}