[Image-SIG] unexpected result when using Image.composite

Laura & Edward Cannon cannon.el at gmail.com
Fri Oct 16 06:55:12 CEST 2009


I am using Image.composite to combine two images and am getting
unexpected results. Partially transparent areas are appearing
discolored. When I preform the same operation in the Gimp, the result
is as expected. A script demonstrating the problem is

import Image

fg = Image.open("a0001.png")
bg = Image.open("bg.png").resize(fg.size, Image.ANTIALIAS)
Image.composite(fg, bg, fg).save("out.png")


I have attached the source files for reference. Any insight into this
problem would be appreciated.
Edward Cannon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a0001.png
Type: image/png
Size: 93173 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20091015/9f4bad2f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bg.png
Type: image/png
Size: 212882 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20091015/9f4bad2f/attachment-0003.png>


More information about the Image-SIG mailing list