|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.opengl.util.texture.spi.SGIImage
Reads and writes SGI RGB/RGBA images.
Written from Paul Bourke's adaptation of the SGI specification.
Method Summary | |
static SGIImage |
createFromData(int width,
int height,
boolean hasAlpha,
byte[] data)
Creates an SGIImage from the specified data in either RGB or RGBA format. |
byte[] |
getData()
Returns the raw data for this texture in the correct (bottom-to-top) order for calls to glTexImage2D. |
int |
getFormat()
Returns the OpenGL format for this texture; e.g. |
int |
getHeight()
Returns the height of the image. |
int |
getWidth()
Returns the width of the image. |
static boolean |
isSGIImage(InputStream in)
Determines from the magic number whether the given InputStream points to an SGI RGB image. |
static SGIImage |
read(InputStream in)
Reads an SGI image from the specified InputStream. |
static SGIImage |
read(String filename)
Reads an SGI image from the specified file. |
String |
toString()
|
void |
write(File file,
boolean flipVertically)
Writes this SGIImage to the specified file. |
void |
write(String filename,
boolean flipVertically)
Writes this SGIImage to the specified file name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static SGIImage read(String filename) throws IOException
IOException
public static SGIImage read(InputStream in) throws IOException
IOException
public void write(String filename, boolean flipVertically) throws IOException
IOException
public void write(File file, boolean flipVertically) throws IOException
IOException
public static SGIImage createFromData(int width, int height, boolean hasAlpha, byte[] data)
public static boolean isSGIImage(InputStream in) throws IOException
IOException
public int getWidth()
public int getHeight()
public int getFormat()
public byte[] getData()
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |