Colors, PNGs

Berend Veldkamp berend.veldkamp at ARIS.NL
Mon Sep 6 09:43:06 EDT 2004


It might have something to do with the number of colors you use, with
pc256, you can only have 256 separate colors.

If you have "IMAGEMODE pc256", try and see if setting it to "rgb" helps.
  The filesize of your images will be larger, but you have more possible
colors.

i.e.

IMAGETYPE png24bit
OUTPUTFORMAT
   NAME png24bit
   DRIVER "GD/PNG"
   MIMETYPE "image/png"
   IMAGEMODE rgb
END

If this doesn't help, you could try to reduce the number of colors in
your map, for instance by not using antialiased fonts, but since your
image (without labels) already contains 243 colors, I doubt you can gain
much here.

HTH, Berend

Titus von der Malsburg wrote:
> Hi,
>
> I have a problem with colors in maps rendererd by Mapserver when using
> png as the outputformat.  I have two layers: a raster layer with
> black&white ortho imagery and a shape showing buildings in different
> colors.  The layers a look as expected when rendered
> individually.  See:
>
>  * http://www.cl.uni-heidelberg.de/~malsburg/temp/mapserv03.png
>  * http://www.cl.uni-heidelberg.de/~malsburg/temp/mapserv01.png
>
> But if I switch them both on, it looks like
>
>  * http://www.cl.uni-heidelberg.de/~malsburg/temp/mapserv02.png
>
> Everything is black&white.  The problem does only appear with
> outputformat set to png.
>
> Does anyone know how to solve this problem?
>
> Thanks,
>         Titus


--
____________________________

Berend Veldkamp - ARIS
http://www.aris.nl/
____________________________



More information about the mapserver-users mailing list