X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmJpeg.cxx;h=3d11de65781c9b6cf9218726d320e50da6f18f3b;hb=8d704be3e460a26db22f2d41dbaf02811bc71a45;hp=7cce70bf59048f6de789eaefc3538f6aab3bfb33;hpb=aefaa124e28c1fe8e6927b1e8a3959895c9eedf2;p=gdcm.git diff --git a/src/gdcmJpeg.cxx b/src/gdcmJpeg.cxx index 7cce70bf..3d11de65 100644 --- a/src/gdcmJpeg.cxx +++ b/src/gdcmJpeg.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJpeg.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 15:15:26 $ - Version: $Revision: 1.46 $ + Date: $Date: 2005/02/11 20:04:08 $ + Version: $Revision: 1.48 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -259,7 +259,7 @@ bool JPEGFragment::ReadJPEGFile (std::ifstream *fp, void *image_buffer, int &sta jerr.pub.error_exit = my_error_exit; // for any output message call my_output_message //jerr.pub.output_message = my_output_message; - + // Establish the setjmp return context for my_error_exit to use. if (setjmp(jerr.setjmp_buffer)) { @@ -289,7 +289,7 @@ bool JPEGFragment::ReadJPEGFile (std::ifstream *fp, void *image_buffer, int &sta // Suspension in jpeg_read_header statesuspension = 2; } - + // Step 4: set parameters for decompression // prevent the library from performing any color space conversion if( cinfo.process == JPROC_LOSSLESS ) @@ -337,7 +337,7 @@ bool JPEGFragment::ReadJPEGFile (std::ifstream *fp, void *image_buffer, int &sta return true; } // The ijg has no notion of big endian, therefore always swap the jpeg stream -#if defined(GDCM_WORDS_BIGENDIAN) && (CMAKE_BITS_IN_JSAMPLE != 8) +#if (defined(GDCM_WORDS_BIGENDIAN) || defined(GDCM_FORCE_BIGENDIAN_EMULATION)) && (CMAKE_BITS_IN_JSAMPLE != 8) uint16_t *buffer16 = (uint16_t*)*buffer; uint16_t *pimage16 = (uint16_t*)pImage; for(unsigned int i=0;i