summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-01-01 16:29:34 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-01-01 16:36:49 +0100
commite54956dad7e0632849db2a92eb7ceff88b52247d (patch)
tree00731ef8f68d5591a92c05eb56234b22573b2f56 /phpfspot.class.php
parentb3473f89355acd8a89229c6baa4de7275b01ea94 (diff)
only directly pass thru photos which are slender enough, and also not too heigh
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php6
1 files 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;