Save image and Post to Server

edited November 2015 in p5.js

Hi there. I have a problem which should be really simple but I haven't made any progress after a week. I'm hoping someone here can help me.

I have a bit of processing code that generates an image based on a string (with the z axis translate and x and y rotate). I'm trying to upload these images to an ecommerce server. The issue is I need this code running 24/7 so I cannot run it on my local machine. I first tried Google app engine with both the Java and the python versions of processing, but there is no integration for the java version on GAE, and pyprocessing does not yet have the 3d renderer to my knowledge.

Right now I'm thinking I will use P5JS to create the image and a form to upload. So my question is 2 fold:

  1. Is P5JS the best way for me to approach this problem? does it have z-axis translate and x and y rotate?

  2. if p5js is the way to go, How can I create and post the image without displaying it to the user that happens to be running the javascript?

I think this should be solvable, I'm pretty frustrated my former attempts have been fiery crashes. Any help is very much appreciated. Thanks!

EDIT: clarified 3d requirements

Tagged:

Answers

  • For saving images see this thread. So use the saveFrames() callback to get a reference to the image file. You can then generate a POST request and pass it to your server. You'll obviously need something running on the server to then accept and save the image...

    As for 3d in p5js: from what I can gather it's very early days in terms of the WebGL implementation. I haven't tried anything in 3d yet; but it's safe to say performance may be an issue compared to pure Processing...

  • I've finally started porting the program over and it looks like I'll be able to do it with your comment. Thanks for your help (:

Sign In or Register to comment.