[Mapserver-users] PNG Transparency in Internet Explorer -Solution

Ed McNierney ed at topozone.com
Thu Dec 18 17:32:02 PST 2003


Doug -

1. This fix uses the AlphaImagerLoader filter that is part of Internet
Explorer 5.5 and above (note: that means this fix only works on IE 5.5
and above, so check your clients).  It is a client problem and a client
fix, so it is independent of the Web server.  The problem, of course, is
also independent of the Web server.

2. Well, 32-bit PNGs, actually, because it's the alpha-channel that
doesn't work and is fixed by this DirectX-based filter.  In some cases -
like hillshaded topos or color infrared DOQQs, 8-bit output is a serious
limitation and produces unacceptable results, so mandating 8-bit output
isn't always practical.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com
ed at topozone.com


-----Original Message-----
From: Doug Cates [mailto:doug at moximedia.com] 
Sent: Thursday, December 18, 2003 5:48 PM
To: Lowther, David W
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] PNG Transparency in Internet Explorer
-Solution

David,

1. Is this an IIS server only solution, or will it work with other
engines?

2. Isn't it only 24-bit PNG that browsers have trouble with? If so, USGS
should output the images in 8-bit PNG or GIF in order for their services
to be as interoperable as possible. The same holds true for people
publixhing WMS services using MapServer. 

Doug



On Thu, 2003-12-18 at 12:59, Lowther, David W wrote:
> Hi List,
> 
> Thought this might prove useful to someone...
> 
> Problem:
> 
> Internet Explorer does not correctly render transparency in PNG 
> images.
> 
> Solution:
> 
> This needs to go in the <head> of the HTML file that will display a
> PNG:
> 
> <style type="text/css">
> img { behavior: url("pngbehavior.htc"); } </style>
> 
> Alternatively, the following line may be included in a CSS
> (Stylesheet) that is used by the page:
> img { behavior: url("pngbehavior.htc"); }
> 
> It is only required by Internet Explorer, but will not cause problems 
> in other browsers.
> 
> Also, the attached pngbehaviour.htc file must be present in the 
> directory of the HTML files displaying PNG images and the spacer.gif 
> must be accessible to the pngbehaviour.htc script (default is 
> images/spacer.gif).
> 
> 
> <<pngbehavior.zip>>  <<spacer.zip>>
> 
> We came across this issue when using Mapserver as our WMS for the USGS

> National Map. Our layers obscured everything below them in Internet 
> Explorer, but were correctly transparent in Mozilla. When USGS 
> implements this things should be OK in Internet Explorer also.
> 
> 
> David Lowther
> Software Engineer
> GEO Information Systems
> University of Oklahoma
> dlowther at ou.edu
> (405) 325-3131
> http://www.geo.ou.edu
> 
> 
> 

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users





More information about the MapServer-users mailing list