手册:$wgCustomConvertCommand
图片: $wgCustomConvertCommand | |
---|---|
Use another resizing converter, e.g. GraphicMagick. |
|
引进版本: | 1.6.0 (r13244) |
移除版本: | 仍在使用 |
允许的值: | (字符串)或false |
默认值: | false |
其他设置: 按首字母排序 | 按功能排序 |
细节
To use another resizing converter, e.g. GraphicMagick, set this variable to the command-line string required to launch the executable. If no string is specified, then MediaWiki's internal resizing code will be used.
In the command-line string, the following variables will be expanded:
%s
will be replaced with the source path
%d
will be replaced with the destination
%w
will be replaced with the width
%h
will be replaced with the height
This setting is overridden by
$wgUseImageMagick
. If your custom converter is not being invoked, check that $wgUseImageMagick
is not set to true
.Examples
This is the command you would set for GraphicMagick:
$wgCustomConvertCommand = "gm convert %s -resize %wx%h %d";
This is the command you would set for using ImageMagick to overlay your files in tiles with e.g. a watermark file:
$wgCustomConvertCommand = "/usr/bin/convert %s | /usr/bin/composite -tile /path/to/file/watermark.png %s -resize %wx%h %d";
Bitmaps vs. SVG
$wgCustomConvertCommand
is only used for Bitmaps.
If you're looking for an alternative to ImageMagick to convert your SVG files, you need to use $wgSVGConverter
.