Go to the source code of this file.
Classes | |
class | XmlSizeFilter |
Functions | |
wfScaleSVGUnit ($length, $viewportSize=512) | |
Return a rounded pixel equivalent for a labeled CSS/SVG length. | |
wfGetSVGsize ($filename) | |
Compatible with PHP getimagesize(). | |
wfIsBadImage ($name, $contextTitle=false) | |
Determine if an image exists on the 'bad image list'. | |
wfFitBoxWidth ($boxWidth, $boxHeight, $maxHeight) | |
Calculate the largest thumbnail width for a given original file size such that the thumbnail's height is at most $maxHeight. |
wfFitBoxWidth | ( | $ | boxWidth, | |
$ | boxHeight, | |||
$ | maxHeight | |||
) |
Calculate the largest thumbnail width for a given original file size such that the thumbnail's height is at most $maxHeight.
$boxWidth | Integer Width of the thumbnail box. | |
$boxHeight | Integer Height of the thumbnail box. | |
$maxHeight | Integer Maximum height expected for the thumbnail. |
Definition at line 182 of file ImageFunctions.php.
Referenced by ImageHandler::normaliseParams(), and ImageFunctionsTest::testFitBoxWidth().
wfGetSVGsize | ( | $ | filename | ) |
Compatible with PHP getimagesize().
check XML more carefully
sensible defaults
$filename | String: full name of the file (passed to php fopen()). |
Definition at line 98 of file ImageFunctions.php.
References $filename, and $filter.
Referenced by SvgHandler::getImageSize().
wfIsBadImage | ( | $ | name, | |
$ | contextTitle = false | |||
) |
Determine if an image exists on the 'bad image list'.
The format of MediaWiki:Bad_image_list is as follows: * Only list items (lines starting with "*") are considered * The first link on a line must be a link to a bad image * Any subsequent links on the same line are considered to be exceptions, i.e. articles where the image may occur inline.
$name | string the image name to check | |
$contextTitle | Title: the page on which the image occurs, if known |
Definition at line 122 of file ImageFunctions.php.
References $bad, $exceptions, $i, $name, $title, Title::newFromText(), wfMsgForContentNoTrans(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by ImageGallery::toHTML().
wfScaleSVGUnit | ( | $ | length, | |
$ | viewportSize = 512 | |||
) |
Return a rounded pixel equivalent for a labeled CSS/SVG length.
http://www.w3.org/TR/SVG11/coords.html#UnitIdentifiers
$length | String: CSS/SVG length. | |
$viewportSize,: | Float optional scale for percentage units... |
Definition at line 10 of file ImageFunctions.php.
Referenced by XmlSizeFilter::filter().