Being a 3D game developer, I have almost zero-knowledge in server-side programming and I am trying to write an app that does the below:
1. Take a photo from my iphone, save it to a file.
2. Send the file to some server
3. 3D-lize the image file received, or do other bit-wise transformations with it.
4. Fetch the processed file from the server.
I know many apps does this already and would like to know what technologies are used behind the scenes.
What I have tried so far:
1. Setup an app on Google app engine so that I can use http post methods to upload the file from the iPhone (ASIHTTPRequest used here). Java and Python tried.
2. Files are uploaded fine, but I have no idea what to do next as I heard you the file system on the app engine is read-only
Ain't too sure if I am on the right track. Perhaps I should try other technologies such as PHP? But then, where would I host this? How would I actually do manipulations to my files uploaded.
Being a 3D game developer, I have almost zero-knowledge in server-side programming and I am trying to write an app that does the below:
1. Take a photo from my iphone, save it to a file.
2. Send the file to some server
3. 3D-lize the image file received, or do other bit-wise transformations with it.
4. Fetch the processed file from the server.
I know many apps does this already and would like to know what technologies are used behind the scenes.
What I have tried so far:
1. Setup an app on Google app engine so that I can use http post methods to upload the file from the iPhone (ASIHTTPRequest used here). Java and Python tried.
2. Files are uploaded fine, but I have no idea what to do next as I heard you the file system on the app engine is read-only
Ain't too sure if I am on the right track. Perhaps I should try other technologies such as PHP? But then, where would I host this? How would I actually do manipulations to my files uploaded.
Thanks,
Spark
I would never suggest using PHP. I'm not familiar with the Google app engine but this sounds like something that could be implemented easily in Python on a cheap VPS.
My approach would be to use Apache/mod_python to accept the upload. (honestly I would just try to HTTP POST without going through the formal file upload process since you're not trying to interact with web browser.
For image processing on servers I almost always use ImageMagick it's open source and available for every platform, and is the standard for server side image processing. I always use the command line interface with a pipe to access it from inside a script. (php back in the day, or python now)
something like:
Code:
from os import popen
from mod_python import util, apache
def handler(req):
fields = util.FieldStorage(req)
if fields.has_key("file"):
new_file = file(temp_fname)
pipe = popen("convert %s" % (temp_fname) # obviously this would be specific to your application
req.content_type = "image/png"
req.write(pipe.read()) # flush imagemagick's stdout stream to our request's output stream
return apache.OK
This isn't tested code but should be enough to get you started. Before I did mobile, I did web apps so I talk a lot on my blog. (see sig)
I would never suggest using PHP. I'm not familiar with the Google app engine but this sounds like something that could be implemented easily in Python on a cheap VPS.
My approach would be to use Apache/mod_python to accept the upload. (honestly I would just try to HTTP POST without going through the formal file upload process since you're not trying to interact with web browser.
For image processing on servers I almost always use ImageMagick it's open source and available for every platform, and is the standard for server side image processing. I always use the command line interface with a pipe to access it from inside a script. (php back in the day, or python now)
something like:
Code:
from os import popen
from mod_python import util, apache
def handler(req):
fields = util.FieldStorage(req)
if fields.has_key("file"):
new_file = file(temp_fname)
pipe = popen("convert %s" % (temp_fname) # obviously this would be specific to your application
req.content_type = "image/png"
req.write(pipe.read()) # flush imagemagick's stdout stream to our request's output stream
return apache.OK
This isn't tested code but should be enough to get you started. Before I did mobile, I did web apps so I talk a lot on my blog. (see sig)
If your server can support java servlets (a little more money than cheap hosting) than java is a good way to go. there is a 2d and 3d adavanced imaging library available.