从获取二进制图像内容
我需要将图像字节内容从 JavaScript 传输到 COM 组件。我将弄清楚 COM 部分,但如何获得引用 的二进制图像?
我只需要支持 IE6+。
如有必要,我可以根据来源重新下载图像。没有必要使用已经下载的图像。
是否有 downloadToBytes() 函数或类似函数?
I need to transfer image byte contents from JavaScript to a COM component. I will figure out the COM part but how do I get the binary image having a reference to <IMG>
?
I need to support IE6+ only.
I am free to re-download the image if necessary given the source. It is not necessary to use the already downloaded image.
Is there a downloadToBytes() function or similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我唯一能想到的是使用ajax(重新下载图像)
如果图像是外部的,则它必须具有跨域权限,这是唯一的坏处。或者您可以从没有该限制的内容脚本执行它(网站页面必须包含在清单的权限值中)
The only thing I could think of is the use of ajax(redownloading the image)
The only bad thing if that the image has to have cross domain permissions if it's external. Or you can execute it from a content script which doesn't have that limit(website page must be included in the permissions value in the manifest)