Fix square image resize

Fixes #37980

(cherry picked from commit d45e8734d1)
This commit is contained in:
Vasiliy Makarov 2020-04-18 13:29:01 +03:00 committed by Rémi Verschelde
parent 469f398e70
commit 982dee67f0
1 changed files with 3 additions and 0 deletions

View File

@ -869,6 +869,9 @@ void Image::resize_to_po2(bool p_square) {
int w = next_power_of_2(width);
int h = next_power_of_2(height);
if (p_square) {
w = h = MAX(w, h);
}
if (w == width && h == height) {