From 602f703df8f121da88c7923e4a08521d68d7b14a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 15 Jul 2015 10:22:57 -0400 Subject: [PATCH] roudn up when calculating buffer size for scaled image. Fixes #932 --- src/zm_image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 21e190ffb..8f91ab28b 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -2596,8 +2596,8 @@ void Image::Scale( unsigned int factor ) return; } - unsigned int new_width = (width*factor)/ZM_SCALE_BASE; - unsigned int new_height = (height*factor)/ZM_SCALE_BASE; + unsigned int new_width = (width*factor)/ZM_SCALE_BASE+1; + unsigned int new_height = (height*factor)/ZM_SCALE_BASE+1; size_t scale_buffer_size = new_width * new_height * colours;