<div dir="auto">Thanks for the trick Jeff, unfortunatelly i still get a 8-bits png and obviously uint16 is not a valid mapserver imagemode...<div dir="auto">Johannes</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 5 févr. 2020 à 16:52, Jeff McKenna <<a href="mailto:jmckenna@gatewaygeomatics.com">jmckenna@gatewaygeomatics.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Johannes,<br>
<br>
I just wanted to mention that what I always test OUTPUTFORMAT with is <br>
through the shp2img commandline utility, with the "-i" switch, such as:<br>
<br>
   shp2img -m test.map -o ttt.png -i PNG16 -all_debug 5<br>
<br>
PS. in the future MapServer v8.0 I hope to help change that utility name <br>
to "map2img", so it makes more sense.<br>
<br>
<br>
-jeff<br>
<br>
<br>
<br>
-- <br>
Jeff McKenna<br>
MapServer Consulting and Training Services<br>
<a href="https://gatewaygeomatics.com/" rel="noreferrer noreferrer" target="_blank">https://gatewaygeomatics.com/</a><br>
<br>
<br>
<br>
<br>
On 2020-02-05 6:02 a.m., Johannes Paul wrote:<br>
> Hello,<br>
> I'm using Mapserver to output PNG 16-bits DEM raster from .HGT elevation <br>
> data.<br>
> I'm using the below output format definition :<br>
> <br>
> |OUTPUTFORMAT NAME PNG16 DRIVER GDAL/PNG MIMETYPE image/png IMAGEMODE <br>
> INT16 EXTENSION "png" END|<br>
> <br>
> However I keep on getting the standard PNG 8-bits out of mapserver.<br>
> <br>
> The strange thing being that when I use a similar config to get GeoTiff <br>
> 16-bits, I do get what I'm asking for :<br>
> <br>
> OUTPUTFORMAT<br>
>    NAME GEOTIFF16<br>
>    DRIVER GDAL/GTiff<br>
>    MIMETYPE image/tiff<br>
>    IMAGEMODE INT16<br>
>    EXTENSION "tiff"<br>
> END<br>
> <br>
> <br>
> Could that be an issue with the GDAL/PNG driver ? It seems that the <br>
> GDAL/PNG driver supports only CreateCopy() and not Create(), where the <br>
> GDAL/GTiff driver supports both ... Could that be it ? I suspect the <br>
> GDAL/PNG driver so I also sent my issue to the GDAL mailing list.<br>
> <br>
> I can see from the mailing list that other users already had a similar <br>
> issue, but there is no obvious reason or solution provided.<br>
> <a href="https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html</a><br>
> <a href="https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html</a><br>
> <br>
> For information, I'm using GDAL v2.1.3 and Mapserver v7.0.1<br>
> Thanks,<br>
> Johannes<br>
> <br>
> <br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote></div>