From 5b72053fb957556fc65d67191366eb917829734a Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 28 Nov 2011 04:37:15 +0000 Subject: [PATCH] Fix for r99911: don't use getImageArea() to determine the area for comparison against $wgMaxImageArea, this breaks the $wgMaxAnimatedGifArea feature completely. --- includes/media/Bitmap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1