How do I down "area" of screen as an image file (jpg or png)?

0 favourites
  • 4 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • I want to be able to click a button and have an "area" of the screen downloaded as a jpg or png. I don't want the entire screen, just a predesignated "sketch" area.

  • There is a workaround I've done to create the exact same thing you want.

    You can check my game if you'd like to see how it behaves.

    So, here's what I did:

    - Add a DrawingCanvas plugin into your project, place it in your scene, adjust the size/position, and disable its visibility.

    - At the desired moment in your code, use the Paste object action from DrawingCanvas and add all the objects you want to be shown in your downloaded image. Then use the Save image action which is going to save your current canvas image.

    - Finally, after waiting for that action to finish (whether using Wait action or On saved image trigger) you can call the Invoke download action from the Browser object passing DrawingCanvas.SavedImageURL expression in the URL field.

    Well, that's pretty much it. I hope I was clear enough :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you = Im giving it a shot but having trouble - Ill keep it up and let you know how it goes. Thank You - dM

  • If you have a lot of objects on the screen, pasting them all onto a drawing canvas may be difficult. In this case take a snapshot of the entire screen, load it into a temporary sprite, paste a portion of this sprite onto the canvas.

    Also, please vote for the idea to add "paste layer" option to drawing canvas:

    construct3.ideas.aha.io/ideas/C3-I-921

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