org.jagatoo.loaders.textures.formats
Class TextureImageFormatLoaderBMP

java.lang.Object
  extended by org.jagatoo.loaders.textures.formats.TextureImageFormatLoaderBMP
All Implemented Interfaces:
TextureImageFormatLoader

public class TextureImageFormatLoaderBMP
extends java.lang.Object
implements TextureImageFormatLoader

Handles dealing with windows bitmap files. This class doesn't handle palettized files. +--------------------------------------+ | Bitmap File Header | +--------------------------------------+ | Bitmap Information Header | +--------------------------------------+ | Palette Data (only in 8 bit files) | +--------------------------------------+ | Bitmap Data | +--------------------------------------+


Constructor Summary
TextureImageFormatLoaderBMP()
           
 
Method Summary
 AbstractTextureImage loadTextureImage(java.io.BufferedInputStream in, boolean acceptAlpha, boolean flipVertically, boolean allowStreching, TextureFactory texFactory)
          Tries to load an AbstractTextureImage from the InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextureImageFormatLoaderBMP

public TextureImageFormatLoaderBMP()
Method Detail

loadTextureImage

public AbstractTextureImage loadTextureImage(java.io.BufferedInputStream in,
                                             boolean acceptAlpha,
                                             boolean flipVertically,
                                             boolean allowStreching,
                                             TextureFactory texFactory)
                                      throws java.io.IOException
Tries to load an AbstractTextureImage from the InputStream.

Important: No implementation of TextureImageLoader must ever call mark() on the InputStream in.

Specified by:
loadTextureImage in interface TextureImageFormatLoader
allowStreching - If true, the image is streched to power-of-two width and height, if necessary.
Returns:
the AbstractTextureImage.
Throws:
java.io.IOException