is there a way to get a BufferedImage to a GreenfootImage.
if so can I have a code example.
thank you :D


1 2 3 4 5 6 7 8 | BufferedImage bufImage = //Whatever GreenfootImage gImage = new GreenfootImage(bufImage.getWidth(), bufImage.getHeight()); BufferedImage gBufImg = gImage.getAwtImage(); Graphics2D graphics = (Graphics2D)gBufImg.getGraphics(); graphics.drawImage(bufImage, null , 0 , 0 ); setImage(gImage); |