From: Per Carlson <per.carlson@ventelo.no>
Date: Thu, 17 Nov 2011 21:59:31 +0000 (+0100)
Subject: Always use true image size
X-Git-Tag: 3.20111107~62^2
X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/937c0742322065452a204069e0ba5abc625ec0c6?ds=inline

Always use true image size
---

diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index b98e843d4..a28d6a6d5 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -132,9 +132,9 @@ sub preprocess (@) {
 					$imglink = $file;
 				}
 			}
-			
-			$dwidth = $im->Get("width") unless defined $dwidth;
-			$dheight = $im->Get("height") unless defined $dheight;
+			# always get the true size of the resized image
+			$dwidth  = $im->Get("width"); 
+			$dheight = $im->Get("height");
 		}
 	}
 	else {