upload canvas snapshot

0 favourites
  • 10 posts
From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • guys how can upload an server or a folder "outside C2" picture "canvas snapshot" ???

  • Do you need help yet ??

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes.:)

  • Hello Asatur.

    In fact, i don't understand your question. But if you will want save a image of game in on server.

    Follow the steps.

    1- UserMedia.SnapshotURL: take a picture Media Camera.


        If you want take image from your all game screen , will you use the "CanvasSnapshot" instead of "UserMedia.SnapshotURL"

        I'm looking for how limit this picture area.

    <img src="http://www.pubblicite.com.br/paulotutoriais_nao_apagar/tutorialSaveImageToFolderC2.jpg" border="0" />

    2 - Use a PHP to save the picture in your server.

    (sorry for my bad English and, some words in printScreen are in portuguese: foto : picture | nome: name | TESTE: test)

    that's it!

  • Thank you for this information, that is almost the same functionality i need.

    The only difference is that I need to upload an already taken picture (from phone gallery) Do you know how to do this?

  • I haven't tried this yet, but this is exactly what I was looking for! Xam, I don't know if you already figured it out/stopped trying, but here's what I do for a picture already taken (Note: this only works if the picture is taken with the app you are making.) When the picture is taken, I also save the URI in WebStorage. You set a local key (ex: "Picture" & PictureCounter ...or whatever string you want to create) with the value of UserMedia.SnapshotURL.

    (This part is an educated guess, as I haven't done this next step)

    When you later want to upload the picture, in the AJAX action, replace UserMedia.SnapshotURL with WebStorage.LocalValue("Picture" & PictureCounter) or with whatever your string is.

    If you want to upload a picture taken with the phone's own camera app, I do not know how to do that yet, sorry.

  • HI

    Would love to get this working ... BUT where do I set my

    url for server .. myserver.com/mygame/upload

    and most of all how can I retrieve/get the uploaded image as sprite in C2

    Also how can I crop the captured image to 200x200 pixel


    The scenario :-)

    Got a online top 10 Highscore (php,mysql)

    and like to give player possibility to have a photo beside it

    So if I make a C2 layout where player can place Name

    and upload photo and somehow store these together

    Idears welcome

  • use php to corp or resize your picture

  • can this method with php work for geting files from the ftp to the hdd??

  • HI

    all this is almost same thing i am looking for too

    all i need is i want to save my game screenshoot on gallery or in user media storage ( like : memory card )

    hear is forum post i ask for help you guys can replay there


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)