[Mapserver-users] PNG24 bit not working for me

Frank Warmerdam warmerdam at pobox.com
Fri Feb 21 09:38:53 EST 2003


woodbri at swoodbridge.com wrote:
> This is probably my bad, but I dont see the problem. I'm using a CGI query to
> /cgi-bin/mapserv on RH8/Appache2/PHP-4.3.1 and mapserver built as:
> 
> MapScript Version ($Revision: 1.129 $ $Date: 2002/12/17 22:52:53 $) MapServer
> version 3.7 (development) OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> 
> The request gets and returns the geoTIFF raster data and returns a png file,
> but it is an 8-bit png not a 24-bit png. The geotiff data is 3 band color
> image (ie: 24-bits).
> 
> Does this mapfile look right? Is there a magic mapserver configure option I
> missed?
> 
> built with gd-2.0.11 (gif patched), gdal-1.1.8, ogr, wms, wfs, ming. gdal was
> built with the system png not the internal png.

Steve,

I believe that the IMAGETYPE defaults to the first one defined when not
given explicitly, and there are a bunch of "implicitly" defined OUTPUTFORMATs
that kick in first.  So, I would suggest you add an IMAGETYPE png24 line
in your mapfile.

If you find this sufficiently annoying you could file a bug report/enhancement
request to default to using the first _user defined_ OUTPUTFORMAT instead of
just the first one in the internal list when an IMAGETYPE is not given.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the mapserver-users mailing list