Last modified: 2012-11-25 02:15:55 UTC
Although code comments tell us "Initialise the destination image to transparent _instead_ of the default solid black, to support PNG and GIF transparency nicely", the black color is always taken as transparent when downsampling GIF images. See the patch attached.
Created attachment 7636 [details] includes/media/Bitmap.php.diff
I was able to workaround this by changing $wgUseImageMagick to true in LocalSettings. And then I just wiped out the images/thumbs directory and it redid all the gifs correctly.
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Still actual for svn89562. Any progress? (In reply to comment #2) > I was able to workaround this by changing $wgUseImageMagick to true in > LocalSettings. > And then I just wiped out the images/thumbs directory and it redid all the gifs > correctly. That's not very good to use external converter when there's standard PHP GD available.
Created attachment 8622 [details] Always resample setting + correct imagecolorallocatealpha Additional comment: I think MW should have a setting for always downsampling paletted images with "imagecopyresampled" instead of "imagecopyresized" as the latter preserves transparency, but makes images ugly because of NearestNeighbor interpolation.
Comment on attachment 7636 [details] includes/media/Bitmap.php.diff Obsoleted by Vitaliy's next patch.
Vitaliy, I am so sorry for the wait for a response. To get this reviewed faster, I'd love to get it moved into Gerrit, our code review system. https://www.mediawiki.org/wiki/Git/Tutorial gives you instructions on how to do that. If this issue is still reproducible, could you submit it that way? Thank you for the patch.
Moved in Gerrit change #22945
Vitaliy, could you please address the concerns posted by Brian Wolff on that Gerrit changeset? >$wgGDAlwaysResample needs entry in DefaultSettings.php. >Also should justify why a global is needed (what circumstances would you want the behaviour overriden)
(In reply to comment #8) > Moved in Gerrit change #22945 Abandoned.