X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ae1857b43cf55a393a507b8434f172cbdb29d5b0..6223b697b4a75e0162878e8181b5df3184c7a0a3:/IkiWiki/Plugin/img.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index b98e843d4..b92e24cc0 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -118,7 +118,6 @@ sub preprocess (@) { error sprintf(gettext("failed to read %s: %s"), $outfile, $r) if $r; } else { - ($dwidth, $dheight)=($w, $h); $r = $im->Resize(geometry => "${w}x${h}"); error sprintf(gettext("failed to resize: %s"), $r) if $r; @@ -132,9 +131,10 @@ 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 {