Export canvas in .gif format

I am pulling my hair out trying to export the html5 canvas to a .gif image, I was able to save it successfully as a .png file. I don't know what I am doing wrong here, this is my simple code

canvas.onclick = function () {
window.location = canvas.toDataURL('image/gif');
};

      

+3


source to share


1 answer


This will answer your question. Long story short, try console.log'in your data and not all browsers will support writing to gif.



+6


source







All Articles