[pmwiki-users] Request: Transparent PNGs in PmWiki

Joachim Durchholz jo at durchholz.org
Mon Mar 20 02:15:43 CST 2006

Allister Jenks schrieb:
> On 3/18/06, Joachim Durchholz <jo at durchholz.org> wrote:
>> Note that it didn't work for me on IE - despite running on a Win 2000
>> Pro that's been doing it regular updates, and with JS switched on.
>> So whatever that page is doing, it's still too fragile to work well.
> Can you please try
> http://www.sittingduck.co.nz/pmwiki.php?n=Main.WikiSandbox and see if it
> works?
> If viewing with a non-IE-Windows browser, you should see a single image.
> With a IE-Windows browser you'll see two.  The first image is the same one
> others see and is just a simple Attach: of the transparent PNG.  The second
> image is the recipe at work (the PmWiki version is not up to date so all the
> markup in the recipe does not work).  Note on the first that the blue fades
> to a mid grey with a sharp end where it meets the background at the bottom
> of the image.  On the second image, the fade works correctly and there is no
> strong line at the bottom edge of the image.

Yes, that's exactly what I see.

Note that my actual point is that it's simply too complicated and 
fragile in general. You may be able to make it work for me, and for 
everybody else who's coming around, but it's simply not worth the 
hassle: there will always be somebody with a strange IE version or a 
different plugin version or disabled JS who won't see what you intended 
to show. It's simply too many permutations.

KISS is the principle to follow here, I think. These IE hacks are too 
complicated, take too much code to work, are too dependent on specific 
browser versions and parsing quirks (I'm pretty sure that most of the 
known "IE hacks" will not Do the Right Thing when IE 7 enters the scene. 
Not to speak of all those browsers that fake their browser 
identification strings.)

I'm quite happy with the script I posted earlier - it overlays the 
transparency on the server side and sends simple nontranparent PNGs, 
which is what will work even on the most braindamaged browsers. (I guess 
they built PNG transparency support into IE 7. In that case, the issue 
should go away in five years or so...)


More information about the pmwiki-users mailing list