Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | # JPEG has the handy property of allowing thumbnailing without full decompression, so we make |
36 | 36 | # an exception for it. |
37 | 37 | if ( $mimeType !== 'image/jpeg' && |
38 | | - $this->getImageArea( $image, $srcWidth, $srcHeight ) > $wgMaxImageArea ) |
| 38 | + $srcWidth * $srcHeight > $wgMaxImageArea ) |
39 | 39 | { |
40 | 40 | return false; |
41 | 41 | } |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | } elseif ( $mimeType == 'image/png' ) { |
126 | 126 | $quality = "-quality 95"; // zlib 9, adaptive filtering |
127 | 127 | } elseif( $mimeType == 'image/gif' ) { |
128 | | - if( $srcWidth * $srcHeight > $wgMaxAnimatedGifArea ) { |
| 128 | + if( $this->getImageArea( $image, $srcWidth, $srcHeight ) > $wgMaxAnimatedGifArea ) { |
129 | 129 | // Extract initial frame only; we're so big it'll |
130 | 130 | // be a total drag. :P |
131 | 131 | $frame = '[0]'; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2349,11 +2349,11 @@ |
2350 | 2350 | $wgMaxImageArea = 1.25e7; |
2351 | 2351 | /** |
2352 | 2352 | * Force thumbnailing of animated GIFs above this size to a single |
2353 | | - * frame instead of an animated thumbnail. ImageMagick seems to |
2354 | | - * get real unhappy and doesn't play well with resource limits. :P |
2355 | | - * Defaulting to 1 megapixel (1000x1000) |
| 2353 | + * frame instead of an animated thumbnail. As of MW 1.17 this limit |
| 2354 | + * is checked against the total size of all frames in the animation. |
| 2355 | + * It probably makes sense to keep this equal to $wgMaxImageArea. |
2356 | 2356 | */ |
2357 | | -$wgMaxAnimatedGifArea = 1.0e6; |
| 2357 | +$wgMaxAnimatedGifArea = 1.25e7; |
2358 | 2358 | /** |
2359 | 2359 | * Browsers don't support TIFF inline generally... |
2360 | 2360 | * For inline display, we need to convert to PNG or JPEG. |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -88,6 +88,10 @@ |
89 | 89 | * (bug 20049) Fixed PHP notice in search highlighter that occurs in some cases |
90 | 90 | * (bug 23017) Special:Disambiguations now list pages in content namespaces |
91 | 91 | rather than only main namespace |
| 92 | +* (bug 23063) $wgMaxAnimatedGifArea is checked against the total size of all |
| 93 | + frames, and $wgMaxImageArea against the size of the first frame, rather than |
| 94 | + the other way around. Both now default to 12.5 megapixels. Also, images |
| 95 | + exceeding $wgMaxImageArea can still be embedded at original size |
92 | 96 | |
93 | 97 | === API changes in 1.17 === |
94 | 98 | * (bug 22738) Allow filtering by action type on query=logevent |