com.tiptopone.game.turnbased.boardcast.bmp2wbmp
Class BMP2WBMP
public class BMP2WBMP
implements PictureFactory
Title:picture converter Description:this class can convert the bmp picture into a wbmp picture. Copyright: Copyright (c) 2002Company:tiptop Version:
1.0
Author:
victor
Method Detail compose
public boolean compose(String backgroud,
String[] pieceURL,
int[] position,
String wbmpFileName)
according to the backgroud picture and piece picture will be put on backgroud picture and each piece picture,to creat a wabmp picture named wbmpFileName.
Returns:
a boolean value indicate whether it success or not. --------------------------------------------------------------------------------readPicture
public int[][] readPicture(String pathName)
to read bmp picture each pixel'color will be save in an int[][] array.
Parameters:
pathName - is the bmp picture' url.
Returns:
int array contains each pixel's color; --------------------------------------------------------------------------------composePic
public int[][] composePic(int x,
int y,
int[][] prePic,
int[][] bePutPic)
to compose the bmp picture, only one bmp picture can be composed at once.
Parameters:
x:the - x coordinate;
y:the - y coordinate;
prePic(the - backgroud picture) is array saved each pixel's color value
bePutPic(the - foregroud picture) is array saved each pixel's color value
Returns:
an array saved each pixel's color value. --------------------------------------------------------------------------------bmp2wbmp
private boolean bmp2wbmp(String filePath,
int[][] p)
to convert bmp into wbmp picture. a wbmp file will be output.
Parameters:
filePath - is the picture url that will be converted
p[][] - is array saved a wbmp color value for each pixel's color
Returns:
a boolean value indicate that whether it cuccess or not.
Class BMP2WBMP
public class BMP2WBMP
implements PictureFactory
Title:picture converter Description:this class can convert the bmp picture into a wbmp picture. Copyright: Copyright (c) 2002Company:tiptop Version:
1.0
Author:
victor
Method Detail compose
public boolean compose(String backgroud,
String[] pieceURL,
int[] position,
String wbmpFileName)
according to the backgroud picture and piece picture will be put on backgroud picture and each piece picture,to creat a wabmp picture named wbmpFileName.
Returns:
a boolean value indicate whether it success or not. --------------------------------------------------------------------------------readPicture
public int[][] readPicture(String pathName)
to read bmp picture each pixel'color will be save in an int[][] array.
Parameters:
pathName - is the bmp picture' url.
Returns:
int array contains each pixel's color; --------------------------------------------------------------------------------composePic
public int[][] composePic(int x,
int y,
int[][] prePic,
int[][] bePutPic)
to compose the bmp picture, only one bmp picture can be composed at once.
Parameters:
x:the - x coordinate;
y:the - y coordinate;
prePic(the - backgroud picture) is array saved each pixel's color value
bePutPic(the - foregroud picture) is array saved each pixel's color value
Returns:
an array saved each pixel's color value. --------------------------------------------------------------------------------bmp2wbmp
private boolean bmp2wbmp(String filePath,
int[][] p)
to convert bmp into wbmp picture. a wbmp file will be output.
Parameters:
filePath - is the picture url that will be converted
p[][] - is array saved a wbmp color value for each pixel's color
Returns:
a boolean value indicate that whether it cuccess or not.
解决方案 »
- java 怎么实现在不同显示器上显示JFrame
- log4j的配置问题
- 如何在java程序中访问web
- 问个比较傻的问题
- 求助:谁忙我解释一下,table中的复选框是怎么生成的???
- jtree和jtable的资源管理器
- 如何移动另一程序的窗口到指定位置
- ★★★ 怎样了解到一个子Panel里的ButtonGroup中选中的是哪个RadioButton?(在线等待)
- 《Java 2 核心技术 卷I:原理(原书第5版)》这本书适合一点都没学过java的人吗?
- HibernateTemplate类里面的flush方法抛出了异常,异常处理
- 如何调用超类的超类方法?
- 载入不了图像,拜托进来看看,我郁闷死了
试一下你这个program!!!