summary refs log tree commit diff
path: root/src/GFX/Image/RawImage.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-10-24 00:40:08 +0200
committerMel <einebeere@gmail.com>2022-10-24 00:40:08 +0200
commitdc2af6a6fb7ae3cf1b9f917058889329d4652491 (patch)
tree49030d19e9e403336be0de048681b4bbd921218d /src/GFX/Image/RawImage.hpp
parentad84d0686f1d7f72e86b55cdadd8272f225f776d (diff)
downloadmeowcraft-dc2af6a6fb7ae3cf1b9f917058889329d4652491.tar.zst
meowcraft-dc2af6a6fb7ae3cf1b9f917058889329d4652491.zip
Image viewer utility
Diffstat (limited to 'src/GFX/Image/RawImage.hpp')
-rw-r--r--src/GFX/Image/RawImage.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GFX/Image/RawImage.hpp b/src/GFX/Image/RawImage.hpp
index 916671b..2b10cb0 100644
--- a/src/GFX/Image/RawImage.hpp
+++ b/src/GFX/Image/RawImage.hpp
@@ -10,9 +10,9 @@ class RawImage {
 public:
     RawImage() : m_pixels(), m_width(0), m_height(0), m_channels(0) {};
 
-    explicit RawImage(size_t pixel_count, uint32_t width, uint32_t height, uint8_t channels)
+    explicit RawImage(uint32_t width, uint32_t height, uint8_t channels)
         : m_pixels(), m_width(width), m_height(height), m_channels(channels) {
-        m_pixels.reserve(pixel_count);
+        m_pixels.reserve(width * height);
     }
 
     struct Pixel {