diff options
-rw-r--r-- | IkiWiki/Plugin/img.pm | 3 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 103f6b2b3..b98e843d4 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -64,10 +64,11 @@ sub preprocess (@) { my $dir = $params{page}; my $base = IkiWiki::basename($file); + my $issvg = $base=~s/\.svg$/.png/i; eval q{use Image::Magick}; error gettext("Image::Magick is not installed") if $@; - my $im = Image::Magick->new; + my $im = Image::Magick->new($issvg ? (magick => "png") : ()); my $imglink; my $r = $im->Read($srcfile); error sprintf(gettext("failed to read %s: %s"), $file, $r) if $r; diff --git a/debian/changelog b/debian/changelog index cf17d213c..7b8d84e45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ ikiwiki (3.20110609) UNRELEASED; urgency=low * Support svg as a inlinable image type; svg images can be included on a page by simply linking to them, or by using the img directive. Note that sanitizing svg files is still not addressed. + * img: Generate png format thumbnails for svg images. -- Joey Hess <joeyh@debian.org> Thu, 09 Jun 2011 10:06:44 -0400 |