[mapserver-users] FORMATOPTION "PALETTE_FORCE=TRUE" problem

thomas bonfort thomas.bonfort at gmail.com
Tue Jan 6 10:14:48 EST 2009


are you calling this with a transparent=true ??
in that cas, your palette file should be a list of quadruplets
(r,g,b,a) (and it would be better to have an outputformat with
imagemode rgba, and use that one instead of passing transparent=true)

thomas

On Tue, Jan 6, 2009 at 15:56, paalkr <pal.kristensen at statkart.no> wrote:
>
> Hi!
>
> I have tried to use the FORMATOPTION "PALETTE_FORCE=TRUE" with no luck. I've
> goth this error message all the time:
>
> [Tue Jan  6 15:26:05 2009].409786 msDrawMap(): Layer 3 (N500Hoydelag),
> 0.161s
> [Tue Jan  6 15:26:05 2009].409998 msDrawMap(): Drawing Label Cache, 0.000s
> [Tue Jan  6 15:26:05 2009].410010 msDrawMap() total time: 0.170s
> [Tue Jan  6 15:26:05 2009].416062 Invalid number of colors in palette:
> Unable to access file. libpng error ()
> [Tue Jan  6 15:26:05 2009].416108 ms_png_write_image_init(): General error
> message. error writing png header (via longjmp)
> [Tue Jan  6 15:26:05 2009].416115 msSaveImageRGBAPalette(): General error
> message. error in png header writing
> [Tue Jan  6 15:26:05 2009].416122 msSaveImage() total time: 0.006s
> [Tue Jan  6 15:26:05 2009].416170 mapserv request processing time (msLoadMap
> not incl.): 0.177s
>
> My ouputformat is defined like this:
>
>   OUTPUTFORMAT
>      NAME "png8bit"
>      DRIVER "AGG/PNG"
>      MIMETYPE "image/png"
>      EXTENSION "png"
>      FORMATOPTION "PALETTE_FORCE=TRUE"
>      FORMATOPTION "PALETTE=/opt/maps/kartdata2/mapfiles/palette.txt"
>      FORMATOPTION INTERLACE=OFF
>   END
>
> The palette.txt file is attached
> http://n2.nabble.com/file/n2117781/palette.txt palette.txt
>
> Does anyone know whats wrong?
> BTW: This is MapServer 5.2.1 on RedHat.
>
> Regards,
> Pål Kristensen
> --
> View this message in context: http://n2.nabble.com/FORMATOPTION-%22PALETTE_FORCE%3DTRUE%22-problem-tp2117781p2117781.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> 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