Merge pull request #933 from ZoneMinder/issue_932

roudn up when calculating buffer size for scaled image. Fixes #932
This commit is contained in:
Andrew Bauer 2015-07-15 09:45:10 -05:00
commit bf9f183552
1 changed files with 2 additions and 2 deletions

View File

@ -2596,8 +2596,8 @@ void Image::Scale( unsigned int factor )
return; return;
} }
unsigned int new_width = (width*factor)/ZM_SCALE_BASE; unsigned int new_width = (width*factor)/ZM_SCALE_BASE+1;
unsigned int new_height = (height*factor)/ZM_SCALE_BASE; unsigned int new_height = (height*factor)/ZM_SCALE_BASE+1;
size_t scale_buffer_size = new_width * new_height * colours; size_t scale_buffer_size = new_width * new_height * colours;