[en] Fix PNG images dark in IE

IE can’t do any­thing right. If you save some gra­phi­cal ele­ments to PNG, and try to put them on an area with CSS-defi­ned color, the­re will be a dif­fe­ren­ce even if you used the same color in the PNG — IE ren­ders PNGs dar­ker than it sho­uld. The reason for this is misin­ter­pre­ta­tion of gAMA fra­me saved in PNGs that makes it possi­ble to bet­ter color-match pic­tu­res. The fix is to remo­ve this fra­me, and doing it on Ubun­tu is as easy as:

aptitude install pngcrush
cd your-graphics-directory
mkdir fixed
find . -type f -exec pngcrush -d fixed -rem cHRM -rem gAMA -rem iCCP -rem sRGB {} \;

Now you have a „fixed” direc­to­ry whe­re you have PNGs that will work pro­per­ly in IE (and are a bit smal­ler which is a nice side effect). If you’re sure they­’re ok, just do

mv fixed/* ./
rmdir fixed

Tha­t’s all.

Jeden komentarz do “[en] Fix PNG images dark in IE

  1. , they­’re real­ly as easy as copy/pasting into whta­ever you want to use them in. The back­gro­und is trans­pa­rent, so whta­ever you have bene­ath them will show through.

Możliwość komentowania została wyłączona.