summaryrefslogtreecommitdiff
path: root/includes/media/Bitmap.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/media/Bitmap.php')
-rw-r--r--includes/media/Bitmap.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php
index 3b1d978e..0cc093bf 100644
--- a/includes/media/Bitmap.php
+++ b/includes/media/Bitmap.php
@@ -92,9 +92,8 @@ class BitmapHandler extends TransformationalImageHandler {
// JPEG decoder hint to reduce memory, available since IM 6.5.6-2
$decoderHint = array( '-define', "jpeg:size={$params['physicalDimensions']}" );
}
- } elseif ( $params['mimeType'] == 'image/png' ) {
+ } elseif ( $params['mimeType'] == 'image/png' || $params['mimeType'] == 'image/webp' ) {
$quality = array( '-quality', '95' ); // zlib 9, adaptive filtering
-
} elseif ( $params['mimeType'] == 'image/gif' ) {
if ( $this->getImageArea( $image ) > $wgMaxAnimatedGifArea ) {
// Extract initial frame only; we're so big it'll
@@ -121,9 +120,9 @@ class BitmapHandler extends TransformationalImageHandler {
'-layers', 'merge',
'-background', 'white',
);
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$xcfMeta = unserialize( $image->getMetadata() );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $xcfMeta
&& isset( $xcfMeta['colorType'] )
&& $xcfMeta['colorType'] === 'greyscale-alpha'