How to save an HTML5 Canvas as an image on a server?

Here is an example of how to achieve what you need: Draw something (taken from canvas tutorial) <canvas id=”myCanvas” width=”578″ height=”200″></canvas> <script> var canvas = document.getElementById(‘myCanvas’); var context = canvas.getContext(‘2d’); // begin custom shape context.beginPath(); context.moveTo(170, 80); context.bezierCurveTo(130, 100, 130, 150, 230, 150); context.bezierCurveTo(250, 180, 320, 180, 340, 150); context.bezierCurveTo(420, 150, 420, 120, 390, 100); … Read more