Class SGIImage

    • Method Detail

      • write

        public void write​(String filename,
                          boolean flipVertically)
                   throws IOException
        Writes this SGIImage to the specified file name. If flipVertically is set, outputs the scanlines from top to bottom rather than the default bottom to top order.
        Throws:
        IOException
      • write

        public void write​(File file,
                          boolean flipVertically)
                   throws IOException
        Writes this SGIImage to the specified file. If flipVertically is set, outputs the scanlines from top to bottom rather than the default bottom to top order.
        Throws:
        IOException
      • createFromData

        public static SGIImage createFromData​(int width,
                                              int height,
                                              boolean hasAlpha,
                                              byte[] data)
        Creates an SGIImage from the specified data in either RGB or RGBA format.
      • getWidth

        public int getWidth()
        Returns the width of the image.
      • getHeight

        public int getHeight()
        Returns the height of the image.
      • getFormat

        public int getFormat()
        Returns the OpenGL format for this texture; e.g. GL.GL_RGB or GL.GL_RGBA.
      • getData

        public byte[] getData()
        Returns the raw data for this texture in the correct (bottom-to-top) order for calls to glTexImage2D.