diff --git a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp index a06fd3376..9a3eeef79 100644 --- a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp +++ b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp @@ -131,13 +131,14 @@ unsigned short *rmap, unsigned short *gmap, unsigned short *bmap) static void -copy_row(unsigned char *ptr, unsigned char *data, int n) +copy_row(unsigned char *ptr, unsigned char *data, int n, int numSamples) { while (n--) { - *ptr++ = *data++; - *ptr++ = *data++; - *ptr++ = *data++; + for(int i=0;i