From: Andreas Unterkircher Date: Tue, 1 Jan 2008 15:29:34 +0000 (+0100) Subject: only directly pass thru photos which are slender enough, and also not too heigh X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=commitdiff_plain;h=e54956dad7e0632849db2a92eb7ceff88b52247d;ds=inline only directly pass thru photos which are slender enough, and also not too heigh --- 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;