diff options
-rw-r--r-- | plugingui/image.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugingui/image.cc b/plugingui/image.cc index fd79707..f2dfb9c 100644 --- a/plugingui/image.cc +++ b/plugingui/image.cc @@ -76,10 +76,14 @@ void Image::setError(int err) void Image::load(const char* data, size_t size) { + unsigned int iw, ih; unsigned int res = lodepng_decode32((unsigned char**)&image_data, - &_width, &_height, + &iw, &ih, (const unsigned char*)data, size); + _width = iw; + _height = ih; + if(res != 0) { ERR(image, "[read_png_file] Error during init_io"); |