[MAPSERVER-DEV] transparency bug in GetLegendGraphic

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[MAPSERVER-DEV] transparency bug in GetLegendGraphic

Bart van den Eijnden-3
Hi list,

it seems an image returned by WMS GetLegendGraphic can't be made transparent unless we use the deprecated TRANSPARENT property of the LEGEND object.

My outputformat is defined transparent:

  OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "GD/PNG"
    EXTENSION "png"
    IMAGEMODE "RGBA"
    TRANSPARENT TRUE
  END

If I try an equivalent mode=legend request the legend does come back transparent, so I believe this is likely a problem in the mapwms.c code.

This is both a problem in MS 5.0 and 4.8.4.

Any pointers?

Example page to reproduce:

<html>
<body style="background-color:#FF0000">
<img src="http://www.rijkswaterstaat.nl/services/geoservices/basispakket/grenzen?mode=legend&layer=AAA212">
<img src="http://www.rijkswaterstaat.nl/services/geoservices/basispakket/grenzen?service=WMS&format=image/png&request=GetLegendGraphic&version=1.1.1&layer=AAA212">
</body>
</html>

Best regards,
Bart


Reply | Threaded
Open this post in threaded view
|

Re: [MAPSERVER-DEV] transparency bug in GetLegendGraphic

Bart van den Eijnden-3
I've opened up a bug and attached a patch (I love those single-line problems, at least I can fix those :-) ):

http://trac.osgeo.org/mapserver/ticket/2494

Best regards,
Bart

On Feb 6, 2008 11:59 AM, Bart van den Eijnden <[hidden email]> wrote:
Hi list,

it seems an image returned by WMS GetLegendGraphic can't be made transparent unless we use the deprecated TRANSPARENT property of the LEGEND object.

My outputformat is defined transparent:

  OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "GD/PNG"
    EXTENSION "png"
    IMAGEMODE "RGBA"
    TRANSPARENT TRUE
  END

If I try an equivalent mode=legend request the legend does come back transparent, so I believe this is likely a problem in the mapwms.c code.

This is both a problem in MS 5.0 and 4.8.4.

Any pointers?

Example page to reproduce:

<html>
<body style="background-color:#FF0000">
<img src="http://www.rijkswaterstaat.nl/services/geoservices/basispakket/grenzen?mode=legend&layer=AAA212">
<img src="http://www.rijkswaterstaat.nl/services/geoservices/basispakket/grenzen?service=WMS&format=image/png&request=GetLegendGraphic&version=1.1.1&layer=AAA212">
</body>
</html>

Best regards,
Bart