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.
Page Index Toggle Pages: 1
Saving Images (Read 875 times)
Saving Images
Jan 2nd, 2010, 1:29pm
 
How would I go about saving the output from a processing app onto my server?

Say for instance some one uses a processing app, that I am hosting, to draw a picture. How could I save that picture to my server?
Re: Saving Images
Reply #1 - Jan 2nd, 2010, 1:39pm
 
It should help :

http://processing.org/hacks/doku.php?id=hacks:savetoweb

http://processing.org/discourse/yabb2/num_1212658813.html
Re: Saving Images
Reply #2 - Jan 2nd, 2010, 2:27pm
 
Or just look for the library postToWeb, based on my work on the second given link (IIRC), it should be a good start.
Re: Saving Images
Reply #3 - Jan 2nd, 2010, 10:57pm
 
PhiLo, that would definetly be what I am looking for thank you.

Do you know how this library works? I am interested in understanding it as well as using it.

Whats the basic operations of it?

When I save a file in an applet this turns that image into an array containing the information for each pixel? Then passes that array in the header of the URL to a PHP file that makes it into an Image saved to the server?
Re: Saving Images
Reply #4 - Jan 3rd, 2010, 1:39am
 
Basically, yes, except that array is passed in a POST (Mime) request, not in the URL (would be a bit long...). And the array of pixels is transformed to a full image file content (PNG, Jpeg, etc.) by Java before sending, so that the PHP side receives actually a file upload request, which it processes as such with some caution (to avoid hacking).
Page Index Toggle Pages: 1