当前位置: 技术问答>java相关
a tool class to convert bmp to wbmp used in wap
来源: 互联网 发布时间:2015-06-27
本文导语: com.tiptopone.game.turnbased.boardcast.bmp2wbmp Class BMP2WBMP public class BMP2WBMPimplements PictureFactory Title:picture converter Description:this class can convert the bmp picture into a wbmp picture. Copyright: Copyright (c) 2002 Company:tiptop Version:1...
com.tiptopone.game.turnbased.boardcast.bmp2wbmp Class BMP2WBMP public class BMP2WBMPimplements PictureFactory Title:picture converter Description:this class can convert the bmp picture into a wbmp picture. Copyright: Copyright (c) 2002 Company:tiptop Version:1.0Author:victorMethod 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 valuebePutPic(the - foregroud picture) is array saved each pixel's color valueReturns: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 convertedp[][] - is array saved a wbmp color value for each pixel's colorReturns:a boolean value indicate that whether it cuccess or not.
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 valuebePutPic(the - foregroud picture) is array saved each pixel's color valueReturns: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 convertedp[][] - is array saved a wbmp color value for each pixel's colorReturns:a boolean value indicate that whether it cuccess or not.
|
不错啊
|
I want to get it. thanks!
|
我们是用JNI来进行图片的转换..
试一下你这个program!!!
试一下你这个program!!!
|
I want.
|
I want.