From fe921488212bad336185b87a803f0e44fe69518f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 24 Jan 2011 21:23:54 +0100 Subject: Resize image if width _or_ height are too big. Not _and_. --- bin/gen-xhtml-thumbnails | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/gen-xhtml-thumbnails b/bin/gen-xhtml-thumbnails index 8088975..325c1d3 100755 --- a/bin/gen-xhtml-thumbnails +++ b/bin/gen-xhtml-thumbnails @@ -146,7 +146,7 @@ foreach my $file (@files) { my $image = Image::Imlib2->load($file); ($dx, $dy) = ($image->width, $image->height); - if ($dx > $thumb_max_dim and $dy > $thumb_max_dim) { + if ($dx > $thumb_max_dim or $dy > $thumb_max_dim) { if ($dx > $dy) { $thumb = $image->create_scaled_image($thumb_max_dim, 0); } -- cgit v1.2.3