X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmJpeg12.cxx;h=1b8ae574319582c2358ddd0c6b2943e9babb64ff;hb=3370a8090c600a3d4dbe5573a62d1dddb59819f2;hp=fe30bbb9f1218edb89ea98d72bf0d055a534e541;hpb=9f274230cc36f77f784729031fbe3e7d576f13ea;p=gdcm.git diff --git a/src/gdcmJpeg12.cxx b/src/gdcmJpeg12.cxx index fe30bbb9..1b8ae574 100644 --- a/src/gdcmJpeg12.cxx +++ b/src/gdcmJpeg12.cxx @@ -1,13 +1,22 @@ -// gdcmJpeg12.cxx -//----------------------------------------------------------------------------- -#include -#include "gdcmFile.h" - -#define BITS_IN_JSAMPLE 12 +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmJpeg12.cxx,v $ + Language: C++ + Date: $Date: 2004/10/08 17:24:54 $ + Version: $Revision: 1.18 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ -#ifdef GDCM_DEBUG -#define GDCM_jpr_DEBUG 0 -#endif //GDCM_DEBUG +#include "gdcmFile.h" /* * is used for the optional error recovery mechanism shown in @@ -23,6 +32,7 @@ */ extern "C" { +//#include #include "src/jpeg/libijg12/jconfig.h" #include "src/jpeg/libijg12/jpeglib.h" //#include "jconfig12.h" @@ -97,7 +107,8 @@ typedef struct my_error_mgr * my_error_ptr; /* * Here's the routine that will replace the standard error_exit method: */ -METHODDEF(void) my_error_exit (j_common_ptr cinfo) { +METHODDEF(void) my_error_exit (j_common_ptr cinfo) +{ /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ my_error_ptr myerr = (my_error_ptr) cinfo->err; @@ -125,7 +136,8 @@ METHODDEF(void) my_error_exit (j_common_ptr cinfo) { * @return 1 on success, 0 on error */ -bool gdcmFile::gdcm_read_JPEG_file12 (FILE* fp,void* image_buffer) { +bool gdcmFile::gdcm_read_JPEG_file12 (FILE* fp,void* image_buffer) +{ char *pimage; /* This struct contains the JPEG decompression parameters and pointers to @@ -330,7 +342,7 @@ bool gdcmFile::gdcm_read_JPEG_file12 (FILE* fp,void* image_buffer) { /* And we're done! */ - return(true); + return true; } /*