Merge pull request #933 from ZoneMinder/issue_932
roudn up when calculating buffer size for scaled image. Fixes #932
This commit is contained in:
commit
bf9f183552
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue