This site requires JavaScript, please enable it in your browser!
Greenfoot back
Michionlion
Michionlion wrote ...

2012/6/26

create a GreenfootImage from a BufferedImage

Michionlion Michionlion

2012/6/26

#
Is there anyway to do that? Help would be appreciated! EDIT: or a way to write a BufferedImage into the world.
Duta Duta

2012/6/26

#
Well, yes, however why do you want to?
davmac davmac

2012/6/26

#
Is there anyway to do that? Help would be appreciated!
You can create a new GreenfootImage of the correct size, and then draw the BufferedImage onto it. Use getAwtImage() to get the BufferedImage which backs the GreenfootImage, and then use any of the appropriate methods to do your drawing (probably use getGraphics2D() and draw the other BufferedImage via that).
EDIT: or a way to write a BufferedImage into the world.
Yes, in the same way.
You need to login to post a reply.