mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 13:55:38 +08:00
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
This commit is contained in:
+6
-6
@@ -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);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user