IE6 -无法加载一个普通的JPG格式

时间:2023-01-21 21:18:42

Try loading this normal .jpg file in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web server. I can even create a simple web page:

尝试在internetexplorer6.0中加载这个普通的.jpg文件。我得到一个错误的消息说图片不会载入。在任何其他浏览器中尝试它,它都可以正常工作。怎么了?.jpg文件只是web服务器上的普通图片。我甚至可以创建一个简单的网页:

<a href="http://www.zodiacwheels.com/images/wheels/blackout_thumb.jpg">blah</a>

and use right click + save target as with IE6 to save it to my desktop, and it's a valid JPG file. However, it won't load in the browser!

使用右键点击+ save target和IE6一样保存到我的桌面,它是一个有效的JPG文件。但是,它不会在浏览器中加载!

Why?!

为什么? !

I even tried checking the header response and MIME type and it looks fine:

我甚至尝试检查头响应和MIME类型,它看起来很好:

andy@debian:~$ telnet www.zodiacwheels.com 80
Trying 72.167.174.247...
Connected to zodiacwheels.com.
Escape character is '^]'.
HEAD /images/wheels/blackout_thumb.jpg HTTP/1.1
Host: www.zodiacwheels.com

HTTP/1.1 200 OK
Date: Wed, 20 Aug 2008 06:19:04 GMT
Server: Apache
Last-Modified: Wed, 20 Aug 2008 00:29:36 GMT
ETag: "1387402-914ac-48ab6570"
Accept-Ranges: bytes
Content-Length: 595116
Content-Type: image/jpeg

The site needs to be able to work with IE6, how come it won't load a simple .jpg file?

该网站需要能够使用IE6,为什么它不会加载一个简单的.jpg文件?

6 个解决方案

#1


29  

The JPG you uploaded is in CMYK, IE and Firefox versions before 3 can't read these. Open it using Photoshop (or anything similar, I'm sure GIMP would work too) and resave it in RGB.

你上传的JPG是在CMYK, IE和Firefox 3不能读这些。使用Photoshop(或者其他类似的工具,我确信GIMP也可以)打开它,然后重新保存到RGB中。

edit: Further Googling makes me suspect that CMYK isn't really a part of the jpeg standard, but can be shoehorned in there. That's why some software does not consider the file valid. It does however open just fine in Photoshop CS3, and shows a cmyk colorspace.

编辑:进一步的谷歌搜索让我怀疑CMYK并不是jpeg标准的一部分,但是可以硬塞进去。这就是为什么有些软件不认为文件是有效的。不过它在Photoshop CS3中打开得很好,显示了一个cmyk颜色空间。

#2


3  

It won't load in IE7 on my Vista x64 box. Also Paint.net won't save the file, saying "There was an unspecified error while saving the file."

它不会在我的Vista x64上载入IE7。另外,Paint.net不会保存文件,它说“保存文件的时候有一个未指定的错误。”

EDIT:

编辑:

In paint.net I did a Select All, New File, Paste, Save, and now it works fine. I'm guessing that file has some weird corruption.

在paint.net中,我做了一个Select All, New File, Paste, Save,现在它可以正常工作了。我猜那个文件有一些奇怪的损坏。

#3


2  

You can use jpeginfo to find out if a jpeg file is OK or not.

您可以使用jpeginfo来确定jpeg文件是否正确。

$jpeginfo -c blackout_thumb.jpg

美元jpeginfo - c blackout_thumb.jpg

blackout_thumb.jpg 240 x 240 32bit Exif N 595116 Unsupported color conversion request [ERROR]

blackout_thumb.jpg 240 x 240位32位Exif N 595116不支持的颜色转换请求[错误]

In your case the file is corrupted which explain why some browsers cannot display it.

在您的例子中,文件被损坏,这解释了为什么有些浏览器不能显示它。

#4


1  

Maybe it is related to this: http://photo.net/bboard/q-and-a-fetch-msg?msg_id=003j8d

可能与此相关:http://photo.net/bboard/qand -a-fetch-msg?msg_id=003j8d

#5


1  

The file is probably not a fully valid JPG and IE6/7/8 (I tested on IE8 and it wont load). Other browsers are a bit more defensive and can load it, but perhaps IE team choose not to load it as it could be invalid in a way that causes a security hole.

这个文件可能不是一个完全有效的JPG和IE6/7/8(我在IE8上测试过,它不会加载)。其他浏览器的防御能力更强,可以加载它,但IE团队可能会选择不加载它,因为它可能以导致安全漏洞的方式无效。

As Ryan Fox says, open it in an editor and re-save it ... where did the image come from, if it came from an editor dont use that editor again.

正如Ryan Fox所说,在编辑器中打开它,然后重新保存……这张照片是从哪里来的,如果是从编辑那里来的,就不要再用那个编辑器了。

Edit: I opened it an Paint Shop Pro and it had an unknown color palette so had to convert it ... perhaps that is the problem. You could report it as a bug to the IE team and see what they say.

