即时下载画布图像 [英] Download canvas image on the fly
本文介绍了即时下载画布图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有< div id =qrcode>< / div>
然后 jquery.qrcode.js插件通过QR码创建一个
`元素。
所以,我想放
是否可以这样做?
推荐答案
可以保存图像使用HTML5 blob。
The saving of the image can be done using HTML5 blobs.
http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-file-writing
你可以从这个代码中得到Blob:
You can get Blob out of the like done in this code:
https://github.com/miohtama/Krusovice/blob/master/src/tools/resizer.js
这篇关于即时下载画布图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文