11

I've been pulling my hair out trying to export my html5 canvas a .gif image,i was able to succesfully save it as a .png file. i dnt know what am doing wrong here is my simple code

canvas.onclick = function () {
window.location = canvas.toDataURL('image/gif');
};
Donnie Ibiyemi
  • 971
  • 3
  • 15
  • 26

1 Answers1

8

This will answer your question. In short, try console.log'ing your data, and, not all browsers will support writing to a gif.

Community
  • 1
  • 1
Dhaivat Pandya
  • 6,499
  • 4
  • 29
  • 43