[Gdal-dev] problem converting to jpeg

Frank Warmerdam warmerdam at pobox.com
Wed May 28 10:08:43 EDT 2003


Tim Smith wrote:
> I am trying to convert a NITF file into a JPEG file.
> gdalinfo shows that the NITF has a
> colorInterp=palette.
> When I use gdal_translate (gdal_translate -of JPEG
> /path/file.nitf /path/file.jpeg), the created jpeg
> file has a colorInterp=Grey.  Is there a way to do
> this without the loss of color?

Tim,

JPEG does not support paletted output files, and gdal_translate does not
currently support converting 1 band paletted images into 3 band RGB images.
So currently gdal_translate cannot convert the file to JPEG in a useful way.
Do you really need it in JPEG?  It should convert easily to PNG, GeoTIFF, etc.

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