Hi, Try with something like this and then using &format=image/png in WMS GetMap should produce 8-bit png.
OUTPUTFORMAT NAME "png8" DRIVER AGG/PNG8 MIMETYPE "image/png" IMAGEMODE RGB EXTENSION "png" FORMATOPTION "QUANTIZE_FORCE=on" FORMATOPTION "QUANTIZE_COLORS=256" FORMATOPTION "GAMMA=0.75" END -Jukka Rahkonen- ________________________________ Lähettäjä: Jan Hartmann [j.l.h.hartm...@uva.nl] Lähetetty: 12. maaliskuuta 2012 17:08 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] Fwd: Constraining WMS output type "wms-getmap_formatlist" works, but if I specify "image/jpeg,image/png; mode=8bit,image/gif", qgis doesn't offer png as an output format anymore. It just doen't know 8-bits png. I saw they are working on it: https://github.com/qgis/Quantum-GIS/commit/3a2c0e9872270fbd62d6bfcd9149d9d2a16c09cf So, it's a qgis problem. The metadata item is nice to know, though. Thanks, Jan On 03/12/2012 03:03 PM, Rahkonen Jukka wrote: Hi, I would have a try by defining a 8-bit png outputformat for img/png MIME type and using wms_getmap_formatlist in the metadata. How have you defined the png8 now in your mapfile? -Jukka Rahkonen- ________________________________ Jan Hartmann wrote: Hi all, Is there a way to restrict the output types Mapserver offers as a WMS service, e.g. only png 8-bits? In QGIS, when I choose "png" as output for a WMS layer, I always get back png24 rasters, even if I explicitly specify png8 as outputtype in the mapfile. Not sure if this would be according to the WMS specs, though. Jan _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users