summaryrefslogtreecommitdiff
path: root/gfx/image.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-01-30 20:36:42 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-04 19:29:49 +0000
commitbde4a9f40bb4af39270a124d5ef9571a83305d0a (patch)
tree536719df20d8f18d4c40e893c2f93b4fa45fb2d5 /gfx/image.h
parentAdd some tests over collection (diff)
downloadilt-bde4a9f40bb4af39270a124d5ef9571a83305d0a.tar.bz2
ilt-bde4a9f40bb4af39270a124d5ef9571a83305d0a.tar.xz
ilt-bde4a9f40bb4af39270a124d5ef9571a83305d0a.zip
Restructure to allow a resource path and testing
Diffstat (limited to 'gfx/image.h')
-rw-r--r--gfx/image.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gfx/image.h b/gfx/image.h
new file mode 100644
index 0000000..d43737f
--- /dev/null
+++ b/gfx/image.h
@@ -0,0 +1,21 @@
+#ifndef IMAGE_H
+#define IMAGE_H
+
+#include <span> // IWYU pragma: export
+#include <special_members.hpp>
+#include <string>
+
+class Image {
+public:
+ Image(const char * fileName, int flags);
+ Image(const std::string & fileName, int flags) : Image(fileName.c_str(), flags) { }
+ ~Image();
+
+ NO_COPY(Image);
+ NO_MOVE(Image);
+
+ int width, height, numComponents;
+ std::span<unsigned char> data;
+};
+
+#endif