Base64 TO bitmap question ?

Get help using Construct 2

Post » Sun Oct 07, 2012 2:30 am

Hi all

Does anybody know How to convert a Base64 string into a savable bitmap image in C2.

OR convert a canvas snapshot into a bitmap image before opening Url in new window?

(ideally with 256 colours!)

Thanks in advancechrisbrobs2012-10-07 02:30:59
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Sun Oct 07, 2012 2:37 pm

If you can make a data URI out of your base64 string, you can simply load it in to the Sprite or Tiled Background objects using their "load from URL" actions.

Canvas snapshotting returns a data URI so you can do exactly that.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,226

Post » Sun Oct 07, 2012 4:38 pm

Ashley, I am looking for a way to 'SAVE' the Canvas snapshot as a Bitmap (.bmp format) ?

1, These are the events
2, The 'Snapshot canvas' option has 2 Parameters... 'PNG'   or   'JPEG'
3, Running the events, results in picture 3...in this example it defaults to 'download.png'



I want to save the snapshot as a '.bmp' image.

Note..there is a tutorial covering the topic here (not C2 related)

Link

Thanks in advance.chrisbrobs2012-10-07 16:38:53
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], InfiniteRockets, ksiads, Yahoo [Bot], Zav and 7 guests