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 & HelpSyntax Questions › saving image from Processing web applet, thru PHP
Page Index Toggle Pages: 1
saving image from Processing web applet, thru PHP? (Read 549 times)
saving image from Processing web applet, thru PHP?
Sep 26th, 2007, 9:42pm
 
I have written a Processing sketch for the web and I would like to allow viewers to click on a button in the sketch to "save" the current frame as a file on the server (perhaps in a "gallery" for later viewing).
I realize that "saveFrame" will not work on the web.

I am wondering if anyone else has already figured out how to solve this,... perhaps going through TCP and PHP?

I know I can grab the frame as a PImage using "loadPixels", but then I am stuck.  Ideally, there should be some way to JPG encode the image (so it is smaller and in the right data format) and then I still need to send it to a server to be stored.  I am guessing this could be done by opening a TCP connection to the server running PHP that would accept an "uploaded" image file.

Although I know conceptually the steps involved, I would really love to see some example code that I could modify to suit my purpose.  There must be someone out there who has already figured out how to save a frame from a Processing applet on the web ... (and no, "screen capture to the desktop" won't be good enough.)

thanks in advance,
 djones


Re: saving image from Processing web applet, thru
Reply #1 - Sep 27th, 2007, 1:38am
 
I ran across this discussion yesterday, maybe it will help:
http://processing.org/discourse/yabb/YaBB.cgi?board=Integrate;action=display;num=1106908696

Best.
Page Index Toggle Pages: 1