<div dir="auto">Hello Jukka,<div dir="auto">Thanks for your reply, i've changed mimetype but i still get the 8-bits png...</div><div dir="auto">Johannes </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 5 févr. 2020 à 11:09, Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="FI" link="blue" vlink="purple">
<div class="m_3962449744668162186WordSection1">
<p class="MsoNormal"><span>Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I would make a test by using some other mimetype, like image/png16, for eliminating the possibility that some internal  png configuration drives over your own outputformat.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I don’t know if it helps but it is cheap to test.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span>-Jukka Rahkonen-<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><b>Lähettäjä:</b> mapserver-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users-bounces@lists.osgeo.org</a>>
<b>Puolesta </b>Johannes Paul<br>
<b>Lähetetty:</b> keskiviikko 5. helmikuuta 2020 12.03<br>
<b>Vastaanottaja:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users@lists.osgeo.org</a><br>
<b>Aihe:</b> [mapserver-users] OUTPUTFORMAT png 16-bits<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
</div>
<p class="MsoNormal">I'm using Mapserver to output PNG 16-bits DEM raster from .HGT elevation data.<u></u><u></u></p>
<div>
<p class="MsoNormal">I'm using the below output format definition :<u></u><u></u></p>
</div>
<div>
<pre><code>OUTPUTFORMAT<u></u><u></u></code></pre>
<pre><code>  NAME PNG16<u></u><u></u></code></pre>
<pre><code>  DRIVER GDAL/PNG<u></u><u></u></code></pre>
<pre><code>  MIMETYPE image/png<u></u><u></u></code></pre>
<pre><code>  IMAGEMODE INT16<u></u><u></u></code></pre>
<pre><code>  EXTENSION "png"<u></u><u></u></code></pre>
<pre><code>END</code><u></u><u></u></pre>
</div>
<div>
<p class="MsoNormal">However I keep on getting the standard PNG 8-bits out of mapserver.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The strange thing being that when I use a similar config to get GeoTiff 16-bits, I do get what I'm asking for :<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<table border="0" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt" id="m_3962449744668162186m_1815879508393632445gmail-m_289219062769950651gmail-LC23">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">OUTPUTFORMAT<br>
  NAME GEOTIFF16<br>
  DRIVER GDAL/GTiff<br>
  MIMETYPE image/tiff<br>
  IMAGEMODE INT16<br>
  EXTENSION "tiff"<br>
END</span><u></u><u></u></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="display:none"><u></u> <u></u></span></p>
<table border="0" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt" id="m_3962449744668162186m_1815879508393632445gmail-m_289219062769950651gmail-LC24">
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal">Could that be an issue with the GDAL/PNG driver ? It seems that the GDAL/PNG driver supports only CreateCopy() and not Create(), where the GDAL/GTiff driver supports both ... Could that be it ? I suspect the GDAL/PNG driver so I also sent
 my issue to the GDAL mailing list.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I can see from the mailing list that other users already had a similar issue, but there is no obvious reason or solution provided.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html" target="_blank" rel="noreferrer">https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html" target="_blank" rel="noreferrer">https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">For information, I'm using GDAL v2.1.3 and Mapserver v7.0.1<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Johannes<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>

</blockquote></div>