The way the logic and the defaults were before, it was basically impossible for animations with more than 12 frames to reach the "only thumbnail first frame" codepath; this surely cannot have been intended.
Also mention r64691 in release notes.
* (bug 20049) Fixed PHP notice in search highlighter that occurs in some cases
* (bug 23017) Special:Disambiguations now list pages in content namespaces
rather than only main namespace
+* (bug 23063) $wgMaxAnimatedGifArea is checked against the total size of all
+ frames, and $wgMaxImageArea against the size of the first frame, rather than
+ the other way around. Both now default to 12.5 megapixels. Also, images
+ exceeding $wgMaxImageArea can still be embedded at original size
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent
$wgMaxImageArea = 1.25e7;
/**
* Force thumbnailing of animated GIFs above this size to a single
- * frame instead of an animated thumbnail. ImageMagick seems to
- * get real unhappy and doesn't play well with resource limits. :P
- * Defaulting to 1 megapixel (1000x1000)
+ * frame instead of an animated thumbnail. As of MW 1.17 this limit
+ * is checked against the total size of all frames in the animation.
+ * It probably makes sense to keep this equal to $wgMaxImageArea.
*/
-$wgMaxAnimatedGifArea = 1.0e6;
+$wgMaxAnimatedGifArea = 1.25e7;
/**
* Browsers don't support TIFF inline generally...
* For inline display, we need to convert to PNG or JPEG.
# JPEG has the handy property of allowing thumbnailing without full decompression, so we make
# an exception for it.
if ( $mimeType !== 'image/jpeg' &&
- $this->getImageArea( $image, $srcWidth, $srcHeight ) > $wgMaxImageArea )
+ $srcWidth * $srcHeight > $wgMaxImageArea )
{
return false;
}
} elseif ( $mimeType == 'image/png' ) {
$quality = "-quality 95"; // zlib 9, adaptive filtering
} elseif( $mimeType == 'image/gif' ) {
- if( $srcWidth * $srcHeight > $wgMaxAnimatedGifArea ) {
+ if( $this->getImageArea( $image, $srcWidth, $srcHeight ) > $wgMaxAnimatedGifArea ) {
// Extract initial frame only; we're so big it'll
// be a total drag. :P
$frame = '[0]';