如何保存 HTML5 画布?

2022-01-17 00:00:00 save html html5-canvas

目前我正在使用 Canvas2Image 来保存我的 HTML5 画布的内容.但是,它似乎不适用于 Google Chrome.欢迎任何关于如何解决该问题的想法.:)

Currently I am using Canvas2Image to save the content of my HTML5 canvas. It doesn't appear to work in Google Chrome, however. Any ideas on how to work around the issue are welcome. :)

推荐答案

canvas.toDataURL() 在 Chrome 中似乎可以正常工作,因此可能是库问题.不过,将画布转换为图像"功能似乎可以正常工作.

canvas.toDataURL() appears to work fine in Chrome, so it may be a library issue. The "convert canvas to image" functionality seems to work, though.

相关文章