summaryrefslogtreecommitdiff
path: root/src/image.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.cc')
-rw-r--r--src/image.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/image.cc b/src/image.cc
index 110d56b3..54eb4710 100644
--- a/src/image.cc
+++ b/src/image.cc
@@ -132,7 +132,8 @@ void a_Image_set_parms(DilloImage *Image, void *v_imgbuf, DilloUrl *url,
{
_MSG("a_Image_set_parms: width=%d height=%d\n", width, height);
- OI(Image)->setBuffer((Imgbuf*)v_imgbuf);
+ bool resize = (Image->width != width || Image->height != height);
+ OI(Image)->setBuffer((Imgbuf*)v_imgbuf, resize);
if (!Image->BitVec)
Image->BitVec = a_Bitvec_new(height);