PIL .paste Bug?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PIL .paste Bug?

Amadeus Demarzi
Hello All, perhaps you can help me out here.

Not sure if I have found a bug or if I am simply doing it wrong.

Here is a link to files related to the bug to test for yourself (not sure if this ML would accept attachments or not)


And a quick explanation. The script is SUPER simple. It executes 2 methods, one that pastes a semi transparent PNG onto a flat color, and the other onto an existing image, it then saves out 2 images:

_works.png
_broken.png

If you open up both in a photo editing tool, you will noticed that the 'burn.png' that was pasted into the _broken.png has actually manipulated the transparency for the entire image, whereas the the _works.png will not have any full image transparency, and the 'blend' that takes place between test.png and burn.png works as expected.

My intent is to have burn.png NOT manipulate the transparency of the entire image when being pasted onto the solid color. Am I missing something is this a bug? And if this is a bug, is there some sort of workaround for it?

Thanks in advance,
Amadeus

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: PIL .paste Bug?

Helge-8
HNY Amadeus,

Amadeus Demarzi schrieb:
> http://dl.dropbox.com/u/18782/PILBug.zip
>
> My intent is to have burn.png NOT manipulate the transparency of the
> entire image when being pasted onto the solid color. Am I missing
> something is this a bug? And if this is a bug, is there some sort of
> workaround for it?

Please have a look into the thread "Paste with alpha not working
correctly" from Sat, 28 Aug 2010 20:07:05 +0200. The solution proposed
by Stani may work for your problem as well.

Best Regards, Helge
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig