email a sprite

Get help using Construct 2

Post » Sun Mar 25, 2012 5:37 pm

it is possible to email a sprite (which has been recoloured using C2 commands) from within c2?
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

Post » Sun Mar 25, 2012 7:38 pm

I would assume you would need to take care of that using php.
B
10
S
5
G
1
Posts: 37
Reputation: 1,631

Post » Sun Mar 25, 2012 8:29 pm

Yes, for security reasons, you can't send mail via Javascript alone...
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sun Mar 25, 2012 8:44 pm

I have no problem emailing using PHP.

The problem is how am I going to "save out" the sprite which has been recoloured by the user, from C2?
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

Post » Mon Mar 26, 2012 1:20 am

html5 offers the option to access an image on the canvas as a data uri, and this includes any transformations made to it -- you can send this uri to a php script and have it processed by gd or imagemagick and saved as an actual image on the server, then maybe attached by mail.

Alternatively, you could just send someone the uri and they could open it in their browser and save it from there.

B
10
S
5
G
1
Posts: 37
Reputation: 1,631

Post » Mon Mar 26, 2012 10:46 am

Very interesting info twdead, thanks a lot.

i will have to research that as i am pretty very new to canvas & c2
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

Post » Tue Mar 27, 2012 5:45 am

this might help you out:

http://www.nihilogic.dk/labs/canvas2image/

http://permadi.com/blog/2010/10/html5-saving-canvas-image-data-using-php-and-ajax/
B
10
S
5
G
1
Posts: 37
Reputation: 1,631

Post » Tue Mar 27, 2012 10:46 am

I suppose that the main problem will be to get some specific sprites. The whole c2 canvas to image should be possible - I've seen similar implemented for a canvas.Joe72012-03-27 10:48:29
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Tue Mar 27, 2012 3:47 pm

Yes Joe, the problem is how to get a selected number of sprites, or at least, a section of the screen
B
41
S
11
G
4
Posts: 428
Reputation: 7,356


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests