From 0d73eb6b1edb02b4ee9c3dfe9cb95c25b605384e Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 17 Sep 2017 17:41:15 +0200 Subject: [PATCH] Fixed image resizing with un-specified dimension --- src/dorkbox/util/ImageUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dorkbox/util/ImageUtil.java b/src/dorkbox/util/ImageUtil.java index 5291b27..688ac51 100644 --- a/src/dorkbox/util/ImageUtil.java +++ b/src/dorkbox/util/ImageUtil.java @@ -92,10 +92,10 @@ class ImageUtil { height = originalHeight; } else if (width == -1) { - width = (int) (originalWidth * ratio); + width = (int) (height * ratio); } else if (height == -1) { - height = (int) (originalHeight / ratio); + height = (int) (width / ratio); }