MediaWiki  1.23.8
Go to the documentation of this file.
1 <?php
30 class BmpHandler extends BitmapHandler {
35  function mustRender( $file ) {
36  return true;
37  }
47  function getThumbType( $text, $mime, $params = null ) {
48  return array( 'png', 'image/png' );
49  }
58  function getImageSize( $image, $filename ) {
59  $f = fopen( $filename, 'rb' );
60  if ( !$f ) {
61  return false;
62  }
63  $header = fread( $f, 54 );
64  fclose( $f );
66  // Extract binary form of width and height from the header
67  $w = substr( $header, 18, 4 );
68  $h = substr( $header, 22, 4 );
70  // Convert the unsigned long 32 bits (little endian):
71  try {
72  $w = wfUnpack( 'V', $w, 4 );
73  $h = wfUnpack( 'V', $h, 4 );
74  } catch ( MWException $e ) {
75  return false;
76  }
78  return array( $w[1], $h[1] );
79  }
80 }
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string $mime
Definition: hooks.txt:2573
Definition: UtfNormalTest2.php:38
wfUnpack( $format, $data, $length=false)
Wrapper around php's unpack.
Definition: GlobalFunctions.php:4028
Definition: styleTest.css.php:40
getImageSize( $image, $filename)
Get width and height from the bmp header.
Definition: BMP.php:58
MediaWiki exception.
Definition: MWException.php:26
Generic handler for bitmap images.
Definition: Bitmap.php:29
mustRender( $file)
Definition: BMP.php:35
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
getThumbType( $text, $mime, $params=null)
Render files as PNG.
Definition: BMP.php:47
if(PHP_SAPI !='cli') $file
Definition: UtfNormalTest2.php:30
Handler for Microsoft's bitmap format; getimagesize() doesn't support these files.
Definition: BMP.php:30
if( $useReadline) $e
Definition: eval.php:66