com.jme.image
Class BitmapHeader

java.lang.Object
  extended by com.jme.image.BitmapHeader

public class BitmapHeader
extends java.lang.Object

BitmapHeader defines header information about a bitmap (BMP) image file format.

Version:
$Id: BitmapHeader.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Mark Powell

Field Summary
 int bitcount
          the number of bits that makes up the image.
 
Constructor Summary
BitmapHeader()
           
 
Method Summary
 void read(byte[] data)
          Reads in a bitmap header from the byte[] and chops it up into BitemapHeader variables
 java.awt.Image readMap24(byte[] data)
          readMap24 reads a 24 bit bitmap file.
 java.awt.Image readMap32(byte[] data)
          readMap32 reads a 32 bit bitmap file.
 java.awt.Image readMap8(byte[] data)
          readMap8 reads a 8 bit bitmap file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bitcount

public int bitcount
the number of bits that makes up the image.

Constructor Detail

BitmapHeader

public BitmapHeader()
Method Detail

readMap32

public java.awt.Image readMap32(byte[] data)
readMap32 reads a 32 bit bitmap file.

Parameters:
data - the byte data that contains the file information.
Returns:
the Image that contains the bitmap.

readMap24

public java.awt.Image readMap24(byte[] data)
                         throws java.io.IOException
readMap24 reads a 24 bit bitmap file.

Parameters:
data - the byte data that contains the file information.
Returns:
the Image that contains the bitmap.
Throws:
java.io.IOException

readMap8

public java.awt.Image readMap8(byte[] data)
readMap8 reads a 8 bit bitmap file.

Parameters:
data - the byte data that contains the file information.
Returns:
the Image that contains the bitmap.

read

public final void read(byte[] data)
Reads in a bitmap header from the byte[] and chops it up into BitemapHeader variables

Parameters:
data - The byte[] to read.