[Gdal-dev] gdal_translate: loses colour from GeoTIF to JPEG

Leibold, David leibold at lsec.dnd.ca
Tue Jul 26 16:20:58 EDT 2005


I have a GeoTiff file (*.tif) which seems to be in order (colours seem to be OK, as is georeferencing when viewed on Tatuk viewer, or presumably other geo viewers).

But when I converting TIF to JPEG:

gdal_translate -of JPEG -co "WORLDFILE=YES" geo.tif geo2.jpg

... the geo2.jpg comes out all greyscale. It does open OK in Tatuk viewer with georeferencing (after renaming the world file extension from .wld to .jfw), apart from the black & white TV look.

The GeoTiff file seems to have only one colour band, after running gdalinfo on it. The single band means -b 2, -b 3 flags wont' work.

Any way to bring colour from Tif to JPG?

Thanks.


David Leibold
Junior Systems Analyst / TL (C)
Land Software Engineering Centre

Tel: 613-995-8870
Email: leibold at lsec.dnd.ca





More information about the Gdal-dev mailing list