Error on downloading canvas snapshot with large file size.

  • Problem Description

    Taking a canvas snapshot (canvas is set to 1920x1080), then downloading it with the browser object's invoke download action, browser crashes.

    Dropping the window size to 1280x720 for example fixed it, not sure where exactly is the breaking point, but it looks like files that are bigger than 800-900kb cannot be downloaded.

    Attach a Capx

    https://drive.google.com/file/d/0B3JLq- ... N0c00/view

    Steps to Reproduce Bug

    • Step 1 - click on the canvas to download it.

    Affected Browsers

    • Chrome: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    windows 7 sp1

    Construct 2 Version ID

    195

  • This could be related to available maximum image size on your system. For me it works up to 2048x2048. This is likely a video card limitation and not a bug.

  • Somebody

    That's not entirely true, if i use the same canvas size with less info in it, which result in better compression and a smaller file size, the image is downloaded with no problem, i believe it has to do with the base64 string size than the actual resolution.

    Beside i got a geForce gtx 750 with 2 gigs of rams, i think it should handle a 1920x1080 image just fine and even if it didn't wouldn't it have trouble rendering it to the screen at the first place?

  • Worked OK for me also.

  • Works fine for me. I'm guessing it's a card issue.

  • zenox98 what is the output file size when you're downloading it?

    can you please try higher resolution to see if it breaks?

  • In my case I had to go real low, like 640x480 to export. Which is strange as in a different project I have been capturing canvas left and right at fairly large sizes. I think this has to do with your background image being a tad big on its own.

    Fairly low end Nvidia GeForce GT 640 graphics card on this system. But still, for 2D art it's more than enough.

  • By output size, do you mean the size of th file after saving? If so, using you default .capx, the filesize was 2095x1178.

    My graphics card is a beast - NVIDIA GeForce GTX 970 - so it can handle almost anything.

  • My graphics card is a beast - NVIDIA GeForce GTX 970 - so it can handle almost anything.

    Woah. Off topic, but could you run the little "benchmark" demo here on it? Just curious.

  • It works in Firefox and IE here, but it crashes Chrome with an "Aw, snap!" message. This means Chrome crashed, not that C2 did anything wrong. I'd recommend exporting your project and submitting the bug directly to Google at crbug.com.

  • Ok, i posted the error:

    https://code.google.com/p/chromium/issu ... ?id=452831

    Although i can't get it to work on IE as well, i don't get an error and i do get a string back to download but it seems like it's a blank canvas.

  • Did you find a fix for the crash? I am also having a problem with a project of mine, Same Canvas size but it depends on the image complexity . Some images will crash the browser and some will not.

  • No unfortunately file larger than around 800 kb cannot be downloaded, I changed the export url action to export a jpg with 0.6 quality instead of png 1.0 working with a 2048x2048 canvas size should work ok, that's the best I could get.

  • I wanted to use the Canvas plugin and capture only a specific layer, but I could not specify PNG or JPEG format, instead now I am using the system canvas capture and specify JPEG with lower quality and is working. Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can edit the runtime.js of the canvas plugin

    search for URL and replace the line of code with this

    ret.set_string(this.canvas.toDataURL('image/jpg',0.6));

    or any other format/value you like.

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