6

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?

1 Answer 1

4

Raster -> Conversion -> PCT to RGB.

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

N.

2
  • 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/pct2rgb.py", 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/fromnumeric.py", 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
    Commented Dec 7, 2012 at 17:04
  • 1
    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
    Commented Dec 7, 2012 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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