]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/png/pngloader.h
Make the image loading code more modular
[libs/gui.git] / source / graphics / png / pngloader.h
diff --git a/source/graphics/png/pngloader.h b/source/graphics/png/pngloader.h
new file mode 100644 (file)
index 0000000..0bb5fd7
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef MSP_GRAPHICS_PNGLOADER_H_
+#define MSP_GRAPHICS_PNGLOADER_H_
+
+#include <msp/graphics/imageloader.h>
+
+namespace Msp {
+namespace Graphics {
+
+class PngLoader: public ImageLoader
+{
+private:
+       struct Private;
+
+       Private *priv;
+
+public:
+       PngLoader(IO::Base &, const std::string &);
+       virtual ~PngLoader();
+
+       static bool detect(const std::string &);
+
+       virtual void load(Image::Data &);
+};
+
+} // namespace Graphics
+} // namespace Msp
+
+#endif