diff options
-rw-r--r-- | src/bitmap.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bitmap.cpp b/src/bitmap.cpp index 612f2af..a85cceb 100644 --- a/src/bitmap.cpp +++ b/src/bitmap.cpp @@ -3,13 +3,16 @@ #define STB_IMAGE_IMPLEMENTATION #include <stb/stb_image.h> +#include <iostream> + Bitmap::Bitmap(const char* image) { int width, height, bitDepth; uint8_t* buffer = stbi_load(image, &width, &height, &bitDepth, STBI_rgb_alpha); if (!buffer) { - return; + std::cerr << "Failed to read image from " << image << std::endl; + exit(1); } this->width = width; |