From d8ec7aa67d431a4f3abc5b2adc30763fca279e16 Mon Sep 17 00:00:00 2001 From: Yann Le Poul Date: Tue, 9 Oct 2018 19:21:37 +0200 Subject: [PATCH] BUG: unnecessary call to GetExpandRGBPalette It is needed to check if the image is actually read as palette or not, not if the user asked for it Change-Id: Idd996005c8ac18739025a485697fb8c56cd8cdab --- Modules/IO/TIFF/src/itkTIFFImageIO.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx index 1dcc125fe2d..43ceb644341 100644 --- a/Modules/IO/TIFF/src/itkTIFFImageIO.cxx +++ b/Modules/IO/TIFF/src/itkTIFFImageIO.cxx @@ -138,7 +138,6 @@ unsigned int TIFFImageIO::GetFormat() m_ImageFormat = TIFFImageIO::PALETTE_RGB; return m_ImageFormat; } - } } m_ImageFormat = TIFFImageIO::OTHER; @@ -1311,7 +1310,7 @@ void TIFFImageIO::ReadGenericImage(void *_out, } break; case TIFFImageIO::PALETTE_RGB: - if ( this->GetExpandRGBPalette() || (!this->GetIsReadAsScalarPlusPalette()) ) + if ( !this->GetIsReadAsScalarPlusPalette() ) { switch ( m_InternalImage->m_BitsPerSample ) {