Enum PngColorType
- All Implemented Interfaces:
Serializable, Comparable<PngColorType>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]private final booleanprivate final booleanprivate final intprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePngColorType(int value, boolean greyscale, boolean alpha, int samplesPerPixel, int[] allowedBitDepths) -
Method Summary
Modifier and TypeMethodDescription(package private) static PngColorTypegetColorType(boolean alpha, boolean grayscale) static PngColorTypegetColorType(int value) (package private) int(package private) intgetValue()(package private) booleanhasAlpha()(package private) booleanisBitDepthAllowed(int bitDepth) (package private) booleanstatic PngColorTypeReturns the enum constant of this type with the specified name.static PngColorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
GREYSCALE
-
TRUE_COLOR
-
INDEXED_COLOR
-
GREYSCALE_WITH_ALPHA
-
TRUE_COLOR_WITH_ALPHA
-
-
Field Details
-
value
private final int value -
greyscale
private final boolean greyscale -
alpha
private final boolean alpha -
samplesPerPixel
private final int samplesPerPixel -
allowedBitDepths
private final int[] allowedBitDepths
-
-
Constructor Details
-
PngColorType
private PngColorType(int value, boolean greyscale, boolean alpha, int samplesPerPixel, int[] allowedBitDepths)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getColorType
-
getColorType
-
getSamplesPerPixel
int getSamplesPerPixel() -
getValue
int getValue() -
hasAlpha
boolean hasAlpha() -
isBitDepthAllowed
boolean isBitDepthAllowed(int bitDepth) -
isGreyscale
boolean isGreyscale()
-