X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmJpeg.cxx;h=f4e8862c31f16ac27785ec35bddd575664d0b73a;hb=90911e19738ddc59703bcc0adcc7b0e5346cf33e;hp=9f869336912b8ea45c30ce506386a5eb48299007;hpb=8b4006ce9e262e36f32ed56d877bc31de0a748a1;p=gdcm.git diff --git a/src/gdcmJpeg.cxx b/src/gdcmJpeg.cxx index 9f869336..f4e8862c 100644 --- a/src/gdcmJpeg.cxx +++ b/src/gdcmJpeg.cxx @@ -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: */