Package se.datadosen.util
Class RotationSupport
java.lang.Object
se.datadosen.util.RotationSupport
- Direct Known Subclasses:
GenericRotationSupport
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
adjustOrientation
(BufferedImage bi, int existingOrientation) static BufferedImage
adjustOrientation
(BufferedImage bi, com.drew.metadata.Metadata meta) static BufferedImage
adjustOrientation
(BufferedImage bi, File file) static BufferedImage
adjustOrientation
(BufferedImage bi, String existingOrientation) static BufferedImage
adjustOrientation
(BufferedImage bi, Orientation existingOrientation) static ImageIcon
adjustOrientation
(ImageIcon ii, com.drew.metadata.Metadata meta) static ImageIcon
adjustOrientation
(ImageIcon ii, File file) protected static String
asString
(int orientation) protected static BufferedImage
createBufferedImage
(Image img, int iw, int ih) static BufferedImage
flip
(BufferedImage bi, boolean vertically) static int
getOrientation
(com.drew.metadata.Metadata meta) static int
getOrientation
(File file) Get image orientation without using MetadataExtractorstatic String
getOrientationAsString
(com.drew.metadata.Metadata meta) static String
getOrientationAsString
(File file) static BufferedImage
static BufferedImage
static BufferedImage
static boolean
setOrientation
(int orientation, File file)
-
Field Details
-
LEFT_ROTATED_FLIPPED
public static final int LEFT_ROTATED_FLIPPED- See Also:
-
LEFT_ROTATED
public static final int LEFT_ROTATED- See Also:
-
NOT_ROTATED
public static final int NOT_ROTATED- See Also:
-
NOT_ROTATED_FLIPPED
public static final int NOT_ROTATED_FLIPPED- See Also:
-
RIGHT_ROTATED_FLIPPED
public static final int RIGHT_ROTATED_FLIPPED- See Also:
-
RIGHT_ROTATED
public static final int RIGHT_ROTATED- See Also:
-
UPSIDE_DOWN
public static final int UPSIDE_DOWN- See Also:
-
UPSIDE_DOWN_FLIPPED
public static final int UPSIDE_DOWN_FLIPPED- See Also:
-
-
Constructor Details
-
RotationSupport
public RotationSupport()
-
-
Method Details
-
flip
-
rotate180
-
rotateLeft
-
rotateRight
-
adjustOrientation
-
adjustOrientation
-
createBufferedImage
-
adjustOrientation
-
adjustOrientation
-
getOrientation
public static int getOrientation(com.drew.metadata.Metadata meta) -
getOrientationAsString
-
getOrientation
Get image orientation without using MetadataExtractor- Parameters:
file
-- Returns:
- Throws:
IOException
-
getOrientationAsString
-
setOrientation
- Throws:
IOException
-
asString
-
adjustOrientation
-
adjustOrientation
-
adjustOrientation
-