|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Targa image reader and writer adapted from sources of the Jimi image I/O class library. More...
Classes | |
| class | Header |
| This class reads in all of the TGA image header in addition it also reads in the imageID field as it is convenient to handle that here. More... | |
Public Member Functions | |
| int | getWidth () |
| Returns the width of the image. More... | |
| int | getHeight () |
| Returns the height of the image. More... | |
| int | getGLFormat () |
| Returns the OpenGL format for this texture; e.g. More... | |
| int | getBytesPerPixel () |
| Returns the bytes per pixel. More... | |
| ByteBuffer | getData () |
| Returns the raw data for this texture in the correct (bottom-to-top) order for calls to glTexImage2D. More... | |
| void | write (final String filename) throws IOException |
| Writes the image in Targa format to the specified file name. More... | |
| void | write (final File file) throws IOException |
| Writes the image in Targa format to the specified file. More... | |
Static Public Member Functions | |
| static TGAImage | read (final GLProfile glp, final String filename) throws IOException |
| Reads a Targa image from the specified file. More... | |
| static TGAImage | read (final GLProfile glp, final InputStream in) throws IOException |
| Reads a Targa image from the specified InputStream. More... | |
| static TGAImage | createFromData (final int width, final int height, final boolean hasAlpha, final boolean topToBottom, final ByteBuffer data) |
| Creates a TGAImage from data supplied by the end user. More... | |
Targa image reader and writer adapted from sources of the Jimi image I/O class library.
Image decoder for image data stored in TGA file format. Currently only the original TGA file format is supported. This is because the new TGA format has data at the end of the file, getting to the end of a file in an InputStream orient environment presents several difficulties which are avoided at the moment.
This is a simple decoder and is only setup to load a single image from the input stream
Definition at line 73 of file TGAImage.java.
|
static |
Creates a TGAImage from data supplied by the end user.
Shares data with the passed ByteBuffer. Assumes the data is already in the correct byte order for writing to disk, i.e., BGR or BGRA.
Definition at line 440 of file TGAImage.java.
| int com.jogamp.opengl.util.texture.spi.TGAImage.getBytesPerPixel | ( | ) |
Returns the bytes per pixel.
Definition at line 394 of file TGAImage.java.
| ByteBuffer com.jogamp.opengl.util.texture.spi.TGAImage.getData | ( | ) |
Returns the raw data for this texture in the correct (bottom-to-top) order for calls to glTexImage2D.
Definition at line 398 of file TGAImage.java.
| int com.jogamp.opengl.util.texture.spi.TGAImage.getGLFormat | ( | ) |
Returns the OpenGL format for this texture; e.g.
GL.GL_BGR or GL.GL_BGRA.
Definition at line 391 of file TGAImage.java.
| int com.jogamp.opengl.util.texture.spi.TGAImage.getHeight | ( | ) |
Returns the height of the image.
Definition at line 388 of file TGAImage.java.
| int com.jogamp.opengl.util.texture.spi.TGAImage.getWidth | ( | ) |
Returns the width of the image.
Definition at line 385 of file TGAImage.java.
|
static |
Reads a Targa image from the specified InputStream.
Definition at line 406 of file TGAImage.java.
|
static |
Reads a Targa image from the specified file.
Definition at line 401 of file TGAImage.java.
| void com.jogamp.opengl.util.texture.spi.TGAImage.write | ( | final File | file | ) | throws IOException |
Writes the image in Targa format to the specified file.
Definition at line 421 of file TGAImage.java.
| void com.jogamp.opengl.util.texture.spi.TGAImage.write | ( | final String | filename | ) | throws IOException |
Writes the image in Targa format to the specified file name.
Definition at line 416 of file TGAImage.java.