* @param array &$params
* @return bool
*/
- function normaliseParams( $image, &$params ) {
+ public function normaliseParams( $image, &$params ) {
global $wgMaxInterlacingAreas;
if ( !parent::normaliseParams( $image, $params ) ) {
return false;
}
$im->setImageDepth( 8 );
- if ( $rotation ) {
- if ( !$im->rotateImage( new ImagickPixel( 'white' ), 360 - $rotation ) ) {
- return $this->getMediaTransformError( $params, "Error rotating $rotation degrees" );
- }
+ if ( $rotation && !$im->rotateImage( new ImagickPixel( 'white' ), 360 - $rotation ) ) {
+ return $this->getMediaTransformError( $params, "Error rotating $rotation degrees" );
}
if ( $this->isAnimatedImage( $image ) ) {