Enum TupleType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TupleType>

    enum TupleType
    extends java.lang.Enum<TupleType>
    • 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)
    • Field Detail

      • samplesPerPixel

        private final int samplesPerPixel
      • minMaxSample

        private final int minMaxSample
      • maxMaxSample

        private final int maxMaxSample
      • transparency

        private final int transparency
    • Constructor Detail

      • TupleType

        private TupleType​(int samplesPerPixel,
                          int minMaxSample,
                          int maxMaxSample,
                          int transparency)
    • 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 name
        java.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)