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 | File: the image object | |
$dstPath | String: filesystem destination path | |
$dstUrl | String: destination URL to use in output HTML | |
$params | Array: arbitrary set of parameters validated by $this->validateParam() | |
$flags | Integer: a bitfield, may contain self::TRANSFORM_LATER |
Reimplemented from MediaHandler.
Definition at line 42 of file SVG.php.
References 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 | File: the image object, or false if there isn't one | |
$fileName | String: the filename |
Reimplemented from ImageHandler.
Definition at line 105 of file SVG.php.
References $path, and wfGetSVGsize().
SvgHandler::getLongDesc | ( | $ | file | ) |
Reimplemented from ImageHandler.
Definition at line 113 of file SVG.php.
References $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 78 of file SVG.php.
References $wgSVGConverter, $wgSVGConverterPath, $wgSVGConverters, MediaHandler::removeBadFile(), wfDebug(), wfDebugLog(), wfEscapeShellArg(), wfHostname(), wfProfileIn(), wfProfileOut(), and wfShellExec().
Referenced by doTransform().