X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/34fff64e7b56f4f8cd99430f9f927d2a5d1e3619..2eefd84d0adbcaaaf4aa1c306a1c745fa52f3c9b:/IkiWiki/Plugin/img.pm diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index f06121578..63dfa9019 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -115,9 +115,6 @@ sub preprocess (@) { $im = Image::Magick->new; $r = $im->Read($outfile); error sprintf(gettext("failed to read %s: %s"), $outfile, $r) if $r; - - $dwidth = $im->Get("width"); - $dheight = $im->Get("height"); } else { ($dwidth, $dheight)=($w, $h); @@ -133,6 +130,9 @@ sub preprocess (@) { $imglink = $file; } } + + $dwidth = $im->Get("width") unless defined $dwidth; + $dheight = $im->Get("height") unless defined $dheight; } } else {