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
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

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
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

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
19
S
6
G
7
Posts: 1,205
Reputation: 7,298


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, indiegrimes, NRABrazil, PixelatedTrip and 24 guests