--- /dev/null
+#ifndef MSP_GRAPHICS_IMAGELOADER_H_
+#define MSP_GRAPHICS_IMAGELOADER_H_
+
+#include "image.h"
+
+namespace Msp {
+namespace Graphics {
+
+class unsupported_image_format: public std::runtime_error
+{
+public:
+ unsupported_image_format(const std::string &w): std::runtime_error(w) { }
+ virtual ~unsupported_image_format() throw() { }
+};
+
+class bad_image_data: public std::runtime_error
+{
+public:
+ bad_image_data(const std::string &w): std::runtime_error(w) { }
+ virtual ~bad_image_data() throw() { }
+};
+
+
+class ImageLoader
+{
+private:
+ IO::Base *source;
+protected:
+
+ ImageLoader();
+public:
+ virtual ~ImageLoader();
+
+ static ImageLoader *open_file(const std::string &);
+ static ImageLoader *open_io(IO::Base &);
+
+ virtual void load(Image::Data &) = 0;
+};
+
+} // namespace Graphics
+} // namespace Msp
+
+#endif