Manual:Hooks/BitmapHandlerTransform

From mediawiki.org
Jump to navigation Jump to search
BitmapHandlerTransform
Available from version 1.18.0 (r84278)
Before a file is transformed, gives extension the possibility to transform it themselves.
Define function:
public static function onBitmapHandlerTransform( $handler, $image, &$scalerParams, &$mto ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"BitmapHandlerTransform": "MyExtensionHooks::onBitmapHandlerTransform"
	}
}
Called from: File(s): media/TransformationalImageHandler.php
Interface: BitmapHandlerTransformHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:BitmapHandlerTransform extensions.


Details[edit]

  • $handler: BitmapHandler
  • $image: File
  • &$scalerParams: Array with scaler parameters
  • &$mto: null, set to a MediaTransformOutput