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

Laura & Edward Cannon cannon.el at gmail.com
Mon Oct 19 03:50:11 CEST 2009


I have discovered the source of the problem. the bg image is mode
RGBA, when I convert it to RGB, the result is as expected.

On Thu, Oct 15, 2009 at 9:55 PM, Laura & Edward Cannon
<cannon.el at gmail.com> wrote:
> 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
>


More information about the Image-SIG mailing list