internet-explorer - 有没有办法从 Internet Explorer 获取像素数据?

标签 internet-explorer canvas pixel vml getimagedata

Excanvas.js 允许 IE 使用 canvas 标签,但 getImageData method is not supported.

有什么方法可以在 IE 中获取指定像素的值(img 或 VML 或来自服务器的位图可以在 IE 中显示的任何其他方式)?我假设没有。

我试图摆脱服务器命中以提高 Ajax 应用程序的响应能力,但如果无法从 IE 中获取信息,我可能只能对 FF、Chrome、Opera 和 Safari 执行此操作。

最佳答案

如以下链接所述...

ExCanvas does not support any of the ImageData functions (createImageData, getImageData, putImageData). Given the way it's implemented it's highly unlikely that we'll be able to add support for it in the VML implementation of ExCanvas.

It should be doable in the Silverlight version but we haven't spent much time on that lately. ExCanvas supports most of the functionality as specified in the initial apple canvas spec but few of the additions added by the gecko implementation and later speced by html5 working group.

The reason being fairly simple, ExCanvas uses VML to do the actual drawing and many of the additions (such as getImageData) requires pixel level access which isn't provided by VML. Your best bet for now would be to keep track of all commands used to draw the canvas and use those to generate an image server side.



http://groups.google.com/group/google-excanvas/browse_thread/thread/7d35fa72dbe1487b

为什么 IE 不能像所有其他 child 一样使用真正的 Canvas ......

关于internet-explorer - 有没有办法从 Internet Explorer 获取像素数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1688566/

相关文章:

javascript - HTML Canvas : Replace the Shapes with Numbers (ctx)

user-interface - Canvas 或 SVG UI 组件

c++ - 如何使用 C++ 从 png 文件中提取像素?

ios - OpenGL ES 像素艺术 - 缩放

IE 的 HTML/CSS 高度问题

javascript - IE 收到 302 后继续执行 JS?

internet-explorer - 在 IE6、IE7、IE8 和 Firefox 上尝试将三个 div 放在同一行上,一个对着另一个,居中

在打开开发工具之前,IE 中的 Javascript 行为不正常 - 与控制台无关?

javascript - CSS 如何在 Div 或 Canvas 上生成此形状

css - 在 LESS CSS 中从百分比计算宽度到像素然后减去像素