admin管理员组

文章数量:1415476

Apologies, this question has been asked multiple times, but asking again due to the lack of a suitable answer. I need to save a canvas drawing as an image in a folder on my server. Can it be done without using AJAX? The toDataURL method returns the image data as base64 encoded. I need to save it to a folder as an image file. Is it possible?

Apologies, this question has been asked multiple times, but asking again due to the lack of a suitable answer. I need to save a canvas drawing as an image in a folder on my server. Can it be done without using AJAX? The toDataURL method returns the image data as base64 encoded. I need to save it to a folder as an image file. Is it possible?

Share Improve this question asked Dec 6, 2012 at 5:59 Rutwick GangurdeRutwick Gangurde 4,93212 gold badges55 silver badges91 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 3

Response here How To Save Canvas As An Image With canvas.toDataURL()?

or open a new window with data URL:

var data = canvas.toDataURL('image/png');
window.open(data);

You just need to right click it ...

本文标签: javascriptHow to save canvas drawing as an image to a folderStack Overflow