X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/47b180e35faa67759f0bf7de181a9d6876fd8902..94d358724e308bc4e8fe420328b85b2eb00455c5:/IkiWiki/Plugin/img.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index c3dc41474..79cfba20f 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -89,7 +89,7 @@ sub preprocess (@) { my $extension; my $format; - if ($base =~ m/\.([a-z0-9]+)$/) { + if ($base =~ m/\.([a-z0-9]+)$/is) { $extension = $1; } else { @@ -174,6 +174,12 @@ sub preprocess (@) { my $r = $im->Read("$format:$srcfile\[$pagenumber]"); error sprintf(gettext("failed to read %s: %s"), $file, $r) if $r; + if ($config{deterministic}) { + $im->Set('date:create' => 0); + $im->Set('date:modify' => 0); + $im->Set('option' => 'png:exclude-chunk=time'); + } + if (! defined $im->Get("width") || ! defined $im->Get("height")) { error sprintf(gettext("failed to get dimensions of %s"), $file); }