I'm looking for a function which can save canvas as an image with custom name when save button is clicked. For now I have the following lines in my javascript function which take the canvas element and specify the format of the data:
var canvas1 = document.getElementById("canvasSignature");
var myImage = canvas1.toDataURL("image/png");
I don't know how to give a custom name of the image and how to make it download.
Any help will be appreciated.
Thanks