From Ralf Kern, "the attached color mapped TIFF file klink1_l.tif is incorrectly read as

GL_LUMINANCE data instead of GL_RGB data. You can easily check with
"osgViewer --image klink1_l.tif".

The bug is in ReaderWriterTIFF.cpp function simage_tiff_load, where
numComponents_ret is incorrectly set to 1 instead of 3 for color mapped
data."
This commit is contained in:
Robert Osfield
2007-09-03 10:12:26 +00:00
parent 07e94c8ce0
commit de19fb3737

View File

@@ -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;
}