Marco Schmidt said:
Young-Jin Lee:
See
<
http://www.geocities.com/marcoschmidt.geo/java-image-faq.html#libraries>
and
<
http://www.geocities.com/marcoschmidt.geo/java-image-coding.html>.
BTW, an image is an image in Java. It doesn't matter whether it was
loaded from a GIF, JPG or PNG. I'm not totally sure whether you want
to save an existing image (object from a class extending the abstract
java.awt.Image) because you talk about "saving a background image into
a file". Where does the background image come from? Why should it be
saved in a file (how are you saving it right now)?
Regards,
Marco
I should have explained it in more detail. My java application can
read an image (gif or jpeg) and use it as a background image of its
JPanel object. In its JPanel object, users can draw 2D stuffs (line,
rectangle etc.). Currently, it cannot save the image file itself. It
just stores the path of the image file it read. But the problem is
that when a file created with this Java application is given to other
people, the image should be sent separately because the image is not a
part of its file.
What I want to do is to make the image file that this application read
from a hard disk a part of users' 2D drawing stuffs. In other words,
when a user give its 2D drawing created with this application, which
has a background image read from a local hard disk, to other person,
this person should be able to see the 2D drawing with a background
image when he/she opens up this file with this Java application.
Is there an easy way to do this?
Thanks for your help.
Young-Jin