Jump to content

手册:$wgSVGConverter

From mediawiki.org
This page is a translated version of the page Manual:$wgSVGConverter and the translation is 38% complete.
SVG: $wgSVGConverter
A key from $wgSVGConverters to use as converter.
引进版本:1.4.0
移除版本:仍在使用
允许的值:(字符串)
默认值:'ImageMagick '

细节

A key from $wgSVGConverters to use for the conversion of SVG to PNG.

Possible values available by default are 'ImageMagick', 'sodipodi', 'inkscape', 'batik', 'rsvg', 'imgserv', 'ImagickExt'. Other converters can be added to $wgSVGConverters .

默认值

$wgSVGConverter = 'ImageMagick';

ImageMagick & Local Web server

Many users may find it difficult to make ImageMagick Work in local web servers running mediawiki such as XAMPP, WAMP, MAMP, Apache HTTP Sever, AMPPS, EasyPHP, Uniform Server etc. For ImageMagick to work on Windows, these settings must be set properly in LocalSettings.php. You can copy this code directly to LocalSettings.php but remember to comment out by removing #.

## 在Mediawiki中使用ImageMagick
$wgUseImageResize = true;
$wgUseImageMagick = true;
## 启用适用于Windows的
# If you have installed ImageMagick in windows comment out below
#$wgImageMagickConvertCommand = "C:/Program Files/ImageMagick-6.9.3-Q16/convert";
# If you have portable version of ImageMagick. Show the path properly & comment out below line. In this case Portable ImageMagick was copied to mediawiki/extra folder. So path is shown this way.
#$wgImageMagickConvertCommand = "$IP/extra/convert";
## Enable this for Linux
#$wgImageMagickConvertCommand = "/usr/bin/convert";

# 支持SVG图像
$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'ImageMagick';
$wgSVGConverters = [
    'ImageMagick' => '"C:/Program Files/ImageMagick-6.9.3-Q16/convert" -background white -geometry $width $input $output',
];

参见