Public Member Functions | |
isEnabled () | |
False if the handler is disabled for all files. | |
mustRender ($file) | |
True if handled types cannot be displayed directly in a browser but can be rendered. | |
normaliseParams ($image, &$params) | |
Changes the parameter array as necessary, ready for transformation. | |
doTransform ($image, $dstPath, $dstUrl, $params, $flags=0) | |
Get a MediaTransformOutput object representing the transformed output. | |
rasterize ($srcPath, $dstPath, $width, $height) | |
getImageSize ($image, $path) | |
Get an image size array like that returned by getimagesize(), or false if it can't be determined. | |
getThumbType ($ext, $mime) | |
Get the thumbnail extension and MIME type for a given source MIME type. | |
getLongDesc ($file) |
Definition at line 10 of file SVG.php.
SvgHandler::doTransform | ( | $ | image, | |
$ | dstPath, | |||
$ | dstUrl, | |||
$ | params, | |||
$ | flags = 0 | |||
) |
Get a MediaTransformOutput object representing the transformed output.
Does the transform unless $flags contains self::TRANSFORM_LATER.
Image | $image The image object | |
string | $dstPath Filesystem destination path | |
string | $dstUrl Destination URL to use in output HTML | |
array | $params Arbitrary set of parameters validated by $this->validateParam() | |
integer | $flags A bitfield, may contain self::TRANSFORM_LATER |
Reimplemented from MediaHandler.
Definition at line 42 of file SVG.php.
References $flags, $status, $wgSVGConverter, $wgSVGConverterPath, $wgSVGConverters, normaliseParams(), rasterize(), wfMkdirParents(), and wfMsg().
SvgHandler::getImageSize | ( | $ | image, | |
$ | path | |||
) |
Get an image size array like that returned by getimagesize(), or false if it can't be determined.
Image | $image The image object, or false if there isn't one | |
string | $fileName The filename |
Reimplemented from ImageHandler.
Definition at line 107 of file SVG.php.
References $path, and wfGetSVGsize().
SvgHandler::getLongDesc | ( | $ | file | ) |
Reimplemented from ImageHandler.
Definition at line 115 of file SVG.php.
References $file, $wgLang, and wfMsgExt().
SvgHandler::getThumbType | ( | $ | ext, | |
$ | mime | |||
) |
Get the thumbnail extension and MIME type for a given source MIME type.
Reimplemented from MediaHandler.
SvgHandler::isEnabled | ( | ) |
False if the handler is disabled for all files.
Reimplemented from MediaHandler.
Definition at line 11 of file SVG.php.
References $wgSVGConverter, $wgSVGConverters, and wfDebug().
SvgHandler::mustRender | ( | $ | file | ) |
True if handled types cannot be displayed directly in a browser but can be rendered.
Reimplemented from MediaHandler.
SvgHandler::normaliseParams | ( | $ | image, | |
&$ | params | |||
) |
Changes the parameter array as necessary, ready for transformation.
Should be idempotent. Returns false if the parameters are unacceptable and the transform should fail
Reimplemented from ImageHandler.
Definition at line 25 of file SVG.php.
References $wgSVGMaxSize, and File::scaleHeight().
Referenced by doTransform().
SvgHandler::rasterize | ( | $ | srcPath, | |
$ | dstPath, | |||
$ | width, | |||
$ | height | |||
) |
Definition at line 80 of file SVG.php.
References $cmd, $wgSVGConverter, $wgSVGConverterPath, $wgSVGConverters, MediaHandler::removeBadFile(), wfDebug(), wfDebugLog(), wfEscapeShellArg(), wfHostname(), wfProfileIn(), wfProfileOut(), and wfShellExec().
Referenced by doTransform().