如何将数据URI的内容保存到图像. [英] How to save the contents of Data URI to image.

查看:79
本文介绍了如何将数据URI的内容保存到图像.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在Google Chrome浏览器中,''chrome.tabs.captureVisibleTab(integer windowId, function callback)''方法将返回捕获的标签的可见区域的JPEG编码的数据URL.

我们希望将该内容另存为图像,而不打开/传递到新的html页面中.

有人知道怎么用javascript来完成.

请提供帮助.
谢谢.

Hi,

In Google Chrome the ''chrome.tabs.captureVisibleTab(integer windowId, function callback)'' method will return a data URL of the JPEG encoding of the visible area of the captured tab.

We want to save that content as image to hard disk without opening/passing the contents into new html page.

Does anybody know how it can be done by javascript.

Please provide help.
Thanks.

推荐答案

JavaScript无法访问文件系统,您的浏览器已沙箱化.所以答案是,你不能.
Javascript has no access to the file system, your browser is sandboxed. So the answer is, you cannot.


这篇关于如何将数据URI的内容保存到图像.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