Mike Kao

Greenhorn
+ Follow
since Aug 18, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mike Kao

Hi,
Is there any way that I can convert a byte array(byte[]) to java.io.InputStream?
Many thanks.
Mike
18 years ago
I am now working on a game turned from NTT Docomo iApplication to J2me,but scratchpad used in iApplication puzzled me,how can I replace scratchpad in J2me?
Sample code:
/*protected yCanvas() {
try
{
OutputStream out=Connector.openOutputStream("scratchpad:///0");
out.write(gifData);
out.close();
}
catch(IOException e){
System.out.println("Failed write to scratchpad.");
IApplication.getCurrentApp().terminate();
}
*/
18 years ago
Hi,
Does anybody know how to make the png file smaller? I used the following code to convert a jpg file to a png file but the problem is that the png file turned out to be much bigger than the origianl jpg file. Any idea of this? Thanks a lot.
-------------------
try{
File f = new File("pic1.jpg");
BufferedImage bi = ImageIO.read(f);
File outfile = new File("pic2.png");
ImageIO.write(bi, "png", outfile);
System.out.println("Converting is successful");
}catch(IOException e){
System.out.println("Converting is failed");
}
--------------------
18 years ago
Hi,
Does anybody know how to make the png file smaller? I used the following code to convert a jpg file to a png file but the problem is that the png file turned out to be much bigger than the origianl jpg file. Any idea of this? Thanks a lot.
-------------------
try{
File f = new File("pic1.jpg");
BufferedImage bi = ImageIO.read(f);
File outfile = new File("pic2.png");
ImageIO.write(bi, "png", outfile);
System.out.println("Converting is successful");
}catch(IOException e){
System.out.println("Converting is failed");
}
--------------------
18 years ago