MediaWiki
REL1_19
|
Media handler abstract base class for images. More...
Public Member Functions | |
canRender ($file) | |
getDimensionsString ($file) | |
getImageSize ($image, $path) | |
Get an image size array like that returned by getimagesize(), or false if it can't be determined. | |
getLongDesc ($file) | |
getParamMap () | |
Get an associative array mapping magic word IDs to parameter names. | |
getScriptedTransform ($image, $script, $params) | |
getScriptParams ($params) | |
getShortDesc ($file) | |
isAnimatedImage ($image) | |
makeParamString ($params) | |
Merge a parameter array into a string appropriate for inclusion in filenames. | |
normaliseParams ($image, &$params) | |
parseParamString ($str) | |
Parse a param string made with makeParamString back into an array. | |
validateParam ($name, $value) | |
Validate a thumbnail parameter at parse time. | |
validateThumbParams (&$width, &$height, $srcWidth, $srcHeight, $mimeType) | |
Validate thumbnail parameters and fill in the correct height. |
Media handler abstract base class for images.
Definition at line 526 of file Generic.php.
ImageHandler::canRender | ( | $ | file | ) |
$file | File |
Reimplemented from MediaHandler.
Reimplemented in TiffHandler.
Definition at line 532 of file Generic.php.
References $file.
ImageHandler::getDimensionsString | ( | $ | file | ) |
$file | File |
Reimplemented from MediaHandler.
Definition at line 744 of file Generic.php.
References $file, and wfMessage().
ImageHandler::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 |
$path | String: the filename |
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler, ExifBitmapHandler, XCFHandler, and BmpHandler.
Definition at line 697 of file Generic.php.
References $path, wfRestoreWarnings(), and wfSuppressWarnings().
ImageHandler::getLongDesc | ( | $ | file | ) |
$file | File |
Reimplemented from MediaHandler.
Reimplemented in SvgHandler, GIFHandler, and PNGHandler.
Definition at line 724 of file Generic.php.
References $file, $size, $wgLang, and wfMessage().
Get an associative array mapping magic word IDs to parameter names.
Will be used by the parser to identify parameters.
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 536 of file Generic.php.
ImageHandler::getScriptedTransform | ( | $ | image, |
$ | script, | ||
$ | params | ||
) |
$image | File |
$script | |
$params |
Reimplemented from MediaHandler.
Definition at line 685 of file Generic.php.
References $page, $url, getScriptParams(), normaliseParams(), and wfArrayToCGI().
ImageHandler::getScriptParams | ( | $ | params | ) |
Reimplemented in DjVuHandler.
Definition at line 574 of file Generic.php.
Referenced by getScriptedTransform().
ImageHandler::getShortDesc | ( | $ | file | ) |
$file | File |
Reimplemented from MediaHandler.
Definition at line 712 of file Generic.php.
References $file, $wgLang, and wfMessage().
ImageHandler::isAnimatedImage | ( | $ | image | ) |
Reimplemented in GIFHandler, PNGHandler, and SvgHandler.
Definition at line 704 of file Generic.php.
Referenced by BitmapHandler\transformImageMagick(), and BitmapHandler\transformImageMagickExt().
ImageHandler::makeParamString | ( | $ | params | ) |
Merge a parameter array into a string appropriate for inclusion in filenames.
$params | array |
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 552 of file Generic.php.
ImageHandler::normaliseParams | ( | $ | image, |
&$ | params | ||
) |
$image | File |
$params |
Reimplemented from MediaHandler.
Reimplemented in SvgHandler, BitmapHandler_ClientOnly, and BitmapHandler.
Definition at line 583 of file Generic.php.
References MediaHandler\fitBoxWidth(), File\scaleHeight(), and validateThumbParams().
Referenced by DjVuHandler\doTransform(), and getScriptedTransform().
ImageHandler::parseParamString | ( | $ | str | ) |
Parse a param string made with makeParamString back into an array.
$str | string |
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 565 of file Generic.php.
ImageHandler::validateParam | ( | $ | name, |
$ | value | ||
) |
Validate a thumbnail parameter at parse time.
Return true to accept the parameter, and false to reject it. If you return false, the parser will do something quiet and forgiving.
$name | |
$value |
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 540 of file Generic.php.
ImageHandler::validateThumbParams | ( | &$ | width, |
&$ | height, | ||
$ | srcWidth, | ||
$ | srcHeight, | ||
$ | mimeType | ||
) |
Validate thumbnail parameters and fill in the correct height.
$width | Integer: specified width (input/output) |
$height | Integer: height (output only) |
$srcWidth | Integer: width of the source image |
$srcHeight | Integer: height of the source image |
$mimeType | Unused |
Definition at line 658 of file Generic.php.
References File\scaleHeight(), and wfDebug().
Referenced by normaliseParams().