X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmJpeg.cxx;h=76dfaa0724eb506f16304bd654cd162e0c9fd4d1;hb=46590a1960c6ff290e5a6404ca8a7c70cb9349bb;hp=b98a9acfb888613eb781968d4516197c2f3d5ad6;hpb=9ca0e4bb2208be93bebf21d0c5d75c8018e7605a;p=gdcm.git diff --git a/src/gdcmJpeg.cxx b/src/gdcmJpeg.cxx index b98a9acf..76dfaa07 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/06/24 10:55:59 $ - Version: $Revision: 1.49 $ + Date: $Date: 2006/01/27 10:01:34 $ + Version: $Revision: 1.55 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -39,6 +39,11 @@ #include #include + +#if defined(__BORLANDC__) + #include // for memset +#endif + #include "jdatasrc.cxx" #include "jdatadst.cxx" @@ -56,7 +61,7 @@ namespace gdcm * @return 1 on success, 0 on error */ -bool gdcm_write_JPEG_file (std::ofstream *fp, void *im_buf, +bool gdcm_write_JPEG_file (std::ostream *fp, void *im_buf, int image_width, int image_height, int quality) { @@ -107,7 +112,9 @@ bool gdcm_write_JPEG_file (std::ofstream *fp, void *im_buf, // exit(1); // // } - jpeg_stdio_dest(&cinfo, fp); + assert( 0 ); + (void)fp; + //jpeg_stdio_dest(&cinfo, fp, 0, 0, image_width, image_height, quality); /* Step 3: set parameters for compression */ @@ -205,13 +212,13 @@ METHODDEF(void) my_error_exit (j_common_ptr cinfo) { // (*cinfo->err->format_message) (cinfo, buffer); // // // Custom display message, we could be more fancy and throw an exception: -// gdcmErrorMacro( buffer ); +// gdcmStaticErrorMacro( buffer ); //} } //----------------------------------------------------------------------------- - /** +/** * \brief routine for JPEG decompression * @param fp pointer to an already open file descriptor * 8 significant bits per pixel