r83792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83791‎ | r83792 | r83793 >
Date:22:50, 12 March 2011
Author:btongminh
Status:ok
Tags:
Comment:
Follow-up r83778: Need to de-rotate, so use 360 - angle instead of angle.
Modified paths:
  • /trunk/phase3/includes/media/Bitmap.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/Bitmap.php
@@ -181,13 +181,13 @@
182182 $scaler = 'client';
183183 } elseif ( !$wgUseImageResize ) {
184184 $scaler = 'client';
185 - } elseif ( $wgUseImageMagick ) {
 185+ }/* elseif ( $wgUseImageMagick ) {
186186 $scaler = 'im';
187187 } elseif ( $wgCustomConvertCommand ) {
188188 $scaler = 'custom';
189189 } elseif ( function_exists( 'imagecreatetruecolor' ) ) {
190190 $scaler = 'gd';
191 - } elseif ( class_exists( 'Imagick' ) ) {
 191+ }*/ elseif ( class_exists( 'Imagick' ) ) {
192192 $scaler = 'imext';
193193 } else {
194194 $scaler = 'client';
@@ -367,7 +367,7 @@
368368 $im->setImageDepth( 8 );
369369
370370 if ( $rotation ) {
371 - if ( !$im->rotateImage( new ImagickPixel( 'white' ), $rotation ) ) {
 371+ if ( !$im->rotateImage( new ImagickPixel( 'white' ), 360 - $rotation ) ) {
372372 return $this->getMediaTransformError( $params, "Error rotating $rotation degrees" );
373373 }
374374 }

Sign-offs

UserFlagDate
Nikerabbitinspected22:15, 28 June 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r83793Follow-up r83792: Remove left in debuggingbtongminh22:51, 12 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83778(bug 14706) Added support for the Imagick PHP extension. Based on patch by Le...btongminh19:32, 12 March 2011

Status & tagging log