[Gdal-dev] RVB JPEG
Frank Warmerdam
fwarmerdam at gmail.com
Tue Jul 19 09:18:38 EDT 2005
On 7/19/05, François Prunayre <fx.prunayre at oieau.fr> wrote:
>
> Hi list,
> When using gdal_translate to convert GeoTIFF to JPEG, I get Greyscale JPEG.
> How to get RVB JPEG instead ?
>
> gdal_translate -of JPEG -co WORLDFILE=ON tmp/F056606.TIF tmp/F056606.JPG
François,
Is the input TIFF file a greyscale single band image? If so, they
a greyscale output would seem appropriate.
If the input TIFF file is pseudocolored, then you would need to first
convert it to RGB format and then encode that to JPEG.
eg.
pct2rgb.py tmp/F056606.TIF tmp/very_temporary.tif
gdal_translate -of JPEG -co WORLDFILE=ON \
tmp/very_temporary.tif tmp/F056606.JPG
rm tmp/very_temporary.tif
If this doesn't cover your situation, perhaps you could provide a
gdalinfo report on the input file.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list