Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to reduce the number of bands of a tif file from 3 to 1...

I used this command -n 256 fnp_braunschweig.tif fnp_bs.tif

and it increased the size from 31mb to 778mb

I actually want to decrease the size of the file.

can anyone tell me why this is happening?



share|improve this question
up vote 5 down vote accepted

The output Tiff is likely not using compression, hence the larger file size. Use the gdal_translate command, something along the lines of this:

gdal_translate -of GTiff -co "COMPRESS=DEFLATE" -b N fnp_braunschweig.tif fnp_bs.tif

where N is the band number you want to keep. The options for compression are NONE, LZW, PACKBITS, JPEG, CCITTRLE, CCITTFAX3, CCITTFAX4, DEFLATE.

share|improve this answer
Especially note the -co "COMPRESS=DEFLATE" and -co "PHOTOMETRIC=YCBCR" if appropriate. Use gdalinfo to determine what the compression settings of the original tiff were and use creation options from appropriately. – Howard Butler Feb 23 '12 at 14:05
thanks. how can I compress three bands into one? I don´t want to pick either red,green, or blue, I just want to compress them into one. – Robert Buckley Feb 23 '12 at 21:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.