Manual talk:$wgSVGConverters

From MediaWiki.org
Jump to: navigation, search

Contents

[edit] transparent backgrounds

When using imagemagick you can change "-background white" to "-background none" to allow transparent backgrounds.

...or add the key -bg 0.0.0.0 for Batik.--Bandar Lego 14:18, 27 January 2011 (UTC)

[edit] image quality

Is the image quality sufficient by media wikis expectations? I just wondered about w:de:Bild:SPI Kaskadierung.svg

[edit] Batik under Ubuntu 9x

That's how I managed:

  • Installed java from sun
aptitude install sun-java6-jdk
  • Got Batik from Batik (the Ubuntu package seems to be uncomplete)
wget http://mirrors.linhub.com/apache/xmlgraphics/batik/batik-1.7.zip
  • Dezipped in /opt/batik and made a symbolic link like this:
lrwxrwxrwx  1 root    root         9 2009-10-03 16:54 batik -> batik-1.7
drwxr-xr-x  6 root    root      4096 2008-01-06 11:11 batik-1.7

Modifications to LocalSettings.php

# $wgSVGConverter = "rsvg";
# Batik - best results but slow and big
$wgMaxShellMemory = 10000000;
$wgSVGConverters['batik'] = '/usr/bin/java -Djava.awt.headless=true -jar /opt/batik/batik-rasterizer.jar -w $width -d $output $input';
$wgSVGConverter = "batik";

Note: $wgMaxShellMemory is in KB, 10MB is maybe too much

... and the results look much prettier than with rsvg which also answers the previous comment. However, it may not handle certain Inkscape code. I actually installed Batik because I couldn't make the very simple HTML5 overview picture correctly render with rsvg.

[edit] Inkscape under windows 2003 Server

I had problems as SVG-thumbnailing always resulted in Error-messages. The trick is, insert the path into the $wgSVGConverters - variable directly and add quotes " because there is a BLANK in the path. So this workes for me:

$wgSVGConverters = array(
     'inkscape' => '"c:\Program Files (x86)\Inkscape\inkscape.exe" -z -w $width -f $input -e $output',
  );
$wgSVGConverter = 'inkscape';
#$wgSVGConverterPath= '"c:\Program Files (x86)\Inkscape"';
#$wgAllowTitlesInSVG = false;
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox