Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Server side of things

Hey All,

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 :eek:

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
Post edited by sparkso on

Replies

  • smithdale87smithdale87 Posts: 4,294iPhone Dev SDK Supporter
    So you're question is: where do I host my server-side code/application?

    Anywhere you want. And for that reason, you can do manipulate the files on the server as well.
  • MarkCMarkC Posts: 1,850iPhone Dev SDK Supporter, Registered Users
    Everything you need to upload an image is in this thread (about half way down, post UIImage) Search Results post uiimage : Iphone Noob
  • sparksosparkso Posts: 284Registered Users
    MarkC;180872 said:
    Everything you need to upload an image is in this thread (about half way down, post UIImage) Search Results post uiimage : Iphone Noob
    Hey thanks guys
  • RapidRapid Posts: 32Registered Users
    sparkso;180852 said:
    Hey All,

    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 :eek:

    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:

    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)
  • michellemichelle Posts: 208Registered Users
    Rapid;183448 said:
    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:

    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.

    Take a look at this.

    http://www.iphonedevsdk.com/forum/newreply.php?do=newreply&p=183448
    Help us build great applications or let us make your applications exceptional. We are experts in all types of streaming find us on Facebook
Sign In or Register to comment.