summary refs log tree commit diff
path: root/src/GFX/Image/RawImage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GFX/Image/RawImage.cpp')
-rw-r--r--src/GFX/Image/RawImage.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/GFX/Image/RawImage.cpp b/src/GFX/Image/RawImage.cpp
new file mode 100644
index 0000000..aca8fbc
--- /dev/null
+++ b/src/GFX/Image/RawImage.cpp
@@ -0,0 +1,29 @@
+#include "RawImage.hpp"
+
+namespace MC::GFX::Image {
+
+void RawImage::add(RawImage::Pixel pixel) {
+    m_pixels.push_back(pixel);
+}
+
+size_t RawImage::size() const {
+    return m_pixels.size();
+}
+
+uint8_t* RawImage::raw() const {
+    return (uint8_t*)m_pixels.data();
+}
+
+uint32_t RawImage::width() const {
+    return m_width;
+}
+
+uint32_t RawImage::height() const {
+    return m_height;
+}
+
+uint8_t RawImage::channels() const {
+    return m_channels;
+}
+
+}
\ No newline at end of file