编辑:我开了一个油漆店专业版,它有一个未知的调色板,所以必须转换它……也许这就是问题所在。你可以把它作为一个bug报告给IE团队,看看他们怎么说。

#6


0  

It is possible for other applications to register themselves as a handler for files with a particular extension. Quicktime has (or at least had) a tendency to do this with .png files, so a .png file would display fine inline in an HTML page, but with an URL referring directly to the .png file, IE would immediately delegate all responsibility for handling the file to Quicktime.

其他应用程序可以将自己注册为具有特定扩展名的文件的处理程序。Quicktime有(或至少有)使用.png文件的趋势,所以.png文件会在HTML页面中显示很好的内联,但是使用指向.png文件的URL, IE会立即将处理该文件的所有责任委托给Quicktime。

Might this be what is happening to your .jpg files? Is it only this .jpg file that you're having a problem with?

这可能是你的。jpg文件发生了什么?是不是只有这个。jpg文件有问题?

#1


29  

The JPG you uploaded is in CMYK, IE and Firefox versions before 3 can't read these. Open it using Photoshop (or anything similar, I'm sure GIMP would work too) and resave it in RGB.

你上传的JPG是在CMYK, IE和Firefox 3不能读这些。使用Photoshop(或者其他类似的工具,我确信GIMP也可以)打开它,然后重新保存到RGB中。

edit: Further Googling makes me suspect that CMYK isn't really a part of the jpeg standard, but can be shoehorned in there. That's why some software does not consider the file valid. It does however open just fine in Photoshop CS3, and shows a cmyk colorspace.

编辑:进一步的谷歌搜索让我怀疑CMYK并不是jpeg标准的一部分,但是可以硬塞进去。这就是为什么有些软件不认为文件是有效的。不过它在Photoshop CS3中打开得很好,显示了一个cmyk颜色空间。

#2


3  

It won't load in IE7 on my Vista x64 box. Also Paint.net won't save the file, saying "There was an unspecified error while saving the file."

它不会在我的Vista x64上载入IE7。另外,Paint.net不会保存文件,它说“保存文件的时候有一个未指定的错误。”

EDIT:

编辑:

In paint.net I did a Select All, New File, Paste, Save, and now it works fine. I'm guessing that file has some weird corruption.

在paint.net中,我做了一个Select All, New File, Paste, Save,现在它可以正常工作了。我猜那个文件有一些奇怪的损坏。

#3


2  

You can use jpeginfo to find out if a jpeg file is OK or not.

您可以使用jpeginfo来确定jpeg文件是否正确。

$jpeginfo -c blackout_thumb.jpg

美元jpeginfo - c blackout_thumb.jpg

blackout_thumb.jpg 240 x 240 32bit Exif N 595116 Unsupported color conversion request [ERROR]

blackout_thumb.jpg 240 x 240位32位Exif N 595116不支持的颜色转换请求[错误]

In your case the file is corrupted which explain why some browsers cannot display it.

在您的例子中,文件被损坏,这解释了为什么有些浏览器不能显示它。

#4


1  

Maybe it is related to this: http://photo.net/bboard/q-and-a-fetch-msg?msg_id=003j8d

可能与此相关:http://photo.net/bboard/qand -a-fetch-msg?msg_id=003j8d

#5


1  

The file is probably not a fully valid JPG and IE6/7/8 (I tested on IE8 and it wont load). Other browsers are a bit more defensive and can load it, but perhaps IE team choose not to load it as it could be invalid in a way that causes a security hole.

这个文件可能不是一个完全有效的JPG和IE6/7/8(我在IE8上测试过,它不会加载)。其他浏览器的防御能力更强,可以加载它,但IE团队可能会选择不加载它,因为它可能以导致安全漏洞的方式无效。

As Ryan Fox says, open it in an editor and re-save it ... where did the image come from, if it came from an editor dont use that editor again.

正如Ryan Fox所说,在编辑器中打开它,然后重新保存……这张照片是从哪里来的,如果是从编辑那里来的,就不要再用那个编辑器了。

Edit: I opened it an Paint Shop Pro and it had an unknown color palette so had to convert it ... perhaps that is the problem. You could report it as a bug to the IE team and see what they say.

编辑:我开了一个油漆店专业版,它有一个未知的调色板,所以必须转换它……也许这就是问题所在。你可以把它作为一个bug报告给IE团队,看看他们怎么说。

#6


0  

It is possible for other applications to register themselves as a handler for files with a particular extension. Quicktime has (or at least had) a tendency to do this with .png files, so a .png file would display fine inline in an HTML page, but with an URL referring directly to the .png file, IE would immediately delegate all responsibility for handling the file to Quicktime.

其他应用程序可以将自己注册为具有特定扩展名的文件的处理程序。Quicktime有(或至少有)使用.png文件的趋势,所以.png文件会在HTML页面中显示很好的内联,但是使用指向.png文件的URL, IE会立即将处理该文件的所有责任委托给Quicktime。

Might this be what is happening to your .jpg files? Is it only this .jpg file that you're having a problem with?

这可能是你的。jpg文件发生了什么?是不是只有这个。jpg文件有问题?