From: Michael M Slusarz Date: Tue, 7 Jul 2009 17:59:52 +0000 (-0600) Subject: Only resize thumbnail if it is too large X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=22b8ebfb0f0b12d5638308212689049f1a7a9457;p=horde.git Only resize thumbnail if it is too large --- diff --git a/imp/lib/Mime/Viewer/Images.php b/imp/lib/Mime/Viewer/Images.php index 9dc6b075b..f330e66d5 100644 --- a/imp/lib/Mime/Viewer/Images.php +++ b/imp/lib/Mime/Viewer/Images.php @@ -218,7 +218,10 @@ EOD; if ($img) { if ($thumb) { - $img->resize(96, 96, true); + $dim = $img->getDimensions(); + if (($dim['height'] > 96) || ($dim['width'] > 96)) { + $img->resize(96, 96, true); + } } $type = $img->getContentType(); $data = $img->raw(true);