Enum Class Image.PixelFormat

java.lang.Object
java.lang.Enum<Image.PixelFormat>
edu.macalester.graphics.Image.PixelFormat
All Implemented Interfaces:
Serializable, Comparable<Image.PixelFormat>, Constable
Enclosing class:
Image

public static enum Image.PixelFormat extends Enum<Image.PixelFormat>
Describes the presence and order of color channels in an array of pixels. Used by the various methods for converting Images to and from arrays.
See Also:
  • Enum Constant Details

    • GRAYSCALE

      public static final Image.PixelFormat GRAYSCALE
      One array element per pixel, mapping to shades of gray.
    • RGB

      public static final Image.PixelFormat RGB
      Three array elements per pixel: [red, green, blue, red, green, blue…].
    • ARGB

      public static final Image.PixelFormat ARGB
      Four array elements per pixel: [alpha, red, green, blue, alpha, red, green, blue…].
  • Method Details

    • values

      public static Image.PixelFormat[] 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 Image.PixelFormat 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