1 #ifndef MSP_GRAPHICS_IMAGE_H_
2 #define MSP_GRAPHICS_IMAGE_H_
6 #include <msp/io/base.h>
7 #include "pixelformat.h"
12 class unsupported_image_format: public std::runtime_error
15 unsupported_image_format(const std::string &w): std::runtime_error(w) { }
16 virtual ~unsupported_image_format() throw() { }
19 class bad_image_data: public std::runtime_error
22 bad_image_data(const std::string &w): std::runtime_error(w) { }
23 virtual ~bad_image_data() throw() { }
39 void load_file(const std::string &);
40 void load_io(IO::Base &);
41 PixelFormat get_format() const;
42 unsigned get_width() const;
43 unsigned get_height() const;
44 const void *get_data() const;
47 } // namespace Graphics