[gdal-dev] Convert false-color single band tiff to png

Paul Meems bontepaarden at gmail.com
Tue May 9 05:25:58 PDT 2017


I'm having trouble converting a false-color single band tiff to png.

Most of my tiff-files I can convert using GdalDem and a color table, this
works great.
But some tiff-files are pre-processed and I need to convert them as is.

This is the tiff:
[image: Inline afbeelding 1]

I tried with gdal_translate:
gdal_translate -of PNG my.tif my.png
But then I get a mostly white png. I also tried several other options.
The range of the tiff-file is from 1842 - 2636.
Does this mean I'm bound to use a color table file and use GdalDem or is
another solution possible?

The tiff-files are send to my from an outside source I have no control
about them.
I need the png-files because I'm showing the files in OpenLayers.

How can I do the conversion properly?

Thanks,

Paul Meems
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170509/e0bdd55c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 9511 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170509/e0bdd55c/attachment-0001.png>


More information about the gdal-dev mailing list