We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › applet can not load image
Page Index Toggle Pages: 1
applet can not load image ? (Read 338 times)
applet can not load image ?
Sep 17th, 2006, 3:55pm
 
Hi.
when I try to load an image from  web  it works but after making applet it doesn´t load.
I use it like this.
b = loadImage("http://xxx.com/xx.jpg");

What might be the problem?
Thanks.

Re: applet can not load image ?
Reply #1 - Sep 17th, 2006, 4:47pm
 
There are security restrictions in applets that stop you from loading an image from a foreign server, i.e. if your applet is on:

yourserver.com

you can load the image:

yourserver.com/image.jpg

but not:

otherserver.com/image.jpg

Two solutions are creating a local proxy (using PHP for example) to load the image, or signing the applet.

Page Index Toggle Pages: 1