[mapserver-users] Can't get 8-bit palette output
Lime, Steve D (DNR)
Steve.Lime at state.mn.us
Fri Jan 20 10:55:15 PST 2012
PNG/GD was dropped to simplify code maintenance, build processes and output format definition. There is a default
8-bit format option, use IMAGETYPE PNG8 (sorry for the typo in my message below).
Steve
From: Jan Hartmann [mailto:j.l.h.hartmann at uva.nl]
Sent: Thursday, January 19, 2012 2:25 PM
To: Lime, Steve D (DNR)
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Can't get 8-bit palette output
I see. Just for curiosity: why was png/gd dropped and wouldn't it be an idea to add an option to generate automatically a palette for png 8? Paletted output is still very useful for choropleth maps.
Jan
On 01/03/2012 04:05 PM, Lime, Steve D (DNR) wrote:
GD is for GIF only in 6.0+. To get paletted output you can set:
- IMAGETYPE GIF (GD-based)
- IMAGETYPE PNG (AGG 8-bit)
- Setup an output format with like Rich G. mentioned
- Setup an output format that forces use of a pre-defined palette
OUTPUTFORMAT
NAME png8
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
FORMATOPTION "INTERLACE=OFF"
FORMATOPTION "PALETTE_FORCE=TRUE"
FORMATOPTION "PALETTE=/usr/local/mapserver/apps/mr/compass/compass.palette"
END
Steve
From: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jan Hartmann
Sent: Monday, January 02, 2012 10:45 AM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] Can't get 8-bit palette output
Happy New Year, all.
I'm porting my applications from MapServer 5.7 to 6.0.1, and I am unable to get 8-bit palette output. The MapScript commands are:
$oMap->outputformat->set('driver','GD/PNG');
$oMap->outputformat->set('imagemode',MS_IMAGEMODE_PC256);
which give me the following warning, and no image:
Warning: mapObj::draw() [mapobj.draw<http://mapserver.sara.nl/calligo/zl/maps/k1832/mapobj.draw>]: [MapServer Error]: agg2CreateImage(): AGG2 driver only supports RGB or RGBA pixel models
I tried every combination I coud think of, with GIF and GDAL, and got always the same result. MapServer was compiled with gd-support:
MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
Any idea, someone?
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120120/42b93489/attachment.htm>
More information about the MapServer-users
mailing list