From: Tim Starling Date: Mon, 28 Nov 2011 04:37:15 +0000 (+0000) Subject: Fix for r99911: don't use getImageArea() to determine the area for comparison against... X-Git-Tag: 1.31.0-rc.0~26260 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=5b72053fb957556fc65d67191366eb917829734a;p=lhc%2Fweb%2Fwiklou.git Fix for r99911: don't use getImageArea() to determine the area for comparison against $wgMaxImageArea, this breaks the $wgMaxAnimatedGifArea feature completely. --- diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 021df42258..035694ed59 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -47,7 +47,7 @@ class BitmapHandler extends ImageHandler { if ( is_null( $checkImageAreaHookResult ) ) { global $wgMaxImageArea; - if ( $this->getImageArea( $image ) > $wgMaxImageArea && + if ( $srcWidth * $srcHeight > $wgMaxImageArea && !( $image->getMimeType() == 'image/jpeg' && self::getScalerType( false, false ) == 'im' ) ) { # Only ImageMagick can efficiently downsize jpg images without loading