8 protected function setUp() {
12 'wgMaxImageArea' => 1.25e7,
13 'wgCustomConvertCommand' =>
'dummy',
35 'width' => 512,
'height' => 384,
36 'physicalWidth' => 512,
'physicalHeight' => 384,
37 'page' => 1,
'interlace' =>
false,
40 'Resizing with width set',
45 'width' => 512,
'height' => 384,
46 'physicalWidth' => 512,
'physicalHeight' => 384,
47 'page' => 1,
'interlace' =>
false,
49 [
'width' => 512,
'height' => 768 ],
50 'Resizing with height set too high',
55 'width' => 512,
'height' => 384,
56 'physicalWidth' => 512,
'physicalHeight' => 384,
57 'page' => 1,
'interlace' =>
false,
59 [
'width' => 1024,
'height' => 384 ],
60 'Resizing with height set',
67 'width' => 5,
'height' => 1,
68 'physicalWidth' => 5,
'physicalHeight' => 1,
69 'page' => 1,
'interlace' =>
false,
78 'width' => 1,
'height' => 10,
79 'physicalWidth' => 1,
'physicalHeight' => 10,
80 'page' => 1,
'interlace' =>
false,
88 'width' => 1,
'height' => 5,
89 'physicalWidth' => 1,
'physicalHeight' => 10,
90 'page' => 1,
'interlace' =>
false,
92 [
'width' => 10,
'height' => 5 ],
93 'Very high image with height set',
99 'width' => 5000,
'height' => 5000,
100 'physicalWidth' => 4000,
'physicalHeight' => 4000,
101 'page' => 1,
'interlace' =>
false,
104 'Bigger than max image size but doesn\'t need scaling',
110 'width' => 5000,
'height' => 5000,
111 'physicalWidth' => 4000,
'physicalHeight' => 4000,
112 'page' => 1,
'interlace' =>
false,
114 [
'width' => 5000,
'interlace' =>
true ],
115 'Interlace bigger than max interlace area',
126 $params = [
'width' =>
'3700' ];
127 $this->
assertEquals( TransformTooBigImageAreaError::class,
136 $file->mustRender =
true;
138 $params = [
'width' =>
'5000' ];
139 $this->
assertEquals( TransformTooBigImageAreaError::class,
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Generic handler for bitmap images.
static provideNormaliseParams()
testNormaliseParams( $fileDimensions, $expectedParams, $params, $msg)
provideNormaliseParams BitmapHandler::normaliseParams
testTooBigMustRenderImage()
BitmapHandler::doTransform.
testImageArea()
BitmapHandler::getImageArea.
testTooBigImage()
BitmapHandler::doTransform.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable modifiable after all normalizations have been except for the $wgMaxImageArea check set to true or false to override the $wgMaxImageArea check result gives extension the possibility to transform it themselves $handler
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true