[MAPSERVER-DEV] transparency bug in GetLegendGraphic

2 messages Options
Embed this post
Permalink
Bart van den Eijnden-3

[MAPSERVER-DEV] transparency bug in GetLegendGraphic

Reply Threaded More More options
Print post
Permalink
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


Bart van den Eijnden-3

Re: [MAPSERVER-DEV] transparency bug in GetLegendGraphic

Reply Threaded More More options
Print post
Permalink
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