|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gameframe.graphics.BitmapFile
Represents Windows Bitmap (BMP) file and has utility methods for loading a Windows Bitmap file and returning its bitmap data.
Constructor Summary | |
BitmapFile()
|
Method Summary | |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
The image observer method that gets updated when an image is loading. |
static BitmapData |
loadBMP(java.io.InputStream inStream,
java.lang.String strFileName,
boolean fEnableAlpha)
Handles the loading of the bitmap from the given input stream. |
static BitmapData |
loadBMP(java.io.InputStream inStream,
java.lang.String strFileName,
byte alphakeyRed,
byte alphakeyGreen,
byte alphakeyBlue)
Handles the loading of the bitmap from the given input stream. |
static BitmapData |
loadBMP(java.lang.String strFileName,
boolean fEnableAlpha)
Loads the given file containing a Windows BMP formatted bitmap and returns an object containing the raw pixel data and the dimensions of the loaded bitmap. |
static BitmapData |
loadBMP(java.lang.String strFileName,
byte red,
byte green,
byte blue)
Loads the given file containing a Windows BMP formatted bitmap and returns an object containing the raw pixel data and the dimensions of the loaded bitmap. |
static BitmapData |
loadBMPURL(java.lang.String strFileName,
boolean fEnableAlpha)
Loads the file at the given URL containing a Windows BMP formatted bitmap and returns an object containing the raw pixel data and the dimensions of the loaded bitmap. |
static BitmapData |
loadBMPURL(java.lang.String strFileName,
byte red,
byte green,
byte blue)
Loads the file at the given URL containing a Windows BMP formatted bitmap and returns an object containing the raw pixel data and the dimensions of the loaded bitmap. |
static void |
saveBMP(java.lang.String strFileName,
BitmapData bitmapData)
Saves the given bitmap to a Windows BMP formatted file. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BitmapFile()
Method Detail |
public boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
public static void saveBMP(java.lang.String strFileName, BitmapData bitmapData) throws GameFrameException
strFileName
- The name of the file to save to.bitmapData
- The bitmap data (width, height and raw pixel data).public static final BitmapData loadBMPURL(java.lang.String strFileName, boolean fEnableAlpha) throws java.io.FileNotFoundException, GameFrameException
strFileName
- The name of the file to load.fEnableAlpha
- True if bitmap is to be loaded as alpha bitmap.public static final BitmapData loadBMPURL(java.lang.String strFileName, byte red, byte green, byte blue) throws java.io.FileNotFoundException, GameFrameException
strFileName
- The name of the file to load.red
- The red key color intensity value (in range 0x00-0xFF).green
- The green key color intensity value (in range 0x00-0xFF).blue
- The blue key color intensity value (in range 0x00-0xFF).public static final BitmapData loadBMP(java.lang.String strFileName, boolean fEnableAlpha) throws java.io.FileNotFoundException, GameFrameException
strFileName
- The name of the file to load.fEnableAlpha
- True if bitmap is to be loaded as alpha bitmap.public static final BitmapData loadBMP(java.lang.String strFileName, byte red, byte green, byte blue) throws java.io.FileNotFoundException, GameFrameException
strFileName
- The name of the file to load.red
- The red key color intensity value (in range 0x00-0xFF).green
- The green key color intensity value (in range 0x00-0xFF).blue
- The blue key color intensity value (in range 0x00-0xFF).public static final BitmapData loadBMP(java.io.InputStream inStream, java.lang.String strFileName, boolean fEnableAlpha) throws java.io.FileNotFoundException, GameFrameException
inStream
- The input stream to load from.strFileName
- The filename used in error texts.fEnableAlpha
- Flag indicating if key color should be used or not.public static final BitmapData loadBMP(java.io.InputStream inStream, java.lang.String strFileName, byte alphakeyRed, byte alphakeyGreen, byte alphakeyBlue) throws java.io.FileNotFoundException, GameFrameException
inStream
- The input stream to load from.strFileName
- The filename used in error texts.alphakeyRed
- The red alpha key value (in range 0x00-0xFF).alphakeyGreen
- The green alpha key value (in range 0x00-0xFF).alphakeyBlue
- The blue alpha key value (in range 0x00-0xFF).
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |