graphics
Class BitmapLoader
java.lang.Object
graphics.BitmapLoader
public class BitmapLoader
- extends Object
Windows bitmap file loader.
- Author:
- Abdul Bezrati, Pepijn Van Eeckhoudt
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 |
BitmapLoader
public BitmapLoader()
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