Hello,
I'd like to set an actor's image from a greenfootImage but the setImage() method requires a java.awt.Image() object.
how can I transform a Greenfoot image into a java.awt.Image()? or how do I create a .png from the greenfoot image?
There are two setImage methods provided in the Actor class, neither of which requires a java.awt.Image object. One requires a java.lang.String object (the filename of an image in the 'images' folder of the project in your file directory) and the other, a greenfoot.GreenfootImage object.
If you are getting a message that says you need a java.awt.Image object, then maybe you are not using setImage on an Actor object to begin with. Show the codes (with context) you are attempting to use.