I am trying to use the SRTM earth images to convert them into heightmaps for 3D application.
I can output a 8-bit PNG like this:
gdal_translate -ot Byte -scale -of PNG srtm_44_05.tif heightmap.png
Opening Photoshop/Paint.net confirms it's legit. However I want the extra precision of 16-bits...
If I try to output a 16-bit PNG however like this:
gdal_translate -ot Uint16 -scale -of PNG srtm_44_05.tif heightmap.png
It's just a black image when viewed in above applications. I am suspecting it has something to do with the byte ordering being wrong...?
For example if I output a RAW image like this
gdal_translate -ot Uint16 -scale -of ENVI srtm_44_05.tif heightmap.raw
And then open it in Photoshop and have it interpret it as 16-bit with one channel in MAC byte ordering then it looks fine. If I specify PC byte ordering it's just like the PNG (black image).
I have found a tedious workaround by using gal_translate to produce 16-bit RAW and then open it with Photoshop and export it as 16-bit PNG. That works but it shouldnt be necessary.
Is the byte ordering the problem? What can I do to produce legit 16-bit PNG images?