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've loaded a GeoTiff in QGIS (Single Band), and applied a Color Mapping. I can view it in the map canvas, but I would like to export the entire mapped GeoTiff as an appropriate 3 Band GeoTiff (i.e to R,G,B values 0-255).

I know that you can export the current view -- but this is too low-resolution, and I would like to retain the current resolution.

Is there a hook in the Python QGIS module that might enable?

share|improve this question

Raster -> Conversion -> PCT to RGB.

Alternatively, right-click on the colour rendered image and go "Save As". Tick the "Rendered image" radio button.


share|improve this answer
Thanks -- my data in RasterBand1 is not scaled (i.e. values greater than 256), so I get this error on Raster -> Conversion -> PCT to RGB: Traceback (most recent call last): File "/usr/local/bin/", line 167, in dst_data = Numeric.take(band_lookup,src_data) File "/Library/Python/2.7/site-packages/numpy-1.8.0.dev_9597b1f_20120920-py2.7-macosx‌​-10.8-x86_64.egg/numpy/core/", line 104, in take return take(indices, axis, out, mode) IndexError: index 80000 is out of bounds for size 256 When using QGIS Colormap - how does it render the image? – Chipp Dec 7 '12 at 17:04
Oh, how annoying. Have you tried the second method above? I'm using QGIS Master (1.9) here, not sure if this option is available in 1.8. I think you'll get RGB if you use the "Save as" method. N. – nhopton Dec 7 '12 at 17:17

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.