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

发布于 2024-08-10 18:31:46 字数 342 浏览 3 评论 0原文

Excanvas.js 允许 IE 使用 canvas 标记,但 getImageData 方法是不支持。

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

我正在尝试消除服务器命中以提高 Ajax 应用程序的响应能力,但如果无法从 IE 中获取信息,我可能只能为 FF、Chrome、Opera 和 Safari 做到这一点。

Excanvas.js allows IE to work with the canvas tag, but the getImageData method is not supported.

Is there any way at all to get the value of a specified pixel in IE (img or VML or whatever other ways bitmaps from a server can be displayed in IE)? I'm assuming there's not.

I'm trying to get rid of a server hit to improve responsiveness of an Ajax app, but I might only be able to do it for FF, Chrome, Opera, and Safari if there's no way to coax the info out of IE.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

东走西顾 2024-08-17 18:31:46

正如下面的链接中提到的...

ExCanvas 不支持任何
图像数据函数(createImageData、
获取图像数据、放置图像数据)。给定
它的实施方式是高度
我们不太可能添加
VML 中对其的支持
ExCanvas 的实现。

应该
在 Silverlight 版本中可行
但我们并没有花太多时间在这上面
最近。 ExCanvas 支持大多数
中指定的功能
最初的苹果画布规格,但很少
gecko 添加的内容
实施并随后指定
html5 工作组。

原因是
相当简单,ExCanvas使用VML来做
实际的绘图和许多
添加(例如 getImageData)
需要像素级访问
不是由 VML 提供的。你最好的选择
现在是跟踪所有
用于绘制画布的命令和
使用它们生成图像服务器
侧面。

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

为什么 IE 不能像其他孩子一样使用真正的画布......

As mentioned in the link below...

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

Why can't IE just use a real canvas like all the other kids....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文