[gdal-dev] Urgent :: gdal_translate Solution

Mateusz Loskot mateusz at loskot.net
Mon Mar 31 07:54:37 EDT 2008


SriRam Prasad Bhasker wrote:
> Hi.
>
> Whenever i use Gdal_Translate with the below Syntax the Monochrome 1 BIT
> image is getting converted tgo 8 BIT Image.
>
> Is there any Way to ensure the BPP values [Bits per Pixel] value remain
> the same even after translation.

Yes. Please, check the manual at

http://gdal.org/frmt_gtiff.html

and read about NBITS

> gdal_translate -of gtiff -co Compress=LZW input.tif output.tif

gdal_translate -of gtiff -co Compress=LZW -co "NBITS=1" input.tif output.tif


p.s. Using "urgent" in the subject is unnecessary

Greetings
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the gdal-dev mailing list