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

Even Rouault even.rouault at spatialys.com
Tue May 9 05:28:31 PDT 2017


On mardi 9 mai 2017 14:25:58 CEST Paul Meems wrote:
> 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?

Look at the -scale switch of gdal_translate

> 
> 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


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170509/99131a44/attachment.html>


More information about the gdal-dev mailing list