Index: includes/media/Bitmap.php =================================================================== --- includes/media/Bitmap.php (revision 89562) +++ includes/media/Bitmap.php (working copy) @@ -521,11 +521,12 @@ // Initialise the destination image to transparent instead of // the default solid black, to support PNG and GIF transparency nicely - $background = imagecolorallocate( $dst_image, 0, 0, 0 ); + $background = imagecolorallocatealpha( $dst_image, 0, 0, 0, 0x7F ); imagecolortransparent( $dst_image, $background ); imagealphablending( $dst_image, false ); - if ( $colorStyle == 'palette' ) { + global $wgGDAlwaysResample; + if ( $colorStyle == 'palette' && !$wgGDAlwaysResample ) { // Don't resample for paletted GIF images. // It may just uglify them, and completely breaks transparency. imagecopyresized( $dst_image, $src_image,