diff options
author | Aaron M. Ucko <ucko@debian.org> | 2005-04-05 19:42:39 +0000 |
---|---|---|
committer | Aaron M. Ucko <ucko@debian.org> | 2005-04-05 19:42:39 +0000 |
commit | 2fb75f144b320c4d82fb20b2ca8c11dee0ae443d (patch) | |
tree | 079deee51dc44779fd7b40e971c965751e635dcf /src/Fl_JPEG_Image.cxx | |
parent | 4479f759301fae81a4bd58bd12550861e504a930 (diff) |
Load fltk-1.1.5rc1 into branches/upstream/current.
Diffstat (limited to 'src/Fl_JPEG_Image.cxx')
-rw-r--r-- | src/Fl_JPEG_Image.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx index 2898288..c8fa0a9 100644 --- a/src/Fl_JPEG_Image.cxx +++ b/src/Fl_JPEG_Image.cxx @@ -1,9 +1,9 @@ // -// "$Id: Fl_JPEG_Image.cxx,v 1.1.2.7 2003/01/30 21:42:02 easysw Exp $" +// "$Id: Fl_JPEG_Image.cxx,v 1.1.2.10 2004/04/11 04:38:57 easysw Exp $" // // Fl_JPEG_Image routines. // -// Copyright 1997-2003 by Easy Software Products. +// Copyright 1997-2004 by Easy Software Products. // Image support donated by Matthias Melcher, Copyright 2000. // // This library is free software; you can redistribute it and/or @@ -56,6 +56,19 @@ extern "C" // +// Error handler for JPEG files... +// + +#ifdef HAVE_LIBJPEG +static void +jpeg_error_handler(j_common_ptr) +{ + return; +} +#endif // HAVE_LIBJPEG + + +// // 'Fl_JPEG_Image::Fl_JPEG_Image()' - Load a JPEG image file. // @@ -71,6 +84,8 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load if ((fp = fopen(jpeg, "rb")) == NULL) return; cinfo.err = jpeg_std_error(&jerr); + jerr.error_exit = jpeg_error_handler; + jpeg_create_decompress(&cinfo); jpeg_stdio_src(&cinfo, fp); jpeg_read_header(&cinfo, 1); @@ -107,5 +122,5 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load } // -// End of "$Id: Fl_JPEG_Image.cxx,v 1.1.2.7 2003/01/30 21:42:02 easysw Exp $". +// End of "$Id: Fl_JPEG_Image.cxx,v 1.1.2.10 2004/04/11 04:38:57 easysw Exp $". // |