From 8067a20d326eed464a2bfa7555782d043985f8fe Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 24 Feb 2020 17:13:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8D=B8=EB=84=A4=EC=9D=BC=20center=5Fmode=20?= =?UTF-8?q?=EC=8B=9C=20=EC=8D=B8=EB=84=A4=EC=9D=BC=20height=EA=B0=80=20?= =?UTF-8?q?=EC=9B=90=EB=B3=B8=EC=9D=B4=EB=AF=B8=EC=A7=80=EA=B0=80=20?= =?UTF-8?q?=EC=9E=91=EC=9D=84=EB=95=8C=EB=8F=84=20=EB=8F=99=EC=9E=91?= =?UTF-8?q?=EB=90=98=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/thumbnail.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 35260e2d2..47e296801 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -306,8 +306,11 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h if(!$thumb_height) { $thumb_height = round(($thumb_width * $size[1]) / $size[0]); } else { - if($size[0] < $thumb_width || $size[1] < $thumb_height) + if($crop_mode === 'center' && ($size[0] > $thumb_width || $size[1] > $thumb_height)){ + $is_large = true; + } else if($size[0] < $thumb_width || $size[1] < $thumb_height) { $is_large = false; + } } } else { if($thumb_height) {