From 2252e9e851814e8799bfbda5a1700ef7b7bb4273 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 24 Oct 2004 14:19:27 +0000 Subject: [PATCH] From Eric Sokolowsky, support for 2 channel tiff images --- src/osgPlugins/tiff/ReaderWriterTIFF.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp index 9a3eeef79..435bdafb9 100644 --- a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp +++ b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp @@ -230,7 +230,10 @@ int *numComponents_ret) if (TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel) == 1) { - if (samplesperpixel != 1 && samplesperpixel != 3 && samplesperpixel != 4) + if (samplesperpixel != 1 && + samplesperpixel != 2 && + samplesperpixel != 3 && + samplesperpixel != 4) { /* Bad samples/pixel */ tifferror = ERR_UNSUPPORTED;