From e54956dad7e0632849db2a92eb7ceff88b52247d Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Tue, 1 Jan 2008 16:29:34 +0100 Subject: [PATCH] only directly pass thru photos which are slender enough, and also not too heigh --- phpfspot.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpfspot.class.php b/phpfspot.class.php index edf3965..63a9139 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -1180,9 +1180,9 @@ class PHPFSPOT { // If requested width is more then the actual image width, // do not generate a thumbnail, instead safe the original - // as thumbnail but with lower quality - - if($width >= $cur_width) { + // as thumbnail but with lower quality. But if the image + // is to heigh too, then we still have to resize it. + if($width >= $cur_width && $cur_height < $this->cfg->thumb_height) { $result = imagejpeg($src_img, $thumb_image, 75); imagedestroy($src_img); return true; -- 2.25.1