How do I save a CanvasSnapshot into a .png with NodeWebkit?

Get help using Construct 2

Post » Thu May 21, 2015 3:00 pm

I am using NodeWebkit and want to save snapshot of the game into a .png file. I could write CanvasSnapshot into a file with NodeWebkit's write function, but the file is invalid.

I took a peek at the data of CanvasSnapshot expression, and it does not look like usual png file format at all. I believe this data has to be converted into the usual png file format first before it could be written with NodeWebkit's write function.

The question is... ...is there a way in C2? Or is there a better way?
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,459

Post » Fri May 22, 2015 9:55 am

Anybody?
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,459


Return to How do I....?

Who is online

Users browsing this forum: NN81, TsubaRu and 9 guests