SVG thumbnailing not working in Mediawiki

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
maoltuile

SVG thumbnailing not working in Mediawiki

Post by maoltuile »

Hi,

I have Mediawiki 1.17 on Windows, using the latest ImageMagick to render thumbnails from SVG, I get the following error on trying to upload an SVG:

Error creating thumbnail: Magick: invalid argument for option `-thumbnail': 600x600\! @ error/convert.c/ConvertImageCommand/2711.

Anyone any ideas here?

thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: SVG thumbnailing not working in Mediawiki

Post by magick »

What is the convert command that is used? Try it from the command line. For example, this works for us:
  • convert logo.svg -thumbnail 600x600! logo.png
maoltuile

Re: SVG thumbnailing not working in Mediawiki

Post by maoltuile »

magick wrote:What is the convert command that is used? Try it from the command line. For example, this works for us:
  • convert logo.svg -thumbnail 600x600! logo.png
Thanks for that (quick reply!), I'm not sure. Here's what I have in LocalSettings.php (in MediaWiki):

$wgUseImageMagick = true;
$wgImageMagickConvertCommand = 'C:\Program Files\ImageMagick-6.6.2-Q16\convert.exe';
$wgImageMagickIdentifyCommand = 'C:\Program Files\ImageMagick-6.6.2-Q16\identify.exe';
$wgSVGConverter = 'ImageMagick';

It's calling on a completely unmodified ImageMagick install. Perhaps I need to change something, somewhere?
maoltuile

Re: SVG thumbnailing not working in Mediawiki

Post by maoltuile »

OK, just gotten onto the command-line of the machine in question, and tried the same DOS command that you did. Everything's working fine, but this is the very same file (that I've tested) that ImageMagick isn't thumbnailing in MediaWiki.

(On the main file gallery in MediaWiki, I'm getting the same error message but with "160x160" instead).
maoltuile

Re: SVG thumbnailing not working in Mediawiki

Post by maoltuile »

OK, I'm abandoning ImageMagick (at least for SVG) for the moment. InkScape is working.

Many thanks for your help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: SVG thumbnailing not working in Mediawiki

Post by snibgo »

Error creating thumbnail: Magick: invalid argument for option `-thumbnail': 600x600\! @ error/convert.c/ConvertImageCommand/2711.
This tells you that convert is seeing a backslash before the exclamation mark. Backslash is a Unix escape, not a Windows escape. Try removing the backslash.
snibgo's IM pages: im.snibgo.com
maoltuile

Re: SVG thumbnailing not working in Mediawiki

Post by maoltuile »

snibgo wrote:
Error creating thumbnail: Magick: invalid argument for option `-thumbnail': 600x600\! @ error/convert.c/ConvertImageCommand/2711.
This tells you that convert is seeing a backslash before the exclamation mark. Backslash is a Unix escape, not a Windows escape. Try removing the backslash.
Thanks. I did a search on that string ("\!"), and it turned up a number of Perl batch files inside XAMPP. I'm afraid to touch them, though(!).

cheers
Post Reply