Base64字符串图像数据显示在IE中?

时间:2022-11-13 12:31:38

I have a base64 string and i need to show it in my IE browser i tried with appending the

我有一个base64字符串,我需要在我尝试添加的IE浏览器中显示它

data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub/ /ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcpp

数据:图像/ gif,base64 R0lGODlhEAAOALMAAOazToeHh0tLS / 7 lzv / 0 jvb29t / f3 / /乌兰巴托/ / ge8WSLf / rhf / 3 kdbw1mxsbp / / mf / / / yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcpp

the above syntax it works fine in Firefox but does not work in IE ?? Any idea how d o i make my image be shown ? I am trying to set the src attribute from my code asp.net page code.

上面的语法在Firefox中工作得很好,但是在IE中却不行?你知道我如何让我的图像显示出来吗?我正在尝试从我的代码asp.net页面代码中设置src属性。

Thanks

谢谢

1 个解决方案

#1


2  

This should work in IE

这在IE中应该行得通

<img src="data:image/gif;base64,<YOUR DATA>" alt="Base64 encoded image" width="150" height="150"/>

IE limits this in-line size to 32KB..

IE将这一行的大小限制在32KB。

But there seems to be something wrong with your base64 data. It does not work on my tests in chrome,IE or anything.

但是你的base64数据似乎有点问题。它不能在我的chrome测试中使用。

http://jsfiddle.net/ppumkin/5JAjh/

http://jsfiddle.net/ppumkin/5JAjh/

#1


2  

This should work in IE

这在IE中应该行得通

<img src="data:image/gif;base64,<YOUR DATA>" alt="Base64 encoded image" width="150" height="150"/>

IE limits this in-line size to 32KB..

IE将这一行的大小限制在32KB。

But there seems to be something wrong with your base64 data. It does not work on my tests in chrome,IE or anything.

但是你的base64数据似乎有点问题。它不能在我的chrome测试中使用。

http://jsfiddle.net/ppumkin/5JAjh/

http://jsfiddle.net/ppumkin/5JAjh/