Fix to scale, moving the +1's into the buffer allocation instead of calculation of new_width and new_height
parent
02ee745167
commit
3e5f6c65d3
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue