summary refs log tree commit diff
path: root/src/GFX/Image/RawImage.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GFX/Image/RawImage.hpp')
-rw-r--r--src/GFX/Image/RawImage.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/GFX/Image/RawImage.hpp b/src/GFX/Image/RawImage.hpp
index 2b10cb0..8a837e6 100644
--- a/src/GFX/Image/RawImage.hpp
+++ b/src/GFX/Image/RawImage.hpp
@@ -2,19 +2,23 @@
 
 #include <cstdint>
 #include <cstddef>
+#include <string>
 #include <vector>
+#include "../../Util/Sampler.hpp"
 
 namespace MC::GFX::Image {
 
 class RawImage {
 public:
-    RawImage() : m_pixels(), m_width(0), m_height(0), m_channels(0) {};
+    RawImage() : m_pixels(), m_width(0), m_height(0) {};
 
-    explicit RawImage(uint32_t width, uint32_t height, uint8_t channels)
-        : m_pixels(), m_width(width), m_height(height), m_channels(channels) {
+    RawImage(uint32_t width, uint32_t height)
+        : m_pixels(), m_width(width), m_height(height) {
         m_pixels.reserve(width * height);
     }
 
+    RawImage(Util::Sampler<2, float>& sampler, uint32_t width, uint32_t height);
+
     struct Pixel {
         uint8_t r, g, b;
     };
@@ -27,11 +31,13 @@ public:
     uint32_t width() const;
     uint32_t height() const;
     uint8_t channels() const;
+
+    std::string string() const;
 private:
     std::vector<Pixel> m_pixels;
 
     uint32_t m_width, m_height;
-    uint8_t m_channels;
+    uint8_t m_channels = 3;
 };
 
 }