Class TGAHeader


  • final class TGAHeader
    extends java.lang.Object
    • Field Detail

      • colorMapType

        private int colorMapType
      • imageType

        private int imageType
      • colorMapStart

        private int colorMapStart
      • colorMapSize

        private int colorMapSize
      • colorMapDepth

        private int colorMapDepth
      • x

        private int x
      • y

        private int y
      • width

        private int width
      • height

        private int height
      • pixelDepth

        private int pixelDepth
      • attributeBits

        private int attributeBits
      • origin

        int origin
      • interleave

        private int interleave
      • identification

        java.lang.String identification
      • colorMap

        private java.awt.image.IndexColorModel colorMap
    • Constructor Detail

      • TGAHeader

        TGAHeader()
    • Method Detail

      • getImageType

        int getImageType()
      • getWidth

        int getWidth()
      • getHeight

        int getHeight()
      • getPixelDepth

        int getPixelDepth()
      • getAttributeBits

        int getAttributeBits()
      • getOrigin

        int getOrigin()
      • getInterleave

        int getInterleave()
      • getIdentification

        java.lang.String getIdentification()
      • getColorMap

        java.awt.image.IndexColorModel getColorMap()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • from

        static TGAHeader from​(javax.imageio.ImageTypeSpecifier type,
                              boolean compressed)
      • from

        static TGAHeader from​(javax.imageio.ImageTypeSpecifier type,
                              int width,
                              int height,
                              boolean compressed)
      • getImageType

        private static int getImageType​(java.awt.image.ColorModel colorModel,
                                        boolean compressed)
      • write

        void write​(java.io.DataOutput stream)
            throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        static TGAHeader read​(javax.imageio.stream.ImageInputStream imageInput)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • readString

        static java.lang.String readString​(javax.imageio.stream.ImageInputStream stream,
                                           int maxLength)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • asZeroTerminatedASCIIString

        private static java.lang.String asZeroTerminatedASCIIString​(byte[] data)
      • readColorMap

        private static java.awt.image.IndexColorModel readColorMap​(java.io.DataInput stream,
                                                                   TGAHeader header)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException