graphics
Class BitmapLoader

java.lang.Object
  extended by graphics.BitmapLoader

public class BitmapLoader
extends Object

Windows bitmap file loader.

Author:
Abdul Bezrati, Pepijn Van Eeckhoudt

Constructor Summary
BitmapLoader()
           
 
Method Summary
private static int bytesToInt(byte[] bytes, int index)
           
private static short bytesToShort(byte[] bytes, int index)
           
static BufferedImage loadBitmap(String file)
           
private static BufferedImage read24BitBitmap(int nSizeImage, int nHeight, int nWidth, InputStream input)
           
private static BufferedImage read8BitBitmap(int nColoursUsed, int nBitCount, int nSizeImage, int nWidth, int nHeight, InputStream input)
           
private static void readBuffer(InputStream in, byte[] buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitmapLoader

public BitmapLoader()
Method Detail

loadBitmap

public static BufferedImage loadBitmap(String file)
                                throws IOException
Throws:
IOException

read8BitBitmap

private static BufferedImage read8BitBitmap(int nColoursUsed,
                                            int nBitCount,
                                            int nSizeImage,
                                            int nWidth,
                                            int nHeight,
                                            InputStream input)
                                     throws IOException
Throws:
IOException

read24BitBitmap

private static BufferedImage read24BitBitmap(int nSizeImage,
                                             int nHeight,
                                             int nWidth,
                                             InputStream input)
                                      throws IOException
Throws:
IOException

bytesToInt

private static int bytesToInt(byte[] bytes,
                              int index)

bytesToShort

private static short bytesToShort(byte[] bytes,
                                  int index)

readBuffer

private static void readBuffer(InputStream in,
                               byte[] buffer)
                        throws IOException
Throws:
IOException