0

Possible Duplicate:
Capture HTML Canvas as gif/jpg/png/pdf?

I'm interested in using the canvas method toDataURL() to grab frames from the canvas and eventually turn it into a movie.

I can easily create an array of frames using this method. The question is, how do I get those frames onto my hard drive so that I can work with them?

Community
  • 1
  • 1
Fawkes5
  • 1,001
  • 3
  • 9
  • 12

1 Answers1

1

You cannot do this through Javascript alone. Quoting this answer:

JavaScript and the DOM provide the potential for malicious authors to deliver scripts to run on a client computer via the web. Browser authors contain this risk using two restrictions. First, scripts run in a sandbox in which they can only perform web-related actions, not general-purpose programming tasks like creating files.

However, there are other ways to accomplish your goal. If you are using HTML5, for example, you can use the File APIs. Check out a tutorial here.

Good Luck!

Community
  • 1
  • 1
ChrisHarris2012
  • 404
  • 2
  • 6