diff options
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/image.cc | 5 | ||||
-rw-r--r-- | plugingui/image.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/plugingui/image.cc b/plugingui/image.cc index 666170d..ea295b9 100644 --- a/plugingui/image.cc +++ b/plugingui/image.cc @@ -45,6 +45,7 @@ Image::Image(const char* data, size_t size) } Image::Image(const std::string& filename) + : filename(filename) { Resource rc(filename); load(rc.data(), rc.size()); @@ -54,6 +55,7 @@ Image::Image(Image&& other) : _width(other._width) , _height(other._height) , image_data(std::move(other.image_data)) + , filename(other.filename) { other._width = 0; other._height = 0; @@ -118,7 +120,8 @@ void Image::load(const char* data, size_t size) if(res != 0) { - ERR(image, "Error in lodepng_decode32: %d", res); + ERR(image, "Error in lodepng_decode32: %d while loading '%s'", + res, filename.c_str()); setError(); return; } diff --git a/plugingui/image.h b/plugingui/image.h index ae0e051..e70215e 100644 --- a/plugingui/image.h +++ b/plugingui/image.h @@ -60,6 +60,7 @@ private: std::size_t _height{0}; std::vector<Colour> image_data; Colour out_of_range{0.0f, 0.0f, 0.0f, 0.0f}; + std::string filename; }; } // GUI:: |