getBackground.drawImage(new GreenfootImage(imageName), leftX, topY);
@Upupzealot, I do not think erdelf wants to replace the image of the world; just add something to the existing background.
@erdelf, Maybe I am a bit confused myself. Was this image you added to the world (that you want to change) drawn on the background already, or is it an Actor image, or what?
You still are not being very clear as to what you are doing. I will call your GreenfootImage 'baseImage'. You draw this image on the world background. Then, just change 'baseImage' and re-draw the image on the world background at the same place. As long as you are not making the image smaller, this should work.
You may have to re-create the world background from scratch before adding the changed image to get the proper background image. But, of course, I know not HOW you create the background to begin with or WHAT kind of changes are being done to the image that you are adding to the background image. Information like that would make it alot easier to come up with a decent workable solution quickly.
the first would not work cause the pics works with transparency.
the changes should be that there is an another image after the change.
The background is build from an Image and the userpic.
Then, re-create the background with the userpic and draw the new image on that. You could instead, save the background image with the userpic before you initially draw the image on it, and use 'new GreenfootImage(savedImage)' to create a new base background image.