—
It could be webgl related perhaps? Not sure, I don't use webgl currently.
It possibility could be that the timing of when c2's canvas is copied is when the canvas is between redraws when it's cleared? That's my only guess and it could be entirely wrong, also when I've looked into a solution in the past I've not had much success.
A third possibility is no value is ready when invoking a download at that moment. Just a thought and since the built-in snapshot action has a "on canvas snapshot" condition, it may be a possibility. An idea could be to assign the last line of the script to a global var, and in events and then every tick check if the global is set before saving it.
But taking a step back it may help to just use the snapshot action, since that is known to work.
Here's how:
https://dl.dropboxusercontent.com/u/542 ... pshot.capx
use low quality fullscreen scaling
set the canvas size
zoom out the layout so the same stuff is seen.
wait 0 so c2 has a chance to adjust the layout
scroll to the center
take snapshot.
Then after the snapshot set everything back to what it was.