N
N
Nick Nesterov2016-02-05 10:30:06
JavaScript
Nick Nesterov, 2016-02-05 10:30:06

How to save edited image from Canvas to server/localStorage?

Good day,
help solve the problem. I load an image into Canvas by url, edit it, and then I want to save it on my server or in localStorage and output it to .
How is it possible to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mark Doe, 2016-02-05
@mourr

well, for example

var canvas = document.getElementById("MyCanvas");
var imageData = canvas.toDataURL();

Returns base64 data for the image, which can be sent and saved as you like

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question