TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Javascript, AJAX, E4X (http://www.talkphp.com/javascript-ajax-e4x/)
-   -   PNG Transparency in IE 6 (http://www.talkphp.com/javascript-ajax-e4x/1884-png-transparency-ie-6-a.html)

Nor 01-07-2008 05:16 PM

PNG Transparency in IE 6
 
How could I fix the images for IE 6 so it doesn't have that weird BG :P..

obolus 01-07-2008 06:15 PM

There are a few people out there that have written solutions to this issue.

This one (conditional HTML, and a JS) was released in 06, but works very well. It doesn't work for background PNGs though.

PNG in Windows IE

This one I haven't tried but has support for background PNGs: IE PNG Fix - TwinHelix. This one adds in some CSS trickery as well as JS and conditional html.

Andrew 01-08-2008 12:56 AM

I would recommend the one obolus suggested in the latter portion of his post. I've tried it out a bit, but when I tried it, it didn't support CSS background images, but now that it does, it might be worth a try.

RobertK 01-08-2008 01:11 AM

Part of the difficulty with IE displaying PNGs correctly has to do with the built in gamma settings, not just a lack of transparency support. IE7 appears to fix this, but anything lower will experience this problem with the gamma settings. One fix for that is to strip the image's gamma part and set it to zero, which solves that trouble. See more here.

So unfortunately you'll probably need both fixes if you want to use PNG images.

Nor 01-08-2008 01:10 PM

Thanks I'll read what you said.

Kalle 01-08-2008 11:27 PM

Quote:

Originally Posted by RobertK (Post 7867)
Part of the difficulty with IE displaying PNGs correctly has to do with the built in gamma settings, not just a lack of transparency support. IE7 appears to fix this, but anything lower will experience this problem with the gamma settings. One fix for that is to strip the image's gamma part and set it to zero, which solves that trouble. See more here.

So unfortunately you'll probably need both fixes if you want to use PNG images.

Ah thanks for a great article read =)

victorius 01-12-2008 10:13 PM

I have no experience with TweakPNG but I've used with great effect pngcrush.

As that is a command line utility, I made a .BAT file that will process for example a directory of png images and remove all color information. The .BAT file is essentially just all the parameters because then I don't need to remember them.

How to remove the color with pngcrush

RobertK says you set the gamma part to 0. Like I said, I have no experience with TweakPNG but with pngcrush you remove the color information and that reduces filesize. Sometimes by alot.


Just yet another way to do things ;-)

RobertK 01-12-2008 10:24 PM

Well, colorinformation == gamma. ;-) Maybe a little different in naming, but I doubt you use only grayscale PNGs. It's the information that tells different systems how to interpret those RGBA colors that IE needs to ignore.

victorius 01-12-2008 11:12 PM

Quote:

colorinformation == gamma
I disagree. I think that in this case the gamma is just a constant. Really just saying: "ok, see that color information there? Display it with this gamma level".

So setting that to 0 will neutralize the effect of the gamma level, but all the color correction information is still there.

So, technically we're both wrong. :-D We aren't really talking about "color information". The correct term (for what we are discussing) is "color correction information".

Quote:

The main use of pngcrush is for reducing the size of the image data contained in the IDAT section.
Quote:

pngcrush has one advantage over the other programs because it can remove all the color-correction data (gamma, white balance, ICC color profile, standard RGB color profile) from PNG files.....

... Since most graphics software embed the extra color-correction data, which is normally not needed, this can produce file sizes that are up to 40 % smaller than the original. Greater reductions come from PNG images that have 256 colors or less (indexed color).

RobertK 01-12-2008 11:37 PM

Haha, fine get technical. :-D Two ways to solving the same problem.

I just hope it doesn't save in CMYK, its color range is slightly less vibrant.

Nor 01-14-2008 01:56 PM

I tried tweakpng and it didn't work..


All times are GMT. The time now is 11:39 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0