From f66599e00c35724edbf304ef7f8d56be7e3551d0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 11 May 2004 20:44:31 +0000 Subject: [PATCH] From Eric Sokolosky, with further additions from Robert, added support for RGBA TIFF files --- src/osgPlugins/tiff/ReaderWriterTIFF.cpp | 45 +++++++++++++----------- 1 file changed, 25 insertions(+), 20 deletions(-) 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