summaryrefslogtreecommitdiff
path: root/plugingui/image.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-10-31 20:24:28 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-10-31 20:24:28 +0100
commit6f16f0e910990d5c08d8586702c2118e555fa022 (patch)
tree93cd958f19ecc2ab4a2eaa3d7e09ae288c52f9d9 /plugingui/image.cc
parent92885fccf98a937c0bd976b462bc3621c5599edd (diff)
Fix 64 type problems with lodepng api.
Diffstat (limited to 'plugingui/image.cc')
-rw-r--r--plugingui/image.cc6
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");