MediaWiki REL1_39
BitmapHandler_ClientOnly.php
Go to the documentation of this file.
1<?php
32// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
34
40 public function normaliseParams( $image, &$params ) {
41 return ImageHandler::normaliseParams( $image, $params );
42 }
43
52 public function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
53 if ( !$this->normaliseParams( $image, $params ) ) {
54 return new TransformParameterError( $params );
55 }
56
57 return new ThumbnailImage( $image, $image->getUrl(), $image->getLocalRefPath(), $params );
58 }
59}
Handler for bitmap images that will be resized by clients.
doTransform( $image, $dstPath, $dstUrl, $params, $flags=0)
Generic handler for bitmap images.
normaliseParams( $image, &$params)
Changes the parameter array as necessary, ready for transformation.Should be idempotent....
Media transform output for images.
Shortcut class for parameter validation errors.