Dekoh platform API

dekoh.portal.fwk.image
Class EXIFOrientation

java.lang.Object
  extended by java.lang.Enum
      extended by dekoh.portal.fwk.image.EXIFOrientation
All Implemented Interfaces:
Serializable, Comparable

public final class EXIFOrientation
extends Enum

The Exif orientation value gives the orientation of the camera relative to the scene when the image was captured. The relation of the '0th row' and '0th column' to visual position is shown as below.

Value0th Row0th Column
1 top left side
2 top rigth side
3 bottom rigth side
4 bottom left side
5 left side top
6 right side top
7 right side bottom
8 left side bottom
For convenience, here is what the letter F would look like if it were tagged correctly and displayed by a program that ignores the orientation tag:
   1        2       3      4         5            6           7          8

 888888  888888      88  88      8888888888  88                  88  8888888888
 88          88      88  88      88  88      88  88          88  88      88  88
 8888      8888    8888  8888    88          8888888888  8888888888          88
 88          88      88  88
 88          88  888888  888888
 

Since:
Mar 12, 2007
See Also:
Serialized Form

Field Summary
static EXIFOrientation BOTTOM_LEFT
           
static EXIFOrientation BOTTOM_RIGHT
           
static EXIFOrientation LEFT_BOTTOM
           
static EXIFOrientation LEFT_TOP
           
static EXIFOrientation RIGHT_BOTTOM
           
static EXIFOrientation RIGHT_TOP
           
static EXIFOrientation TOP_LEFT
           
static EXIFOrientation TOP_RIGHT
           
 
Method Summary
 EXIFOrientation compensateForRotation(int toDegree)
          Gets orientation for an image which after a rotation by toDegrees will be in the orientation denoted by the current instance.
 byte getByteValue()
           
static EXIFOrientation getEXIFOrientation(byte byteValue)
           
static EXIFOrientation getEXIFOrientation(int orientation)
           
 EXIFOrientation mirror()
           
static EXIFOrientation valueOf(String name)
           
static EXIFOrientation[] values()
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TOP_LEFT

public static final EXIFOrientation TOP_LEFT

TOP_RIGHT

public static final EXIFOrientation TOP_RIGHT

BOTTOM_RIGHT

public static final EXIFOrientation BOTTOM_RIGHT

BOTTOM_LEFT

public static final EXIFOrientation BOTTOM_LEFT

LEFT_TOP

public static final EXIFOrientation LEFT_TOP

RIGHT_TOP

public static final EXIFOrientation RIGHT_TOP

RIGHT_BOTTOM

public static final EXIFOrientation RIGHT_BOTTOM

LEFT_BOTTOM

public static final EXIFOrientation LEFT_BOTTOM
Method Detail

values

public static final EXIFOrientation[] values()

valueOf

public static EXIFOrientation valueOf(String name)

getByteValue

public byte getByteValue()

getEXIFOrientation

public static EXIFOrientation getEXIFOrientation(int orientation)
Parameters:
orientation - number between 1 and 8
Returns:
EXIFOrientation enum const for given value

getEXIFOrientation

public static EXIFOrientation getEXIFOrientation(byte byteValue)

compensateForRotation

public EXIFOrientation compensateForRotation(int toDegree)
Gets orientation for an image which after a rotation by toDegrees will be in the orientation denoted by the current instance.

Parameters:
toDegree - degree rotated (multiple of 90 only)
Returns:
EXIFOrientation the original orientation which after rotation of toDegree will return the current orientation.

mirror

public EXIFOrientation mirror()

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers