PNG 图像不会在 IE7 或 Firefox 中显示,但可以在 Opera 中显示
我有一个网络服务,它创建一个 PNG 文件并返回一个链接。 然后这个图形被网站(ASP.NET)使用。
IE7和IE7 Firefox 3 无法显示该图像,但在 Opera 9.5 中可以正常显示。
以前有人遇到过同样的问题吗?
编辑: 内容类型设置为 image/png。 该图像是使用第三方供应商的库创建的,该库不向公众开放。
有机会检查 png 文件是否符合标准吗?
I got a webservice which creates a PNG-file and returns a link to it.
Then this graphic is used by a website (ASP.NET).
IE7 & Firefox 3 can't show this image but in Opera 9.5 it works fine.
Did anyone run across the same problem before?
Edit:
Content-type is set to image/png.
The image is created with the library from a 3rd party vendor which is not available to the public.
Any chance to check the png-file for compliance to the standard?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
原则上IE7和FF都可以显示PNG图片。 看来您的 PNG 不完全符合这些浏览器的渲染引擎(或标准?)。
如果不知道图像是如何创建的,则很难准确判断问题出在哪里。 你使用哪个库? 你有示例代码吗?
编辑(阅读 Yuval A 的评论后):
您还可以检查 Web 服务器发送的 HTTP 响应是否为 PNG 图像设置了正确的内容类型。 浏览器可能需要这样做才能正确显示图像。
In principle, both IE7 and FF can display PNG images. As it seems your PNG is not fully compliant to the rendering engines of these browsers (or to the standard?).
It is hard to tell where the problem lies exactly without knowing how the image was created. Which lib are you using? Do you have sample code?
EDIT (After reading the comment by Yuval A):
You could also check whether the HTTP response sent by your web server has the correct content type set for PNG images. This might be needed by browsers to display the image correctly.
检查您的网络服务如何“返回链接”。
它在 HTML 响应中是否正确表示? (即在具有正确 src 的 IMG 标记中?)
Check how your web service is "returning the link" to it.
Is it represented correctly on the HTML response? (i.e. in an IMG tag with a correct src?)
结果发现 png 没有使用正确的 dpi 设置渲染。 几个月后出现的一个微妙的错误。
Turns out that the png wasn't rendered with the right dpi settings. A subtle bug that emerged after some months.