[PLUGIN] c2i - canvas/base64/screenshot to image

Post your completed addons to share with the community

Post » Wed Apr 04, 2012 2:06 am

Very nice!!! Just what I needed!
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Wed Apr 04, 2012 4:00 pm

for some reason this is not working when i upload this to my website.

I have used the demo files & uploaded createImg.php

It doesn't generate the image :(

edit: fixed it, wordpress htaccess fucked it up :)Wishy2012-04-04 16:07:34
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Wed Apr 04, 2012 4:31 pm

Its working now, although saving a screenshot only generates a blank png with the correct width and height.
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Wed Apr 04, 2012 5:25 pm

@Wishy: Strange - should not happen. I've exported the demo now with C2-r85 and it works with this actual release too. It seems that the data gets not properly saved. Can you try to save the sprite from the demo in a Textfile(debug-php-file). It should look like this.
Do you have this problem on a local webserver too?Joe72012-04-04 17:27:11
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Wed Apr 04, 2012 5:43 pm

Everything seems to work as intended, except for the image showing.
The test.txt is indeed showing the base64 string, but as empty image.

If i go to your testpage and press 'save rect' and then show,
i get http://www.liebhard.eu/c2/c2i/1.2/c2i.png which is an empty image with dimensions 208x160

I'm using Chrome 18.0.1025.142 m

edit: Mozilla Firefox 10.0.2 doesn't give this problem, everything working as expected on that.
same for Firefox 11.0, working perfect
Wishy2012-04-04 17:45:53
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Wed Apr 04, 2012 5:57 pm

I have tested it with the same chrome release - it works as expected. (Win Xp, canvas2d in Chrome). What happens when you save the image and load it with Paint or similar?
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Wed Apr 04, 2012 6:03 pm

Bingo, my Chrome was running on WebGL, forcing the project to use canvas2D in the Project Properties fixed the issue.
I'm not sure how to change it in Chrome itself, because your example page still isn't working for me, but my example is now.
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Wed Apr 04, 2012 6:11 pm

I've searched now for "chrome empty images" and found that this "problem" with empty images isn't unknown. (Seems that there can be troubles with chaching images when often reloading the same page/image/.. )

[Edit]After a few tests I have the following:
for Chrome 18.0.1025.142 m (+19.0.1084.9 dev-m):
-) WebGL - only Sprite saving works - having the same issue as above
-) canvas2d - all actions work

Firefox 11.0:
-) WebGL - all actions work
-) canvas2d - all actions work

_____
I'll try to update the plugin for the chrome WebGL-renderer - asap.
Joe72012-04-08 21:42:47
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Wed Apr 04, 2012 7:16 pm

allright, i'm happy you could reproduce this error.

I haven't said how awesome this plugin is yet, this is gonna open a new door for app-development in C2, things like online image editors & much more !

great work !!
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Fri Apr 06, 2012 12:59 pm

Fantastic! Just what I needed!
I will experiment a bit with this GREAT plugin

Well Done once again for the FANTASTIC work
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests