Internet Explorer和Base64编码的图像显示 [英] Internet Explorer and Base64 image display

查看:153
本文介绍了Internet Explorer和Base64编码的图像显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在目的使用Javascript来操作更方便地在客户端不同的图像,我写的服务器端(2010年VB)功能将文件转换成一个base64字符串,我发送给客户端。

In aim to manipulate more easily various images on client side with Javascript, I wrote a function on server side (in VB 2010) to convert a file into a base64 string that I send to the client.

当我与3个不同的图像,1肖像和2风景试过在Internet Explorer 8.0,我意识到,只有肖像图像完全显示,同时兼有山水图像被截断(我能看到的只是图像的上半部分)。

When I tried it in Internet Explorer 8.0 with 3 different images, 1 portrait and 2 landscapes, I realized that only the portrait image was displayed entirely, meanwhile both landscape images were truncated (I can see just the upper part of the image).

我想我在我的转换功能中的错误,直到我试图用Firefox我的本地网页:每幅图像是完全由火狐显示

I thought I had a bug in my conversion function, until I tried my local page with Firefox: every image is perfectly displayed by Firefox.

因此​​,有我的问题:这是Internet Explorer的一个众所周知的错误吗?如果答案是肯定的,是否有针对知名的bug一个著名的补救措施?

So there is my question: Is this a well-known bug of Internet Explorer ? If the answer is yes, Is there a well-known remedy for that well-known bug?

推荐答案

IE8只能做Base64的URI的图像大小可达32KB。这是一个轻微恼人的限制,但你仍然可以以图标的/ etc度日。请记住,Base64编码的连接codeD映像上派下来的管道平均水平的33%的数据,无论如何,所以它的......嗯,你知道的,用你的判断。

IE8 can only do Base64 URI images up to 32kb in size. It's a marginally annoying limitation, but you can still get by with icons/etc. Keep in mind that Base64 encoded images are on average 33% more data sent down the pipe anyway, so it's... eh, y'know, use your judgement.

有关有兴趣的人,它也可能使在IE6 / 7,这些工作(不,我可以补充,即32KB限制...)的 http://venodesigns.net/2010/06/17/you-got-your-base64-in-my-css /

For anyone interested, it's also possible to make these work in IE6/7 (without, I might add, that 32kb limit...): http://venodesigns.net/2010/06/17/you-got-your-base64-in-my-css/

这篇关于Internet Explorer和Base64编码的图像显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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