[FWTools] Converting a HGT file to a 16bit .png fills image with black.

Matt Wilkie matt.wilkie at gov.yk.ca
Tue Jan 27 15:01:16 EST 2009

 > If I use "gdal_translate -ot Int16 -of PNG infile.hgt outfile.png" I get
 > an 8 bit grayscale image. If I use "gdal_translate -ot UInt16 -of PNG
 > infile.hgt outfile.png " I get a 16 bit grayscale image but now it is
 > pure black. Any ideas?

With the latter case is it pure black or just really dark? Bring the 
image into a photo program (gimp, photoshop) and use Auto-levels (don't 
save though or it will alter the values).

For the former, I don't have any problem creating int16 .png from a 
geotiff elevation file. Perhaps that's because the source is int16 though.


matt wilkie
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax

Jon Jones wrote:
> -- 
> Jon Jones
> ------------------------------------------------------------------------
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/

More information about the FWTools mailing list