only directly pass thru photos which are slender enough, and also not too heigh
[phpfspot.git] / 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
-      // 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;