public final class TGALoader extends java.lang.Object implements AssetLoader
TextureManager
provides static methods for building a
Texture
object. Typically, the information supplied is the
filename and the texture properties.Modifier and Type | Field and Description |
---|---|
static int |
TYPE_BLACKANDWHITE |
static int |
TYPE_BLACKANDWHITE_RLE |
static int |
TYPE_COLORMAPPED |
static int |
TYPE_COLORMAPPED_RLE |
static int |
TYPE_NO_IMAGE |
static int |
TYPE_TRUECOLOR |
static int |
TYPE_TRUECOLOR_RLE |
Constructor and Description |
---|
TGALoader() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
load(AssetInfo info)
Loads asset from the given input stream, parsing it into
an application-usable object.
|
static Image |
load(java.io.InputStream in,
boolean flip)
loadImage is a manual image loader which is entirely
independent of AWT. |
public static final int TYPE_NO_IMAGE
public static final int TYPE_COLORMAPPED
public static final int TYPE_TRUECOLOR
public static final int TYPE_BLACKANDWHITE
public static final int TYPE_COLORMAPPED_RLE
public static final int TYPE_TRUECOLOR_RLE
public static final int TYPE_BLACKANDWHITE_RLE
public java.lang.Object load(AssetInfo info) throws java.io.IOException
AssetLoader
load
in interface AssetLoader
info
- the located assetjava.io.IOException
- If an I/O error occurs while loadingpublic static Image load(java.io.InputStream in, boolean flip) throws java.io.IOException
loadImage
is a manual image loader which is entirely
independent of AWT. OUT: RGB888 or RGBA8888 Image objectin
- InputStream of an uncompressed 24b RGB or 32b RGBA TGAflip
- Flip the image verticallyImage
object that contains the
image, either as a RGB888 or RGBA8888java.io.IOException
- if an I/O error occurs