Enum TupleType
- java.lang.Object
-
- java.lang.Enum<TupleType>
-
- com.twelvemonkeys.imageio.plugins.pnm.TupleType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLACKANDWHITEB/W, but uses 1 byte (8 bits) per pixel.BLACKANDWHITE_ALPHAB/W + bit mask, uses 2 bytes per pixel.BLACKANDWHITE_WHITE_IS_ZERO1 bit B/W.CMYKCMYK color.CMYK_ALPHACMYK color + alpha.GRAYSCALEGrayscale, as PGM.GRAYSCALE_ALPHAGrayscale + alpha.RGBRGB color, as PPM.RGB_ALPHARGB color + alpha.
-
Field Summary
Fields Modifier and Type Field Description private intmaxMaxSampleprivate intminMaxSampleprivate intsamplesPerPixelprivate inttransparency
-
Constructor Summary
Constructors Modifier Constructor Description privateTupleType(int samplesPerPixel, int minMaxSample, int maxMaxSample, int transparency)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static TupleTypefilterPNM(TupleType tupleType)(package private) static TupleTypeforPAM(java.awt.image.Raster raster)(package private) static TupleTypeforPAM(javax.imageio.ImageTypeSpecifier type)(package private) static TupleTypeforPNM(java.awt.image.Raster raster)(package private) static TupleTypeforPNM(javax.imageio.ImageTypeSpecifier type)intgetSamplesPerPixel()intgetTransparency()booleanisValidMaxSample(int maxSample)static TupleTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TupleType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BLACKANDWHITE
public static final TupleType BLACKANDWHITE
B/W, but uses 1 byte (8 bits) per pixel. Black is zero (opposite of PBM)
-
BLACKANDWHITE_ALPHA
public static final TupleType BLACKANDWHITE_ALPHA
B/W + bit mask, uses 2 bytes per pixel. Black is zero (opposite of PBM)
-
GRAYSCALE
public static final TupleType GRAYSCALE
Grayscale, as PGM.
-
GRAYSCALE_ALPHA
public static final TupleType GRAYSCALE_ALPHA
Grayscale + alpha. YA order.
-
RGB
public static final TupleType RGB
RGB color, as PPM. RGB order.
-
RGB_ALPHA
public static final TupleType RGB_ALPHA
RGB color + alpha. RGBA order.
-
CMYK
public static final TupleType CMYK
CMYK color. CMYK order.
-
CMYK_ALPHA
public static final TupleType CMYK_ALPHA
CMYK color + alpha. CMYKA order.
-
BLACKANDWHITE_WHITE_IS_ZERO
public static final TupleType BLACKANDWHITE_WHITE_IS_ZERO
1 bit B/W. White is zero (as PBM)
-
-
Method Detail
-
values
public static TupleType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TupleType c : TupleType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TupleType valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getTransparency
public int getTransparency()
-
getSamplesPerPixel
public int getSamplesPerPixel()
-
isValidMaxSample
public boolean isValidMaxSample(int maxSample)
-
forPNM
static TupleType forPNM(java.awt.image.Raster raster)
-
forPNM
static TupleType forPNM(javax.imageio.ImageTypeSpecifier type)
-
forPAM
static TupleType forPAM(java.awt.image.Raster raster)
-
forPAM
static TupleType forPAM(javax.imageio.ImageTypeSpecifier type)
-
-