Convert exif To Translation - Android Graphics

Android examples for Graphics:Bitmap Rotate

Description

Convert exif To Translation

Demo Code


//package com.java2s;

import android.media.ExifInterface;

public class Main {
    private static int exifToTranslation(int exifOrientation) {
        int translation;
        switch (exifOrientation) {
        case ExifInterface.ORIENTATION_FLIP_HORIZONTAL:
        case ExifInterface.ORIENTATION_FLIP_VERTICAL:
        case ExifInterface.ORIENTATION_TRANSPOSE:
        case ExifInterface.ORIENTATION_TRANSVERSE:
            translation = -1;//  w ww.ja  v  a2s .c  om
            break;
        default:
            translation = 1;
        }
        return translation;
    }
}

Related Tutorials