Hi
I want to load .png-Images with BufferedImage.
What happens is, that if I load them with 2 different ways (as follows),
one makes my FPS go down to nearly 0 and
the other way gets at least 20 FPS, which is still not enaugh.
Here´s the code:
public static BufferedImage loadBuffImage(String absolutePath) {
/||Created on 08.03.2008 01:30:56||/
try {
BufferedImage bz = ImageIO.read(new File(absolutePath));
BufferedImage bi = new BufferedImage (bz.getWidth(),bz.getHeight(),BufferedImage.TYPE_INT_ARGB);
Graphics2D biG = bi.createGraphics();
biG.drawImage(bz,0,0,null);
return bi;
} catch (IOException e) {
}
return null;
}
public static BufferedImage loadBuffImage(String absolutePath) {
/||Created on 08.03.2008 01:30:56||/
try {
return ImageIO.read(new File(absolutePath));
} catch (IOException e) {
}
return null;
}
the ImageIO.read Method makes my FPS go down to 0, the other one not …
Why?
I got 1280*1024 with 8600GT and 3200+, so it seems to me something is wrong.
I already use MultiBuffering, so I hope someone can help me.