From: Brian Wolff Date: Sun, 20 Jul 2014 14:44:50 +0000 (-0300) Subject: For xcf files, compose layers before scaling X-Git-Tag: 1.31.0-rc.0~14853^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=bceb8b6acfeff8e80a716e850c4a641b1ef0e085;p=lhc%2Fweb%2Fwiklou.git For xcf files, compose layers before scaling Otherwise if some layers are a different size than the overall image, the output will be distorted as all the layers will be resized. An example of such a file is the 2007 version of [[File:Blason_Saint-Malo.xcf]] (Need a version of image magick newer than production to see the issue). Bug: 35622 Change-Id: Ibbe8645afc151b0e9b658f762497071d67be3836 --- diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 9a3e927cd5..c0d9b71177 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -366,7 +366,7 @@ class BitmapHandler extends ImageHandler { // background colour. After merging we reset the background // to be white for the default background colour setting // in the PNG image (which is used in old IE) - $animation_post = array( + $animation_pre = array( '-background', 'transparent', '-layers', 'merge', '-background', 'white', @@ -382,7 +382,7 @@ class BitmapHandler extends ImageHandler { // bug 66323 - Greyscale images not rendered properly. // So only take the "red" channel. $channelOnly = array( '-channel', 'R', '-separate' ); - $animation_post = array_merge( $animation_post, $channelOnly ); + $animation_pre = array_merge( $animation_pre, $channelOnly ); } }