Fix alpha transparency in XCF images
authorBrian Wolff <bawolff+wn@gmail.com>
Fri, 4 Jul 2014 04:46:10 +0000 (01:46 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Fri, 4 Jul 2014 04:50:39 +0000 (01:50 -0300)
commit9dbc0cce8a80d00d29a642cedc6e26dc7f43159a
tree8e23d17aa9e1226c5c0380a100ffbe6cbe94bc65
parentfac6e7d7b4855797493f2c9817cd5b95b40ef32d
Fix alpha transparency in XCF images

The -layers merge option flattens all layers on to a canvas
of whatever color -background is set to. However -background
was white for the PNG bKGD chunk. Set it to transparent just
for the -layers merge operation.

This works well on most recent image magick. Older image magick
explodes on my test image (I tested 6.6.0-4), so unclear if it
works there, but it certainly didn't make anything worse.
Wikimedia uses a version between the two that I tested so hopefully
this will make things better, and if it doesn't, it eventually will
when we update image magick.

Bug: 35622
Change-Id: I77601cdf005a64ae8ea7516cc846620431917863
includes/media/Bitmap.php