Enum Class Orientation

java.lang.Object
java.lang.Enum<Orientation>
is.galia.image.Orientation
All Implemented Interfaces:
Serializable, Comparable<Orientation>, Constable

public enum Orientation extends Enum<Orientation>

Image orientation.

This is used to support images with orientations that differ from those of their pixel data. It aligns with the TIFF/EXIF Orientation tag, but it currently supports only rotation and not flipping.

  • Enum Constant Details

    • ROTATE_0

      public static final Orientation ROTATE_0
      No rotation. (TIFF Orientation value 1)
    • ROTATE_90

      public static final Orientation ROTATE_90
      The image is rotated counter-clockwise (or, the view is rotated clockwise) 90 degrees. Orienting it will require rotating it 90 degrees clockwise. (TIFF Orientation value 6; "right top")
    • ROTATE_180

      public static final Orientation ROTATE_180
      The image is rotated 180 degrees. (TIFF Orientation value 3; "bottom right")
    • ROTATE_270

      public static final Orientation ROTATE_270
      The image is rotated counter-clockwise (or, the view is rotated clockwise) 270 degrees. Orienting it will require rotating it 90 degrees counter-clockwise. (TIFF Orientation value 8; "left bottom")
  • Method Details

    • values

      public static Orientation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Orientation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forTIFFOrientation

      public static Orientation forTIFFOrientation(int value)
      Parameters:
      value - TIFF/EXIF Orientation tag value.
      Returns:
      Orientation corresponding to the given tag value.
      Throws:
      IllegalArgumentException - if the value is not supported.
    • adjustedSize

      public Size adjustedSize(Size size)
      Returns:
      Orientation-adjusted size.
    • degrees

      public int degrees()
    • tiffValue

      public int tiffValue()