[mapserver-dev] map imagecolor not working with agg/png

Guillaume Sueur guillaume.sueur at neogeo-online.net
Wed Oct 1 12:28:11 EDT 2008


Hi John,

If you want some solid background, why are you using RGBA PNG ? Have a
try with RGB, and maybe add a transparent=false formatoption

regards,

Guillaume

John Cole a écrit :
> I have a map file that I'm setting the image color on.  It works with
> the agg/jpeg driver, but not the agg/png driver.
> 
> Here are my output sections:
> OUTPUTFORMAT
>     NAME "png"
>     DRIVER "AGG/PNG"
>     MIMETYPE "image/png"
>     IMAGEMODE RGBA
>     EXTENSION "png"
>     FORMATOPTION "INTERLACE=OFF"
> END
> 
> OUTPUTFORMAT
>     NAME "png24"
>     DRIVER "AGG/PNG"
>     MIMETYPE "image/png; mode=24bit"
>     IMAGEMODE RGBA
>     EXTENSION "png"
>     FORMATOPTION "INTERLACE=OFF"
> END
> 
> OUTPUTFORMAT
>    NAME "JPEG"
>    DRIVER "AGG/JPEG"
>    IMAGEMODE RGB
>    FORMATOPTION "QUALITY=95"
> END
> 
> And my image color section is:
> STATUS ON
> SIZE 600 400
> EXTENT -128.2 16.9 -65.2 58.9
> UNITS DD
> IMAGECOLOR 156 188 217
> IMAGETYPE png
> 
> If I change IMAGETYPE to jpeg, then the background is set correctly.
> 
> I'm using MS4W 2.3.0 on Windows 2008 Server.  
> MapServer version 5.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=PDF
>  OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
> SUPPORTS=ICO
> NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER
> SUPPORTS=FASTCGI SUP
> PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS
> INPUT=OGR
>  INPUT=GDAL INPUT=SHAPEFILE
> 
> I checked current bugs and nabbled the list but didn't see a mention of
> an issue here.  Do I have to set something in the png output for the
> background image to work?
> 
> Thanks,
> 
> John
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev

-


More information about the mapserver-dev mailing list