Update of /cvsroot/robotflow/RobotFlow/Vision/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22743
Modified Files:
Image.cc
Log Message:
Avoid printing warning messages
Index: Image.cc
===================================================================
RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/Image.cc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Image.cc 29 Mar 2005 15:20:47 -0000 1.17
--- Image.cc 4 May 2005 19:23:04 -0000 1.18
***************
*** 287,290 ****
--- 287,305 ----
}
+ METHODDEF(void)
+ output_message (j_common_ptr cinfo)
+ {
+ //cerr<<"output_message"<<endl;
+ }
+
+
+ /* Conditionally emit a trace or warning message */
+ METHODDEF (void)
+ emit_message (j_common_ptr cinfo, int msg_level) {
+
+ //cerr<<"emit_message level "<<msg_level<<endl;
+ //TODO DO something with warning messages
+ }
+
int Image::jpeg_compress(unsigned char* buffer, int max_size, int quality) {
***************
*** 292,297 ****
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
!
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
--- 307,313 ----
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
!
cinfo.err = jpeg_std_error(&jerr);
+
jpeg_create_compress(&cinfo);
***************
*** 395,399 ****
/* We set up the normal JPEG error routines, then override error_exit. */
! cinfo.err = jpeg_std_error(&jerr);
/* Now we can initialize the JPEG decompression object. */
--- 411,422 ----
/* We set up the normal JPEG error routines, then override error_exit. */
! jpeg_std_error(&jerr);
!
! //change the output message handler
! //jerr.output_message = output_message;
! jerr.emit_message = emit_message;
! //jerr.trace_level = -10;
! cinfo.err = &jerr;
!
/* Now we can initialize the JPEG decompression object. */
|