Package edu.macalester.graphics
Enum Class Image.PixelFormat
- All Implemented Interfaces:
Serializable
,Comparable<Image.PixelFormat>
,Constable
- Enclosing class:
- Image
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Image.PixelFormat
Returns the enum constant of this class with the specified name.static Image.PixelFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GRAYSCALE
One array element per pixel, mapping to shades of gray. -
RGB
Three array elements per pixel: [red, green, blue, red, green, blue…]. -
ARGB
Four array elements per pixel: [alpha, red, green, blue, alpha, red, green, blue…].
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-