Internet Explorer的toDataURL()替代? [英] Internet Explorer toDataURL() alternative?

查看:213
本文介绍了Internet Explorer的toDataURL()替代?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我需要保存在< canvas> 元素上绘制的图像数据。并且有在大多数现代浏览器工作的toDataURL()方法。

So I need to save image data drawn on a <canvas> element. And there is the toDataURL() method which works in most modern browser.

除了...你猜到它... Internet Explorer。

Except... you guessed it... Internet Explorer.

我已经搜索过互联网,但无处不在的人说我应该使用SVG / VML来保存数据,但他们从来没有提到过。我没有任何经验与SVG / VML在IE如何保存图像绘制在Internet元素在Internet Explorer中的图形?有人有经验吗?

I've searched the internet but everywhere people say I should use SVG/VML to save the data, but they never mention how. I have not any experience with SVG/VML in IE so how do I save image drawn in a canvas element in Internet Explorer? Does anyone have experience?

目前,我不得不在客户端和服务器上复制绘图代码,开始变得复杂。因此,如果有一种方法,我可以提取在客户端(或服务器)上的画布标签上绘制的图像,这当然会有帮助。

At the moment, I had to duplicate the drawing code on both the client and on the server which is starting to get complicated. So if there is a way I could extract the image drawn on the canvas tag on the client (or server) side that'd certainly help.

谢谢! >

Thanks!

推荐答案

您可能能够获得VML等等,但是这是一个XML格式,所以这可能不是你想要的。没有办法,你可以从IE没有使用插件获取图像。

You might be able to get the VML and same that, but that is an XML format, so that's probably not what you want. There's not way you can get an image from IE without using a plug-in.

这篇关于Internet Explorer的toDataURL()替代?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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