Obtaining an Image as bytes

Hi there,

There must be simple answer to this one, however I am still looking for the solution. If you know it then please post it here, otherwise I will update this post once I know the answer.

What I would like is basically the following:

My JFrame loads a JPG from file and places it as background.

A smart user can therefore replace this JPG by his/her favorite JPG. In order to prevent this I would like to load an encrypted "JPG", which would be decrypted in memory and then displayed on the screen. In order to achieve this I need to obtain the loaded image, encrypt it and store it on disk again.

I am using:

java.awt.Image image = Toolkit.getDefaultToolkit().getImage("myImage.jpg");

If you have any ideas, please let me know.

Thanks in advance,

Mike

[822 byte] By [Mike_FXXa] at [2007-11-26 17:53:48]
# 1
Got the answer. It was simpler than I thought: http://forum.java.sun.com/thread.jspa?threadID=617676&messageID=3452201Cheers,Mike
Mike_FXXa at 2007-7-9 5:06:50 > top of Java-index,Other Topics,Java Game Development...