Danny Fox
Danny Fox

Reputation: 40719

How to save canvas to an image object?

How to save the content of the canvas to an image object? Is there any way to do it?

Upvotes: 2

Views: 2433

Answers (2)

Rebecca
Rebecca

Reputation: 587

Check out Canvas2Image. Canvas2Png claims to be more cross-browser.

toDataUrl() will not work in Internet Explorer.

Also, if you truly want cross-browser functionality with the canvas, make sure to use Excanvas

Upvotes: 2

keyboardP
keyboardP

Reputation: 69372

You can use var imgUrl = myCanvas.toDataUrl();

Upvotes: 5

Related Questions