X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FBitmap.php;h=9f7a09cc85c218834b2e9dc63f73b10e077fedbb;hb=5e5579d04cfac26317ff13cd85ed8453a113c10f;hp=e2dc68b291c1c7685e1e87b5a32b98810ef9d907;hpb=99e968b5aa933a33a45216f6355f00780a0cf203;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index e2dc68b291..9f7a09cc85 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -131,7 +131,7 @@ class BitmapHandler extends ImageHandler { # The size of the image on the page 'clientWidth' => $params['width'], 'clientHeight' => $params['height'], - # Comment as will be added to the EXIF of the thumbnail + # Comment as will be added to the Exif of the thumbnail 'comment' => isset( $params['descriptionUrl'] ) ? "File source: {$params['descriptionUrl']}" : '', # Properties of the original image @@ -398,7 +398,7 @@ class BitmapHandler extends ImageHandler { $im->sharpenImage( $radius, $sigma ); } $im->setCompressionQuality( 80 ); - } elseif( $params['mimeType'] == 'image/png' ) { + } elseif ( $params['mimeType'] == 'image/png' ) { $im->setCompressionQuality( 95 ); } elseif ( $params['mimeType'] == 'image/gif' ) { if ( $this->getImageArea( $image ) > $wgMaxAnimatedGifArea ) { @@ -765,16 +765,16 @@ class BitmapHandler extends ImageHandler { public function rotate( $file, $params ) { global $wgImageMagickConvertCommand; - $rotation = ( $params[ 'rotation' ] + $this->getRotation( $file ) ) % 360; + $rotation = ( $params['rotation'] + $this->getRotation( $file ) ) % 360; $scene = false; $scaler = self::getScalerType( null, false ); switch ( $scaler ) { case 'im': $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . - wfEscapeShellArg( $this->escapeMagickInput( $params[ 'srcPath' ], $scene ) ) . + wfEscapeShellArg( $this->escapeMagickInput( $params['srcPath'], $scene ) ) . " -rotate -$rotation " . - wfEscapeShellArg( $this->escapeMagickOutput( $params[ 'dstPath' ] ) ) . " 2>&1"; + wfEscapeShellArg( $this->escapeMagickOutput( $params['dstPath'] ) ) . " 2>&1"; wfDebug( __METHOD__ . ": running ImageMagick: $cmd\n" ); wfProfileIn( 'convert' ); $retval = 0;