[mapserver-users] AGG FORMATOPTION "PALETTE_FORCE=TRUE" - transparent background
Ivan Mincik
ivan.mincik at gmail.com
Thu Mar 5 07:38:20 PST 2009
On Thursday 05 March 2009, you wrote:
> for this to work, you'll *have* to compile mapserver with
> "--with-experimental-png".
> (i.e. mapserv -v should ouput SUPPORTS=RGBA_PNG)
I confirm, that after recompiling with "--with-experimental-png" 8bit transparency is working.
Thank You Thomas.
>
> once this is done, you should supply a palette file with rgba
> quadruplets. In your example, your palette entries are incorrect:
> 0,0,0 is a triplet instead of a quadruplet (should be 0,0,0,0)
>
> On a side note, your 230,230,230,0 isn't usefull, as it corresponds
> to 0,0,0,0 , thus eating up a entry in your generated palette (and
> palette entries in rgba mode are very expensive :) )
>
> --
> Thomas Bonfort
> CampToCamp
>
> On Thu, Mar 5, 2009 at 10:29, Ivan Mincik <ivan.mincik at gmail.com> wrote:
> > I am not sure if is it possible to reduce AGG PNG image to 8bit by "PALETTE_FORCE=TRUE" option and keep transparent background.
> > I went through all posts about this issue and it is not clear for me if I still need to compile mapserver with "--with-experimental-png" switch or it is currently not possible.
> >
> > I have tested all possible parameters and combinations of RGB or RGBA in OUTPUTFORMAT and palette file with BLACK BACKGROUND as result.
> >
> > /usr/lib/cgi-bin/mapserv -v
> > MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> >
> > I use mapserver as WMS server.
> >
> > Currently I have this in mapfile:
> >
> > NTERLACE OFF
> > TRANSPARENT TRUE
> > IMAGETYPE AGG8
> > OUTPUTFORMAT
> > NAME "AGG8"
> > DRIVER "AGG/PNG"
> > MIMETYPE "image/png"
> > EXTENSION "png"
> > IMAGEMODE "RGBA" - #(IMAGEMODE "RGB" is working, nice result without transparent background)
> > FORMATOPTION INTERLACE=OFF
> > FORMATOPTION "PALETTE_FORCE=TRUE"
> > FORMATOPTION "PALETTE=/s/agg_8bit_pal.txt"
> > END
> >
> > And palette file:
> >
> > 0,0,0
> > 255,255,255,255
> > 230,230,230,0
> > 174,17,52,255
> > 174,17,52,255
> > 242,221,190,255
> >
> > Please, can anybody clarify this?
> > Thanks
> > Ivan
> >
> >
> > _______________________________________________
> > 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