Always use true image size
authorPer Carlson <per.carlson@ventelo.no>
Thu, 17 Nov 2011 21:59:31 +0000 (22:59 +0100)
committerPer Carlson <per.carlson@ventelo.no>
Thu, 17 Nov 2011 21:59:31 +0000 (22:59 +0100)
IkiWiki/Plugin/img.pm

index b98e843..a28d6a6 100644 (file)
@@ -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 {