I changed Savannah's mod_autoindex configuration to use PNGs /icons (no GIFs at gnu.org), and noticed that the PNG files do not have a transparent background. I used this quick script to convert them well from GIFs: for i in *.png; do giftopnm --alphaout $i.msk ${i%png}gif | pnmtopng -alpha $i.msk > $i; rm -f $i.msk; done (the script iterates on png's because the animation gif should not be taken into account).
Now I have a bugzilla account I'm actually doing something about this. This bites me frequently, hence the vote. If the pnm tools aren't installed, but gif2png is, then: $ gif2png -tw *.gif small/*.gif | xargs gif2png -ghnrsO Expected output from command-line is one stderr message from the first gif2png invocation, noting the animated GIF (which is the reason for doing things this way).
I see the problem, that there are just a few browsers that actually support transparent png images, resp. some browsers have real problems with them. Perhaps we should just put the conversion script snippets somewhere into the docs?
The problem is that the PNGs are shipped at all without transparency. Since the PNGs aren't actually used by default, can't they be fixed so that anyone who chooses to use them at least gets full PNGs which don't look so bad in mod_autoindex that they put people off using PNGs? It looks as though MSIE is the one fly in the ointment: http://www.libpng.org/pub/png/pngstatus.html but according to that, cells which aren't completely opaque are rendered as completely transparent; since the Apache images don't use blending but have pixels either transparent or with colour (AFAIK), for this purpose is there actually a problem? I just checked with my fiancee's MSIE 6.0 and the few icons used in one of my mod_autoindex pages rendered just fine; that's with the transparent PNGs rendered by the example command-line which I gave. In fact, I've just created a web-page using all the PNG icons (except those in small) and they _all_ rendered fine. If anyone wants to test more widely, there seems to be a decent testbed at: http://entropymine.com/jason/testbed/pngtrans/ but that covers a much more general case than the Apache icons, which require a much simpler subset of PNG rendering functionality.
Created attachment 13727 [details] Transparent PNG icons Transparent PNG icons, converted from the transparent GIFs from the 2.0.52 source distribution.
Created attachment 13728 [details] Transparent PNG icons New version with the small directory included
Sorry for all the new comments, I'm unfamiliar with bugzilla. I've attached a tarball of transparent PNG icons. These were converted from the GIFs distributed with 2.0.52 using "giftopng -O". They are slightly (a few bytes per icon) larger than the old, non-transparent ones, and as far as I can tell display just fine in all browsers (even IE). Please consider moving these icons into CVS so they may one day be distributed. I'm getting tired of having to convert the GIFs by hand every time I install a new version of Apache :) Thanks
I can indeed still reproduce it. I hope it can be fixed; as said the icons now display badly in *any* browser while that could be reduced to only some (by now already older) browers. The following snippet when using ImageMagick solves it: for i in *.png; do convert ${i%png}gif $i;done Thanks.
Come on guys, it's been 3 years and we've provided you three different ways to fix this.
Thanks for the ImageMagick pointer (although I had to resort to GraphicsMagick since ImageMagick was generating corrupt .png's). Note I used the -quality 100 to avoid any lossy optimization.
(In reply to comment #9) Thanks, Will! You are my PNG hero.