aboutsummaryrefslogtreecommitdiff
path: root/include/Image.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Image.hpp')
-rw-r--r--include/Image.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/Image.hpp b/include/Image.hpp
new file mode 100644
index 0000000..19a5e8b
--- /dev/null
+++ b/include/Image.hpp
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "utils.hpp"
+#include "types.hpp"
+#include "Result.hpp"
+
+namespace amalgine
+{
+ class Image
+ {
+ DISABLE_COPY(Image)
+ public:
+ static Result<Image*> loadFromFile(const char *filepath);
+ ~Image();
+
+ const unsigned char* getData() const;
+ i32 getWidth() const;
+ i32 getHeight() const;
+ private:
+ Image(unsigned char *_imageData, i32 width, i32 height);
+ private:
+ unsigned char *imageData;
+ i32 width;
+ i32 height;
+ };
+}