< Manual:Hooks
BitmapHandlerTransform
Available from version 1.18.0 (r84278, codereview)
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

  • $handler: BitmapHandler
  • $image: File
  • &$scalerParams: Array with scaler parameters
  • &$mto: null, set to a MediaTransformOutput
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.