[Image-SIG] Transparent paste - another problem
szymon at mwg.pl
Wed Oct 8 17:25:55 CEST 2008
Ok. So here is some baz:
And this is foo:
2008/10/8 Florian Höch <lists+Image_SIG at hoech.org>:
> without seeing the original foo and at least some of the baz images, it's
> hard to tell how to achieve what you're looking for. I'd assume you want
> some sort of "adaptive multiplication", where only transparent parts are
> "multiplied over" the existing image and fully opaque parts "knock out"
> everything under it.
> Szymon Kosok schrieb:
>> I have another problem with PIL and transparent images. I have such code:
>> foo = Image.open("bar.png")
>> for p in w:
>> baz = Image.open(p.element.binary.path)
>> foo.paste(baz, (p.x, p.y), baz)
>> And the problem is... every baz (some of them are semi-transparent) is
>> transparent over every previous element.
>> Maybe I'll show what I want, and what I got:
>> http://i36.tinypic.com/2efjlaw.png - this is what I want,
>> http://i38.tinypic.com/11glf6t.png - and this what I get.
>> Any hints?
>> Best regards,
>> Image-SIG maillist - Image-SIG at python.org
> Image-SIG maillist - Image-SIG at python.org
More information about the Image-SIG