summaryrefslogtreecommitdiff
path: root/src/Fl_Shared_Image.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-08-09 01:09:49 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-08-09 01:09:49 +0000
commita6b935289ed59305318929b857bf74f671125e87 (patch)
tree20398a4cc1c49f2309b0b607e331aea2c433e17b /src/Fl_Shared_Image.cxx
parent27a54dc22bb9b2fbb16b01a04cd8479d25470bec (diff)
Move the rest of the image file formats (except for XBM and XPM) to
the fltk_images library; saves about 16k in the FLTK core library on my Intel system. Fix a memory leak bug in most of the fl_set_fonts*.cxx implementations; as a result, the Fl_Fontdesc structure now has a fontname member to old the human-readable font name. Lots of fixes for shadowed variables, etc. Use snprintf, strlcpy, and strlcat in more places. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Shared_Image.cxx')
-rw-r--r--src/Fl_Shared_Image.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index fabcc191f..b094c1f89 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Shared_Image.cxx,v 1.23.2.15 2002/07/14 21:25:39 easysw Exp $"
+// "$Id: Fl_Shared_Image.cxx,v 1.23.2.16 2002/08/09 01:09:49 easysw Exp $"
//
// Shared image code for the Fast Light Tool Kit (FLTK).
//
@@ -29,11 +29,6 @@
#include <FL/Fl.H>
#include <FL/Fl_Shared_Image.H>
-#include <FL/Fl_BMP_Image.H>
-#include <FL/Fl_GIF_Image.H>
-#include <FL/Fl_JPEG_Image.H>
-#include <FL/Fl_PNG_Image.H>
-#include <FL/Fl_PNM_Image.H>
#include <FL/Fl_XBM_Image.H>
#include <FL/Fl_XPM_Image.H>
@@ -234,14 +229,7 @@ Fl_Shared_Image::reload() {
}
// Load the image as appropriate...
- if (memcmp(header, "GIF87a", 6) == 0 ||
- memcmp(header, "GIF89a", 6) == 0)
- img = new Fl_GIF_Image(name_);
- else if (memcmp(header, "BM", 2) == 0) // BMP file
- img = new Fl_BMP_Image(name_);
- else if (header[0] == 'P' && header[1] >= '1' && header[1] <= '6') // Portable anymap
- img = new Fl_PNM_Image(name_);
- else if (memcmp(header, "#define", 7) == 0) // XBM file
+ if (memcmp(header, "#define", 7) == 0) // XBM file
img = new Fl_XBM_Image(name_);
else if (memcmp(header, "/* XPM */", 9) == 0) // XPM file
img = new Fl_XPM_Image(name_);
@@ -467,5 +455,5 @@ Fl_Shared_Image::remove_handler(Fl_Shared_Handler f) {
//
-// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.15 2002/07/14 21:25:39 easysw Exp $".
+// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.16 2002/08/09 01:09:49 easysw Exp $".
//