Fixed with the reprojection so that it doesn't promote all source data to

RGBA, but only does this for RGB data.
This commit is contained in:
Robert Osfield
2005-06-13 20:03:26 +00:00
parent 80a99a2559
commit 486f5c1a30

View File

@@ -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,