com.jme.image.util
Class TGALoader

java.lang.Object
  extended by com.jme.image.util.TGALoader

public final class TGALoader
extends java.lang.Object

TextureManager provides static methods for building a Texture object. Typically, the information supplied is the filename and the texture properties.

Version:
$Id: TGALoader.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Mark Powell, Joshua Slack - cleaned, commented, added ability to read 16bit true color and color-mapped TGAs.

Nested Class Summary
(package private) static class TGALoader.ColorMapEntry
           
 
Field Summary
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
           
 
Method Summary
static Image loadImage(java.io.InputStream fis)
          loadImage is a manual image loader which is entirely independent of AWT.
static Image loadImage(java.io.InputStream fis, boolean flip)
           
static Image loadImage(java.io.InputStream fis, boolean flip, boolean exp32)
          loadImage is a manual image loader which is entirely independent of AWT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NO_IMAGE

public static final int TYPE_NO_IMAGE
See Also:
Constant Field Values

TYPE_COLORMAPPED

public static final int TYPE_COLORMAPPED
See Also:
Constant Field Values

TYPE_TRUECOLOR

public static final int TYPE_TRUECOLOR
See Also:
Constant Field Values

TYPE_BLACKANDWHITE

public static final int TYPE_BLACKANDWHITE
See Also:
Constant Field Values

TYPE_COLORMAPPED_RLE

public static final int TYPE_COLORMAPPED_RLE
See Also:
Constant Field Values

TYPE_TRUECOLOR_RLE

public static final int TYPE_TRUECOLOR_RLE
See Also:
Constant Field Values

TYPE_BLACKANDWHITE_RLE

public static final int TYPE_BLACKANDWHITE_RLE
See Also:
Constant Field Values
Method Detail

loadImage

public static Image loadImage(java.io.InputStream fis)
                       throws java.io.IOException
loadImage is a manual image loader which is entirely independent of AWT. OUT: RGB888 or RGBA8888 jme.image.Image object

Parameters:
fis - InputStream of an uncompressed 24b RGB or 32b RGBA TGA
Returns:
com.jme.image.Image object that contains the image, either as a RGB888 or RGBA8888
Throws:
java.io.IOException

loadImage

public static Image loadImage(java.io.InputStream fis,
                              boolean flip)
                       throws java.io.IOException
Parameters:
fis - InputStream of an uncompressed 24b RGB or 32b RGBA TGA
flip - Flip the image
Returns:
com.jme.image.Image object that contains the image, either as a RGB888 or RGBA8888
Throws:
java.io.IOException

loadImage

public static Image loadImage(java.io.InputStream fis,
                              boolean flip,
                              boolean exp32)
                       throws java.io.IOException
loadImage is a manual image loader which is entirely independent of AWT. OUT: RGB888 or RGBA8888 jme.image.Image object

Parameters:
flip - Flip the image vertically
exp32 - Add a dummy Alpha channel to 24b RGB image.
fis - InputStream of an uncompressed 24b RGB or 32b RGBA TGA
Returns:
com.jme.image.Image object that contains the image, either as a RGB888 or RGBA8888
Throws:
java.io.IOException