Package com.day.cq.dam.commons.util
Class OrientationUtil
- java.lang.Object
 - 
- com.day.cq.dam.commons.util.OrientationUtil
 
 
- 
public class OrientationUtil extends java.lang.ObjectTheOrientationUtilhelps in adjusting aLayerto the orientation stored in the image's EXIF or TIFF metadata. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static shortORIENTATION_MIRROR_HORIZONTALstatic shortORIENTATION_MIRROR_HORIZONTAL_ROTATE_270_CWstatic shortORIENTATION_MIRROR_HORIZONTAL_ROTATE_90_CWstatic shortORIENTATION_MIRROR_VERTICALstatic shortORIENTATION_NORMALstatic shortORIENTATION_ROTATE_180static shortORIENTATION_ROTATE_270_CWstatic shortORIENTATION_ROTATE_90_CW 
- 
Constructor Summary
Constructors Constructor Description OrientationUtil() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidadjustOrientation(Asset asset, Layer layer)Adjust the given layer to the orientation stored in the asset's metadata.static shortgetOrientation(Asset asset)Get the exif orientation flag from the asset metadata.static booleanhasOrientationMetadata(Asset asset)Check if asset contains metadata for orientation. 
 - 
 
- 
- 
Field Detail
- 
ORIENTATION_NORMAL
public static final short ORIENTATION_NORMAL
- See Also:
 - Constant Field Values
 
 
- 
ORIENTATION_MIRROR_HORIZONTAL
public static final short ORIENTATION_MIRROR_HORIZONTAL
- See Also:
 - Constant Field Values
 
 
- 
ORIENTATION_ROTATE_180
public static final short ORIENTATION_ROTATE_180
- See Also:
 - Constant Field Values
 
 
- 
ORIENTATION_MIRROR_VERTICAL
public static final short ORIENTATION_MIRROR_VERTICAL
- See Also:
 - Constant Field Values
 
 
- 
ORIENTATION_MIRROR_HORIZONTAL_ROTATE_270_CW
public static final short ORIENTATION_MIRROR_HORIZONTAL_ROTATE_270_CW
- See Also:
 - Constant Field Values
 
 
- 
ORIENTATION_ROTATE_90_CW
public static final short ORIENTATION_ROTATE_90_CW
- See Also:
 - Constant Field Values
 
 
- 
ORIENTATION_MIRROR_HORIZONTAL_ROTATE_90_CW
public static final short ORIENTATION_MIRROR_HORIZONTAL_ROTATE_90_CW
- See Also:
 - Constant Field Values
 
 
- 
ORIENTATION_ROTATE_270_CW
public static final short ORIENTATION_ROTATE_270_CW
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
hasOrientationMetadata
public static boolean hasOrientationMetadata(Asset asset)
Check if asset contains metadata for orientation.- Parameters:
 asset- The asset- Returns:
 trueif orientation metadata exists
 
- 
getOrientation
public static short getOrientation(Asset asset)
Get the exif orientation flag from the asset metadata.- Parameters:
 asset- the asset- Returns:
 - the EXIF orientation flag (1-8)
 
 
 - 
 
 -