Fix to scale, moving the +1's into the buffer allocation instead of calculation of new_width and new_height

pull/966/head
Isaac Connor 2015-07-24 13:30:58 -04:00
parent 02ee745167
commit 3e5f6c65d3
1 changed files with 3 additions and 3 deletions

View File

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