Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do all the orientation constants of the ExifInterface class in Android mean?

I understand what the ORIENTATION_NORMAL, ORIENTATION_ROTATE_180, ORIENTATION_ROTATE_270, ORIENTATION_ROTATE_90 and ORIENTATION_UNDEFINED.

However i do not understand what ORIENTATION_FLIP_HORIZONTAL, ORIENTATION_FLIP_VERTICAL, ORIENTATION_TRANSPOSE and ORIENTATION_TRANSVERSE means in the ExifInterface class in Android. I have searched through Google and could not find anything.

Thanks in advance.

like image 795
Angelo Avatar asked Jul 25 '12 09:07

Angelo


People also ask

What is ExifInterface in Android?

[ ExifInterface ] is a class for reading and writing Exif tags in a JPEG file or a RAW image file. Exif is a specification for supporting metadata in a file, mostly used for JPEG, TIFF, and other image formats.

What is EXIF interface?

ExifInterface is used in writing the image information when the picture is taken. It is also helpful to handle orientation while saving the image to phone storage.


1 Answers

Here are comments from source code (android\media\ExifInterface.java):

// left right reversed mirror
public static final int ORIENTATION_FLIP_HORIZONTAL = 2;
// upside down mirror
public static final int ORIENTATION_FLIP_VERTICAL = 4;
// flipped about top-left <--> bottom-right axis
public static final int ORIENTATION_TRANSPOSE = 5;
// flipped about top-right <--> bottom-left axis
public static final int ORIENTATION_TRANSVERSE = 7;

I think they are self-explaining.

like image 82
StenaviN Avatar answered Oct 12 '22 09:10

StenaviN