public class TGAWriter extends Object
Screenshot
class; can also be used in conjunction with the com.jogamp.opengl.util.gl2.TileRenderer
class.Constructor and Description |
---|
TGAWriter()
Constructor for the TGAWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
ByteBuffer |
getImageData()
Returns the ByteBuffer corresponding to the data for the image.
|
void |
open(File file,
int width,
int height,
boolean alpha)
Opens the specified Targa file for writing, overwriting any
existing file, and sets up the header of the file expecting the
data to be filled in before closing it.
|
public void open(File file, int width, int height, boolean alpha) throws IOException
file
- the file to write containing the screenshotwidth
- the width of the current drawableheight
- the height of the current drawablealpha
- whether the alpha channel should be saved. If true,
requires GL_EXT_abgr extension to be present.IOException
- if an I/O error occurred while writing the
filepublic ByteBuffer getImageData()
public void close() throws IOException
IOException
Copyright 2010 JogAmp Community.