1 #ifndef MSP_GRAPHICS_IMAGE_H_
2 #define MSP_GRAPHICS_IMAGE_H_
5 #include "pixelformat.h"
10 class unsupported_image_format: public std::runtime_error
13 unsupported_image_format(const std::string &w): std::runtime_error(w) { }
14 virtual ~unsupported_image_format() throw() { }
17 class bad_image_data: public std::runtime_error
20 bad_image_data(const std::string &w): std::runtime_error(w) { }
21 virtual ~bad_image_data() throw() { }
37 void load_file(const std::string &);
38 void load_memory(const void *, unsigned);
39 PixelFormat get_format() const;
40 unsigned get_width() const;
41 unsigned get_height() const;
42 const void *get_data() const;
45 } // namespace Graphics