[Mapserver-users] PNG24 bit not working for me

woodbri at swoodbridge.com woodbri at swoodbridge.com
Fri Feb 21 09:16:09 EST 2003


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 W.


MAP
  #
  # Start of map file
  #
  NAME "DOQQ_Z18_Data"
  STATUS ON
  EXTENT 0 0 752905 4872672
  SIZE 200 200
  SHAPEPATH "/data/mdata/utm/"
  SYMBOLSET "/data/mdata/symbols/symbol-gif.sym"
  FONTSET "/data/mdata/symbols/fontset.txt"
  IMAGECOLOR 0 204 204
  UNITS METERS
#  IMAGETYPE GIF
  OUTPUTFORMAT
    NAME png24
    DRIVER "GD/PNG"
    IMAGEMODE RGB
#    IMAGEMODE PC256
  END
  #
  # Start of web interface definition
  #
  WEB
    MINSCALE 1000
    MAXSCALE 2000000000
    IMAGEPATH "/var/www/html/web2/tmp/"
    IMAGEURL "/web2/tmp/"
    HEADER "demo_header.html"
    FOOTER "demo_footer.html"
    TEMPLATE "demo.html"
  END
  #
  # Start of legend
  #
  LEGEND
    STATUS ON
    KEYSIZE 18 12
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 0 89
    END
  END
  #
  # Start of scalebar
  #
  SCALEBAR
    STATUS ON
    COLOR 0 0 0
    IMAGECOLOR 255 255 255
    UNITS MILES
    INTERVALS 5
    SIZE 200 2
    STYLE 1
    LABEL
      SIZE tiny
      COLOR 0 0 0
    END
  END
#------------------ polys --------------------------------
  LAYER
    NAME "Zone 18 DOQQ polys"
    STATUS ON
    DATA "z18"
    TYPE POLYGON
    MINSCALE 128001
    CLASS
      NAME "Zone 18 DOQQ polys"
      COLOR 0 255 0
      OUTLINECOLOR 128 128 128
    END
  END
#----------------------------------- DOQQs ------------------------
  LAYER
    NAME "Zone 18 DOQQ"
    STATUS ON
#    DATA "utm"
    TILEINDEX "z18"
    TILEITEM "Location"
    TYPE RASTER
    MAXSCALE 128000
  END
END




More information about the mapserver-users mailing list