[mapserver-users] Transparent PNG

Thomas Bonfort thomas.bonfort at camptocamp.com
Tue May 26 02:36:54 PDT 2009


OPACITY at the STYLE level as you are doing is only available for the
AGG renderer, not the GD one.
you should either switch to AGG rendering, or move your OPACITY
keyword to the LAYER level.

regards,

thomas

--
www.camptocamp.com
+33 4 79 26 57 97



On Tue, May 26, 2009 at 11:29, Balázs Bámer <bamerbalazs at gmail.com> wrote:
> Hi All,
>
> I use Mapserver 5.2.2 and would like to produce transparent PNGs such
> that if there is a red polygon, its red fill and stroke would be for
> example 50% transparent. I need this to let an other layer's polygon
> appear at the same location. I tried the following way:
>  CLASS
>    NAME "Fekves"
>    STYLE
>      COLOR 27 158 119
>      OUTLINECOLOR 27 158 119
>      OPACITY 50
>    END
>  END
> in the layer descriptions
>
> and a format part in the MAP section:
> OUTPUTFORMAT
>  NAME png32
>  DRIVER "GD/PNG"
>  MIMETYPE "image/png"
>  IMAGEMODE RGBA
>  EXTENSION "png"
> END
>
> and a corresponding line
> IMAGETYPE png32
>
> but not succeeded, everything is totally opaque. Mapserver is compiled using
> ./configure --with-oci \
>  --with-oraclespatial=/usr/local/instantclient_11_1 \
>  --with-proj --with-threads --with-gdal --with-ogr \
>  --with-jpeg --with-png=/usr/lib --with-php=/usr/include/php5
> --with-wmsclient --with-wfsclient
>
> I tried adding the option --with-experimental-png but it missed some
> libraries I coudln't find.
>
> I know it is possible to generate such output using Geoserver, but now
> I need to use Mapserver.
> What is the solution?
>
> Thank you in advance, best regards: Balázs Bámer
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the MapServer-users mailing list