A
Anders
Dear all,
I would like to be able to manipulate an image contained in a website using
an Applet. In order to do so I have to get the image inside the Applet.
My idea is to expose a public method in my Applet which is called when the
web page is loaded (i.e. onLoad)
The following is some pseudo code explaining what I'd like to do. If this is
at all possible, what type should the parameter for the passImage method
have and what properties for the document.images.picture should I send?
The image format could be of any common type (i.e. .gif, .jpg and maybe some
more)
Thanks,
/Anders
___________________________________________________
1. Java class:
[...]
public class AppletTest extends Applet{
private SomeImageClass myImage;
[...]
public void passImage(SomeImageClass myImage){
this.image = myImage;
}
}
2. HTML file:
<html>
[...]
<img name=picture src=picture.gif>
<applet name=TestApplet code=TestApplet.class width=1 height=1</applet>
<body
onLoad="document.TestApplet.passImage(document.images.picture.???)>
[...]
</body>
</html>
I would like to be able to manipulate an image contained in a website using
an Applet. In order to do so I have to get the image inside the Applet.
My idea is to expose a public method in my Applet which is called when the
web page is loaded (i.e. onLoad)
The following is some pseudo code explaining what I'd like to do. If this is
at all possible, what type should the parameter for the passImage method
have and what properties for the document.images.picture should I send?
The image format could be of any common type (i.e. .gif, .jpg and maybe some
more)
Thanks,
/Anders
___________________________________________________
1. Java class:
[...]
public class AppletTest extends Applet{
private SomeImageClass myImage;
[...]
public void passImage(SomeImageClass myImage){
this.image = myImage;
}
}
2. HTML file:
<html>
[...]
<img name=picture src=picture.gif>
<applet name=TestApplet code=TestApplet.class width=1 height=1</applet>
<body
onLoad="document.TestApplet.passImage(document.images.picture.???)>
[...]
</body>
</html>