How to convert canvas to image on sever
<p>scheme:user draws in canvas, canvas converted to image (png or jpeg), converted file is saved in specific dir on server, after drawing canvas user clicks button, all i could do is:</p>

<pre><code>  function to_image(){
            var canvas = document.getElementById("canvas");
            var data = canvas.toDataURL('image/png');}
</code></pre>

<p>how i can perform this task? (is there any way to do it without AJAX or not?)</p>
