[gdal-dev] gdal_translate -scale with PNG

Marius Jigmond mariusjigmond at hotmail.com
Wed Jul 27 22:16:51 EDT 2011


On 07/27/2011 04:16 PM, Stephen Mather wrote:
> Hi All,
>      I'm using gdal_translate (version 1.6.3 on Ubuntu) with a scale 
> factor to stretch float values to 16-bit integer values.  It works 
> fine with tif output, but with PNG it stretches the values to 8-bit:
>
> gdal_translate -of PNG -scale 0 1550 0 65535 N2140615.txt N2140615.png

Try gdal_translate -of PNG -ot UInt16 -scale 0 1550 0 65535 N2140615.txt 
N2140615.png

>
> Is this a known issue and/or has it been fixed with more recent 
> versions?  I know I had trouble with this with an MS4W release as well.
>
> Thanks,
> Steve
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110727/196a5ffa/attachment.html


More information about the gdal-dev mailing list