X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fmedia%2FBitmapHandler.php;h=f003554727608f204b7d355a1acd2b583650a325;hp=e2d32cfbe1086ab086f98f1743e96c04a2402062;hb=c13fee87d42bdd6fdf6764edb6f6475c14c27749;hpb=4077b57759756ecd0d25427ec9598feb28a28ac1 diff --git a/includes/media/BitmapHandler.php b/includes/media/BitmapHandler.php index e2d32cfbe1..f003554727 100644 --- a/includes/media/BitmapHandler.php +++ b/includes/media/BitmapHandler.php @@ -91,7 +91,7 @@ class BitmapHandler extends TransformationalImageHandler { * @param array &$params * @return bool */ - function normaliseParams( $image, &$params ) { + public function normaliseParams( $image, &$params ) { global $wgMaxInterlacingAreas; if ( !parent::normaliseParams( $image, $params ) ) { return false; @@ -338,10 +338,8 @@ class BitmapHandler extends TransformationalImageHandler { } $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 ) ) {