Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remote "test45" template.
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
img.pm
diff --git
a/IkiWiki/Plugin/img.pm
b/IkiWiki/Plugin/img.pm
index 54c13d06919e0858442758d8fec09eb34bf0f0c3..169f5e7137a99739501c170561b164d3c4e8825d 100644
(file)
--- a/
IkiWiki/Plugin/img.pm
+++ b/
IkiWiki/Plugin/img.pm
@@
-76,9
+76,13
@@
sub preprocess (@) {
my $im = Image::Magick->new();
my $imglink;
my $imgdatalink;
my $im = Image::Magick->new();
my $imglink;
my $imgdatalink;
- my $r = $im->Read("$srcfile\[$pagenumber]");
+ my $r = $im->Read("
:
$srcfile\[$pagenumber]");
error sprintf(gettext("failed to read %s: %s"), $file, $r) if $r;
error sprintf(gettext("failed to read %s: %s"), $file, $r) if $r;
-
+
+ if (! defined $im->Get("width") || ! defined $im->Get("height")) {
+ error sprintf(gettext("failed to get dimensions of %s"), $file);
+ }
+
my ($dwidth, $dheight);
if ($params{size} eq 'full') {
my ($dwidth, $dheight);
if ($params{size} eq 'full') {