r104386 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104385‎ | r104386 | r104387 >
Date:04:37, 28 November 2011
Author:tstarling
Status:ok
Tags:
Comment:
Fix for r99911: don't use getImageArea() to determine the area for comparison against $wgMaxImageArea, this breaks the $wgMaxAnimatedGifArea feature completely.
Modified paths:
  • /trunk/phase3/includes/media/Bitmap.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/Bitmap.php
@@ -47,7 +47,7 @@
4848 if ( is_null( $checkImageAreaHookResult ) ) {
4949 global $wgMaxImageArea;
5050
51 - if ( $this->getImageArea( $image ) > $wgMaxImageArea &&
 51+ if ( $srcWidth * $srcHeight > $wgMaxImageArea &&
5252 !( $image->getMimeType() == 'image/jpeg' &&
5353 self::getScalerType( false, false ) == 'im' ) ) {
5454 # Only ImageMagick can efficiently downsize jpg images without loading

Follow-up revisions

RevisionCommit summaryAuthorDate
r104389MFT VipsScaler dependencies r99911, r99916, r99917, r101677, r104386, r104387...tstarling05:04, 28 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99911Per bug 28135, disable $wgMaxImageArea check when transforming using a hook, ...btongminh20:36, 15 October 2011

Status & tagging log