X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmJPEGFragment.cxx;h=02b7a071aacbe522f85899291ed3b3d86978ca1b;hb=0bcc188c6d5185375f809253e8b9b97c856d2eac;hp=8c82b1d88f5d1c072e94b9b533a5c64247f6b67c;hpb=7f62d92753e6a3e7f4f15093fb959dcb785d6c46;p=gdcm.git diff --git a/src/gdcmJPEGFragment.cxx b/src/gdcmJPEGFragment.cxx index 8c82b1d8..02b7a071 100644 --- a/src/gdcmJPEGFragment.cxx +++ b/src/gdcmJPEGFragment.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragment.cxx,v $ Language: C++ - Date: $Date: 2005/02/04 16:51:36 $ - Version: $Revision: 1.14 $ + Date: $Date: 2007/08/22 16:14:04 $ + Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,7 +19,7 @@ #include "gdcmJPEGFragment.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // For JPEG 2000, body in file gdcmJpeg2000.cxx @@ -67,11 +67,13 @@ void JPEGFragment::DecompressJPEGFramesFromFile(std::ifstream *fp, } else if ( nBits <= 12 ) { + assert( nBits >= 8 ); // JPEG Lossy : call to IJG 6b - 12 bits ReadJPEGFile12 ( fp, buffer, statesuspension); } else if ( nBits <= 16 ) { + assert( nBits >= 12 ); // JPEG Lossy : call to IJG 6b - 16 bits ReadJPEGFile16 ( fp, buffer, statesuspension); //gdcmAssertMacro( IsJPEGLossless ); @@ -99,7 +101,7 @@ void JPEGFragment::DecompressJPEGFramesFromFile(std::ifstream *fp, * @param os Stream to print to. * @param indent Indentation string to be prepended during printing. */ -void JPEGFragment::Print( std::ostream &os, std::string indent ) +void JPEGFragment::Print( std::ostream &os, std::string const &indent ) { os << indent << "JPEG fragment: offset : " << Offset