diff --git a/Code/IO/otbImageFileReader.txx b/Code/IO/otbImageFileReader.txx index 2095a15cf30f64898973fc2170c521c5fe29f938..c8b85367671b72f0f1791e4bce3e1bc98263b219 100755 --- a/Code/IO/otbImageFileReader.txx +++ b/Code/IO/otbImageFileReader.txx @@ -174,7 +174,7 @@ ImageFileReader<TOutputImage> // PB : the GetComponentSize() method of the itkImageIOBase class is protected. // duplicated this method in this class (very BAD) - std::streamoff nbBytes = static_cast<std::streamoff>(this->GetComponentSize())*static_cast<std::streamoff>(region.GetNumberOfPixels())*static_cast<std::streamoff>(this->GetNumberOfComponentsPerPixel()); + std::streamoff nbBytes = static_cast<std::streamoff>(this->GetComponentSize())*static_cast<std::streamoff>(region.GetNumberOfPixels())*static_cast<std::streamoff>(m_ImagfeIO->GetNumberOfComponents()); otbMsgDevMacro(<<"NbBytes "<<nbBytes); otbMsgDevMacro(<< "Buffer conversion required from: "