]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/bmploader.h
Split image loading into headers and pixels
[libs/gui.git] / source / graphics / bmploader.h
1 #ifndef MSP_GRAPHICS_BMPLOADER_H_
2 #define MSP_GRAPHICS_BMPLOADER_H_
3
4 #include <msp/graphics/imageloader.h>
5
6 namespace Msp {
7 namespace Graphics {
8
9 class BmpLoader: public ImageLoader
10 {
11 private:
12         IO::Base &io;
13         unsigned sig_bytes;
14         bool invert_row_order;
15
16 public:
17         BmpLoader(IO::Base &, unsigned = 0);
18
19         static unsigned get_signature_size() { return 2; }
20         static bool detect(const std::string &);
21
22         virtual void load_headers_(Image::Data &);
23         virtual void load_pixels_(Image::Data &);
24 };
25
26 } // namespace Graphics
27 } // namespace Msp
28
29 #endif