Manual:$wgSVGConverters/hi
SVG: $wgSVGConverters | |
---|---|
स्केलेबल वेक्टर ग्राफिक्स (एसवीजी) कन्वर्टर्स के पथों की सूची। |
|
Introduced in version: | 1.4.0 |
Removed in version: | still in use |
Allowed values: | (array) see below |
Default value: | नीचे देखें |
Other settings: Alphabetical | By function |
विवरण
स्केलेबल वेक्टर ग्राफिक्स (एसवीजी) छवियों के रूप में अपलोड किया जा सकता है। हालांकि, ब्राउज़र में एसवीजी समर्थन पैची है - विशेष रूप से, संस्करण 9 से पहले इंटरनेट एक्सप्लोरर एसवीजी प्रारूप को बिल्कुल समझ नहीं सका।
इसलिए, एसवीजी प्रारूप छवियों को पीएनजी प्रारूप में फॉलबैक के रूप में परिवर्तित करना आवश्यक है। इस रूपांतरण को करने के लिए एक बाहरी कार्यक्रम की आवश्यकता है
इस सरणी में एसवीजी रूपांतरण कार्यक्रमों की सूची और प्रत्येक के लिए कमांड लाइन शामिल है। अपने सिस्टम पर किस का उपयोग करना है, यह चुनने के लिए, $wgSVGConverter चर सेट करें।
मूल मान
MediaWiki version: | ≥ 1.39 |
$wgSVGConverters = [
'ImageMagick' => '$path/convert -background "#ffffff00" -thumbnail $widthx$height\\! $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
'ImagickExt' => [ 'SvgHandler::rasterizeImagickExt', ],
];
MediaWiki versions: | 1.25 – 1.38 |
$wgSVGConverters = [
'ImageMagick' =>
'$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
. '$output $input',
'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
'ImagickExt' => [ 'SvgHandler::rasterizeImagickExt' ],
];
MediaWiki versions: | 1.23 – 1.24 |
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
. '$output $input',
'rsvg' => '$path/rsvg -w $width -h $height $input $output',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ),
);
MediaWiki versions: | 1.21 – 1.22 |
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg -w $width -h $height $input $output',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ),
);
MediaWiki versions: | 1.18 – 1.20 |
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg -w$width -h$height $input $output',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ),
);
MediaWiki versions: | 1.14 – 1.17 |
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg -w$width -h$height $input $output',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
);
MediaWiki version: | 1.13 |
1.13
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -geometry $width $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg -w$width -h$height $input $output',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
);
MediaWiki versions: | 1.10 – 1.12 |
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -geometry $width $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg -w$width -h$height $input $output',
);
MediaWiki versions: | 1.5 – 1.9 |
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -geometry $width $input $output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
'rsvg' => '$path/rsvg -w$width -h$height $input $output',
);
MediaWiki version: | 1.4 |
$wgSVGConverters = array(
'ImageMagick' => '$path/convert -background white -geometry $width $input $output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
);
उपयोग
निम्न चर को कमांड लाइन में निर्दिष्ट किया जा सकता है:
$path
- the value of $wgSVGConverterPath , if set; otherwise$path/
(note the slash) will be stripped$input
- इनपुट एसवीजी फ़ाइल के लिए पथ$output
- वह मार्ग जहां मीडियाविकि आउटपुट पीएनजी फ़ाइल की तलाश करेगा$width
- वांछित चौड़ाई$height
- वांछित ऊंचाई
!
) 'एक मेटा-कैरेक्टर है यूनिक्स शैल और बैकस्लैश से बच जाना चाहिए। उपरोक्त कोड नमूने में, यह ImageMagick के लिए कमांड में देखा जा सकता है। विंडोज-पारिवारिक ऑपरेटिंग सिस्टम पर, विस्मयादिबोधक चिह्न (!
) खोल में मेटा-कैरेक्टर नहीं है और इसे बचने की आवश्यकता नहीं है।उदाहरण
A fictitious example, which assumes that an executable named mysvg2png
is on the system path:
$wgSVGConverters = [
'mysvg2png' => '$path/mysvg2png -input $input -toFormat PNG -w $width -h $height -output $output'
];
$wgSVGConverter = 'mysvg2png';
प्लेटफ़ॉर्म-विशिष्ट नोट्स
विंडोज
विंडोज़ पर, जहां निष्पादन योग्य पथ में रिक्त स्थान हो सकते हैं, आपको निष्पादन योग्य नाम उद्धृत करने की आवश्यकता हो सकती है। उदाहरण हेतु:
$wgSVGConverters = [
'inkscape' => '"$path/Inkscape/inkscape" -z -w $width -f $input -e $output',
];
विंडोज-पारिवारिक ऑपरेटिंग सिस्टम पर, विस्मयादिबोधक चिह्न (!
) खोल में मेटा-कैरेक्टर नहीं है और इसे बचने की आवश्यकता नहीं है।
Inkscape.exe डिफ़ॉल्ट रिलीज में कमांड लाइन तर्क स्वीकार नहीं करता है। आपको inkscapec.exe डाउनलोड करने की आवश्यकता होगी। फिर $wgSVकन्वर्टर्स को निम्नलिखित में सेट करें।
$wgSVGConverters = [
'inkscape' => 'inkscapec.exe --file=$input --export-png=$output --export-width=$width --without-gui',
];
The inkscapec.exe handles both long and short versions of the command-line.
विंडोज-पारिवारिक ऑपरेटिंग सिस्टम पर, विस्मयादिबोधक चिह्न (!
) खोल में मेटा-कैरेक्टर नहीं है और इसे बचने की आवश्यकता नहीं है।
लिनक्स
On some Linux installations (e.g. OpenSuSE 10.3, Debian, Ubuntu) rsvg is renamed (and might be packaged separately):
$wgSVGConverters = [ 'rsvg' => '/usr/bin/rsvg-convert -w $width -h $height -o $output $input' ];
$wgSVGConverter = 'rsvg' ;
यदि जावा निष्पादन योग्य पथ में नहीं है, तो इसे बैटिक का उपयोग करने के लिए निर्दिष्ट किया जाना चाहिए, या "थंबनेल निर्माण विफल:" संदेश प्रदर्शित किया जाएगा। उदाहरण हेतु:
$wgSVGConverters['batik'] = '/usr/local/bin/java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input';
!
) 'एक मेटा-कैरेक्टर है यूनिक्स शैल और बैकस्लैश से बच जाना चाहिए।OpenBSD and FreeBSD
On OpenBSD and FreeBSD installations rsvg was renamed to rsvg-convert:
$wgSVGConverterPath = "/usr/local/bin";
$wgSVGConverters = [ 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input' ];
$wgSVGConverter = 'rsvg' ;