From 486f5c1a30ba5f7273c2532a2cac68fb41c3c557 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 13 Jun 2005 20:03:26 +0000 Subject: [PATCH] Fixed with the reprojection so that it doesn't promote all source data to RGBA, but only does this for RGB data. --- src/osgTerrain/DataSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgTerrain/DataSet.cpp b/src/osgTerrain/DataSet.cpp index 6cb4ed273..748cbf66b 100644 --- a/src/osgTerrain/DataSet.cpp +++ b/src/osgTerrain/DataSet.cpp @@ -1130,7 +1130,7 @@ DataSet::Source* DataSet::Source::doReproject(const std::string& filename, osg:: /* --------------------------------------------------------------------- */ int numSourceBands = GDALGetRasterCount(_sourceData->_gdalDataSet); - int numDestinationBands = 4; // numSourceBands; + int numDestinationBands = (numSourceBands >= 3) ? 4 : numSourceBands; // expand RGB to RGBA, but leave other formats unchanged GDALDatasetH hDstDS = GDALCreate( hDriver, filename.c_str(), nPixels, nLines, numDestinationBands , eDT,