only directly pass thru photos which are slender enough, and also not too heigh
authorAndreas Unterkircher <unki@netshadow.at>
Tue, 1 Jan 2008 15:29:34 +0000 (16:29 +0100)
committerAndreas Unterkircher <unki@netshadow.at>
Tue, 1 Jan 2008 15:36:49 +0000 (16:36 +0100)
phpfspot.class.php

index edf3965d6706cfef5929b0a39a4d65144854835d..63a913937d8ac5eac60352bd724805e5e924de8b 100644 (file)
@@ -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
 
       // 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;
          $result = imagejpeg($src_img, $thumb_image, 75);
          imagedestroy($src_img);
          return true;