Canvas: Upload and Save Image (Templates)

Discuss Scirra's 2D Asset Store

Post » Fri Aug 22, 2014 4:02 pm



Canvas: Upload and Save Image — Now for sale in the Scirra Store!
https://www.scirra.com/store/royalty-free-game-templates/canvas-upload-and-save-image-116

A function you can generate an image file by using canvas snapshot and upload in server with PHP. No extra configuration needed.

Compatible with all platforms including node-webkit and mobile devices with AJAX support and Canvas snapshot support.

New Version 1.1:

  • URL Texbox is added.
  • PHP file is modified to output URL of saved image file.

Requirement:

  • Server with PHP 5.2

This .ZIP package contains:

  • .Capx with PHP file inside
  • Instructions.txt

New updates and features in future versions, stay tuned.



Use this topic to leave comments, ask questions and talk about Canvas: Upload and Save Image
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Mon Dec 15, 2014 7:17 am

Joannesalfa
Can you let me know at what resolution the Canvas is captured.
I want to have an A4 page with results from the Game, able to be printed in good quality. Can your plugin do it?
Note: I have a query posted on this topic in Forums, so far no-one answered.
Thanks
Forest
B
12
S
1
Posts: 10
Reputation: 624

Post » Mon Dec 15, 2014 11:42 pm

Forest wrote:Joannesalfa
Can you let me know at what resolution the Canvas is captured.
I want to have an A4 page with results from the Game, able to be printed in good quality. Can your plugin do it?
Note: I have a query posted on this topic in Forums, so far no-one answered.
Thanks
Forest


I don't think this template is designed for printable products, sorry!

Anyway, It's possible with jsPDF plugin plugin-jspdf_t97838 that can generate a .PDF document with A4 size, you need to place a canvas inside of .PDF, I cannot guarantee you about "good quality" it's up to your design, I heard scanlines or half-tones (eg. rasterbator) would help to keep "enough quality" in upscaled canvas.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Tue Jan 06, 2015 8:50 pm

Hello,

Is there any unofficial plugin in your template ?

Thanks
B
18
S
4
Posts: 84
Reputation: 2,085

Post » Tue Jan 06, 2015 11:31 pm

@amkp

The plugin is not required, is there something wrong with this template? you can post here or send e-mail in product page to assist you to solve your problem.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Tue Apr 14, 2015 11:14 am

Can the player pick an image from phones gallery ?
B
33
S
17
G
11
Posts: 350
Reputation: 8,695

Post » Mon Apr 10, 2017 2:16 am

Will this work with cocoon.io canvas+? I am about to buy buy really need it to support canvas+.
B
35
S
10
G
4
Posts: 94
Reputation: 4,083

Post » Mon Apr 10, 2017 6:55 am

Nwadkgames wrote:Will this work with cocoon.io canvas+? I am about to buy buy really need it to support canvas+.


This product requires canvas snapshot support to get base64 content and send base64 data to server to create the file.

You should try canvas snapshot in cocoon canvas+, if it works then it's safe to buy.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Tue Apr 11, 2017 1:18 am

Purchased it, and uploaded the php to my server. here is the link to that: http://deedfreak.x10host.com/canvasupload.php

but when I put that in the AJAX, i get the "excuse me, there is wrong in your server".

I just put "http://deedfreak.x10host.com/canvasupload.php" in the URL for AJAX.. any advice?
Do i need to create a MySQL database for it.. i didnt see the php trying to connect to a specific database.

EDIT: it actually created the folder and the image on my server.. just not calling it back to the project
B
35
S
10
G
4
Posts: 94
Reputation: 4,083

Post » Tue Apr 11, 2017 3:08 am

Nwadkgames wrote:Purchased it, and uploaded the php to my server. here is the link to that: http://deedfreak.x10host.com/canvasupload.php

but when I put that in the AJAX, i get the "excuse me, there is wrong in your server".

I just put "http://deedfreak.x10host.com/canvasupload.php" in the URL for AJAX.. any advice?
Do i need to create a MySQL database for it.. i didnt see the php trying to connect to a specific database.

EDIT: it actually created the folder and the image on my server.. just not calling it back to the project



@Nwadkgames

There a page about FAQS where you can check the errors.

Image

Basically add a line like this

Code: Select all
<?php

error_reporting(E_ALL);

?>


in index.php to figure out what's wrong on your php settings.

It doesn't require mysql as database, it's an optional feature.
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371


Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 1 guest