]> Creatis software - gdcm.git/blobdiff - src/gdcmJpeg.cxx
Fix mistypings
[gdcm.git] / src / gdcmJpeg.cxx
index 9f869336912b8ea45c30ce506386a5eb48299007..f4e8862c31f16ac27785ec35bddd575664d0b73a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJpeg.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/07/13 08:17:21 $
-  Version:   $Revision: 1.57 $
+  Date:      $Date: 2007/08/30 17:37:16 $
+  Version:   $Revision: 1.59 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -65,7 +65,6 @@ bool gdcm_write_JPEG_file (std::ostream *fp, char *inputdata, size_t inputlength
                            int image_width, int image_height, int numZ,
                            int sample_pixel, int bitsallocated, int quality)
 {
-
   (void)bitsallocated;
   struct jpeg_compress_struct cinfo;
   int row_stride;            /* physical row width in image buffer */
@@ -102,7 +101,7 @@ bool gdcm_write_JPEG_file (std::ostream *fp, char *inputdata, size_t inputlength
   /* Step 2: specify data destination (eg, a file) */
   /* Note: steps 2 and 3 can be done in either order. */
 
-  int fragment_size = inputlength;
+  int fragment_size = static_cast< int >( inputlength );
   jpeg_stdio_dest(&cinfo, fp, fragment_size, 1);
 
   /* Step 3: set parameters for compression */
@@ -141,7 +140,7 @@ bool gdcm_write_JPEG_file (std::ostream *fp, char *inputdata, size_t inputlength
    * They only affect the compression ratio, not the image appearance,
    * which is lossless.
    */
-  jpeg_simple_lossless (&cinfo, 1, 1);
+  jpeg_simple_lossless (&cinfo, 1, 0);
   /* Now you can set any non-default parameters you wish to.
    * Here we just illustrate the use of quality (quantization table) scaling:
    */