How can I save a jpg image of a canvas on my server

How can I save a jpg image of a canvas on my server

Hi,


Going on with canvas now I want to save my canvas that I've created on the server in an image.


Here is the code that enables me to have the data of the canvas

Does some one know how to convert this in a png or jpeg image and save it in a directory please?

Thanks!



  1. var canvas = document.getElementById("myCanvas_OUT0");
  2. var context = canvas.getContext("2d");
  3. var pixout0 = context.getImageData(0, 0, 75, 100).data;


David  ( @webtecgeek   www.thecacaocafe.com )