Tirthankar Mukherjee wrote:
3) Trying to restore the image with
You do realize that after that line executes, you have two references to the same BufferedImage, don't you?
Also, I can't see why a cast to Image would be needed. What's the Type of imageBackUp?