]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/jpeg/jpegloader.h
Add native libjpeg loader
[libs/gui.git] / source / graphics / jpeg / jpegloader.h
diff --git a/source/graphics/jpeg/jpegloader.h b/source/graphics/jpeg/jpegloader.h
new file mode 100644 (file)
index 0000000..d45e599
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef MSP_GRAPHICS_JPEGLOADER_H_
+#define MSP_GRAPHICS_JPEGLOADER_H_
+
+#include <msp/graphics/imageloader.h>
+
+namespace Msp {
+namespace Graphics {
+
+class JpegLoader: public ImageLoader
+{
+private:
+       struct Private;
+
+       Private *priv;
+
+       static Register<JpegLoader> reg;
+
+public:
+       JpegLoader(IO::Seekable &);
+       virtual ~JpegLoader();
+
+       static unsigned get_signature_size() { return 3; }
+       static bool detect(const std::string &);
+
+       virtual void load(Image::Data &);
+};
+
+} // namespace Graphics
+} // namespace Msp
+
+#endif