IE8中PNG的背景颜色 [英] Background colour of a PNG in IE8

查看:103
本文介绍了IE8中PNG的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下徽标,它与FF3,Chrome(#363636)中的HTML正文显示的背景颜色相同。

I have the following logo, which displays as the same background colour as the HTML body in FF3, Chrome (#363636).

但是在IE8中显示的是不同的,颜色较深的。

But in IE8 it displays a different, darker colour.

这个FF3 / Chrome是否原谅我的PNG,或者只是另一个IE bug(我认为他们在IE7中修复了PNG支持)?

Is this FF3/Chrome being forgiving of my PNG, or just another IE bug (I thought they fixed PNG support in IE7)?

更新:我仍然遇到此问题,我用来纠正它的pngcrush参数是:

Update: I still get this problem, and the pngcrush arguments I use to correct it are:


pngcrush -replace_gamma 0.5181347 infile.png outfile.png

pngcrush -replace_gamma 0.5181347 infile.png outfile.png

Win32二进制链接这里

The Win32 binary link is here.

推荐答案

您的PNG中有一个伽马校正信息(gAMA块)结构。如果您正在处理想要进行伽马校正的照片,那就没关系了,但这对网络来说不是正确的。

You have a gamma correction information (gAMA chunk) structure in your PNG. That's fine if you're working with photos where you want gamma correction, but it's not the right thing for the web.

在网络上,浏览器通常不会应用伽玛校正HTML / CSS颜色或其他图像,因此如果您使用伽玛校正,您将在PNG上获得与页面其余部分不一致的结果。有些浏览器不会因为这个原因而应用PNG gamma,这就是获得变量结果的原因。

On the web, browsers typically do not apply gamma correction to HTML/CSS colours or other images, so if you use gamma correction you'll get results on your PNG that are inconsistent with the rest of the page. Some browsers do not apply PNG gamma for this exact reason, which is why you are getting the variable results.

将徽标加载到图像编辑器中并将其保存回原来gAMA块信息。 更多

Load the logo into an image editor and save it back out without the gAMA chunk information. More.

这篇关于IE8中PNG的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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