diff --git a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp index a6a0bf4aa..cb9a01d76 100644 --- a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp +++ b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp @@ -616,7 +616,11 @@ simage_tiff_load(std::istream& fin, } width_ret = width; height_ret = height; - numComponents_ret = samplesperpixel; + if (photometric == PHOTOMETRIC_PALETTE) + numComponents_ret = format; + else + numComponents_ret = samplesperpixel; + return buffer; }