Fixed image resizing with un-specified dimension

This commit is contained in:
nathan 2017-09-17 17:41:15 +02:00
parent ebf5a7981f
commit 0d73eb6b1e

View File

@ -92,10 +92,10 @@ class ImageUtil {
height = originalHeight; height = originalHeight;
} }
else if (width == -1) { else if (width == -1) {
width = (int) (originalWidth * ratio); width = (int) (height * ratio);
} }
else if (height == -1) { else if (height == -1) {
height = (int) (originalHeight / ratio); height = (int) (width / ratio);
} }