X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/54f600af14bf6dc067ffc30ec6f22d517001fe99..0ccf21daafa76fd182df5e6bc156f22873fe062d:/IkiWiki/Plugin/img.pm?ds=sidebyside 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 {