From e0d630ed72f354916efec1e620adf6f276b40564 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 27 Sep 2021 19:21:21 +0200 Subject: Add error checking and improve constructor of Fl_BMP_Image - use new features of Fl_Image_Reader (read error and EOF checks) - add length argument to constructor reading from memory --- FL/Fl_BMP_Image.H | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'FL') diff --git a/FL/Fl_BMP_Image.H b/FL/Fl_BMP_Image.H index c779d6525..63dd301df 100644 --- a/FL/Fl_BMP_Image.H +++ b/FL/Fl_BMP_Image.H @@ -1,7 +1,7 @@ // // BMP image header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2020 by Bill Spitzak and others. +// Copyright 1998-2021 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -27,14 +27,14 @@ */ class FL_EXPORT Fl_BMP_Image : public Fl_RGB_Image { - public: +public: - Fl_BMP_Image(const char* filename); - Fl_BMP_Image(const char* imagename, const unsigned char *data); + Fl_BMP_Image(const char* filename); + Fl_BMP_Image(const char* imagename, const unsigned char *data, const long length = -1); - protected: +protected: - void load_bmp_(class Fl_Image_Reader &rdr); + void load_bmp_(class Fl_Image_Reader &rdr); }; -- cgit v1.2.3