Bitmap_ClientOnly.php 477 B

12345678910111213141516
  1. <?php
  2. class BitmapHandler_ClientOnly extends BitmapHandler {
  3. function normaliseParams( $image, &$params ) {
  4. return ImageHandler::normaliseParams( $image, $params );
  5. }
  6. function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
  7. if ( !$this->normaliseParams( $image, $params ) ) {
  8. return new TransformParameterError( $params );
  9. }
  10. return new ThumbnailImage( $image, $image->getURL(), $params['width'],
  11. $params['height'], $image->getPath() );
  12. }
  13. }