<br />Hello,<br /><br />I would like to batch-write some raster files from a project to one common folder using a script. This is my function:<br /><br />def writeRaster(rasterObj, pathToFile, cols, rows, rasterExtentObj, rasterCRSObj):<br />    provider = myRaster.dataProvider()<br />    pipe = QgsRasterPipe()<br />    pipe.set(provider.clone())<br />    file_writer = QgsRasterFileWriter(pathToFile)<br />    file_writer.writeRaster(pipe, cols, rows, rasterExtentObj, rasterCRSObj)<br /><br />(Its a slightly modified example I found at nullege.com.)<br /><br />For normal rasters this works just fine, but not for maps (scanned and georeferenced). The map colors are recoded to grey-values, as one could expect. Is there a way to keep the colors? From what I have seen, there is no parameter to handle this in a QgsRasterPipe().<br /><br />Also, I remember once I tried to create a virtual raster cataloge using these maps. That failed because the maps used different color palettes. I guess they should be in RGB to create the vrt cataloge, shouldn't they?<br /><br />Thanks for suggestions, Torsten<br /><br />