Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
948bc22
)
img: resize images in a deterministic manner.
author
intrigeri
<intrigeri@boum.org>
Fri, 1 Sep 2017 19:26:26 +0000
(19:26 +0000)
committer
intrigeri
<intrigeri@boum.org>
Fri, 1 Sep 2017 19:26:26 +0000
(19:26 +0000)
IkiWiki/Plugin/img.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/img.pm
b/IkiWiki/Plugin/img.pm
index 740c44f96045e19e5ed4f79dcca8db4369feeae6..79cfba20fb48564849b41717907c7f860904fe02 100644
(file)
--- a/
IkiWiki/Plugin/img.pm
+++ b/
IkiWiki/Plugin/img.pm
@@
-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);
}