Any other comments?<div><br></div><div>Alex,</div><div><br></div><div><div>Pillow says:</div><div><span style="background-color:rgb(255,255,255);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">Please report any non-packaging related issues here first:</span></div>
</div><div><ul style="margin:15px 0px;padding:0px 0px 0px 30px;border:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px;background-color:rgb(255,255,255)"><li style="margin:0px;padding:0px;border:0px">
<a href="https://bitbucket.org/effbot/pil-2009-raclette/issues" style="margin:0px;padding:0px;border:0px;color:rgb(65,131,196);text-decoration:none">https://bitbucket.org/effbot/pil-2009-raclette/issues</a></li></ul></div>
<div><br><div class="gmail_quote">Should i report the issue there?</div><div class="gmail_quote"><br></div><div class="gmail_quote">Lars</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">
<br></div><div class="gmail_quote">On Mon, Oct 29, 2012 at 4:33 PM, Alex Clark <span dir="ltr"><<a href="mailto:aclark@aclark.net" target="_blank">aclark@aclark.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 2012-10-29 15:05:28 +0000, Lars Ruoff said:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I'm new to this list, so excuse me if this is a known issue.<br>
I didn't find anything on it on the net so far but didn't have time to search much.<br>
<br>
I have observed what i consider a flaw in the Image.paste algorithm when used with transparent images.<br>
<br>
transparent-columns.png is an image with 3 vertical black columns with alpha=0.5, 0.2 and transparent respectively.<br>
transparent-bars.png is an image with 2 horizontal black bars with transparent and alpha=0.5 respectively.<br>
(images attached)<br>
<br>
When these two images are transparently pasted one over the other, using the following code:<br>
<br>
from PIL import Image<br>
source = Image.open('transparent-<u></u>columns.png')<br>
result = Image.open('transparent-bars.<u></u>png')<br>
result.paste(source, (0, 0), source)<br>
result.save('transparent-<u></u>columns-on-bars-pil.png')<br>
<br>
The result is unexpectet to say the least.<br>
PIL seems to modify the transparency even in regions where only one of the images has non-transparent values.<br>
Very wrong in my opinion.<br>
<br>
Doing the same manipulation in GIMP 2.6 gives what i consider the expected result.<br>
(attached for reference)<br>
<br>
I guess the per-pixel transparency of the result should be result_alpha = 1 - (1-alpha1)*(1-alpha2),<br>
where alpha1,alpha2 are the alpha channel values from the original images.<br>
</blockquote>
<br>
<br></div></div>
You are welcome to submit a patch to Pillow (the "friendly" PIL fork) here:<br>
<br>
- <a href="https://github.com/python-imaging/Pillow" target="_blank">https://github.com/python-<u></u>imaging/Pillow</a><br>
<br>
<br>
Speaking of that, can anyone review:<br>
<br>
- <a href="https://github.com/python-imaging/Pillow" target="_blank">https://github.com/python-<u></u>imaging/Pillow</a><br>
<br>
<br>
Also, I'm looking for a few folks willing to "stand up" and regularly review image code fixes. I know nothing about that code, and plan to stick with being the release manager only. I'll be doing a 1.7.8 release soon (by the end of this month) then maybe Pillow 1.8 will contain support for Python 3.3 (and cut everything before 2.7).<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Lars Ruoff<br>
<br>
<image><br>
<image><br>
<image><br>
<image><br>
<image><br>
<image><br>
______________________________<u></u>_________________<br>
Image-SIG maillist - <a href="mailto:Image-SIG@python.org" target="_blank">Image-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/image-sig" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/image-sig</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Alex Clark · <a href="https://www.gittip.com/aclark4life/" target="_blank">https://www.gittip.com/<u></u>aclark4life/</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
Image-SIG maillist - <a href="mailto:Image-SIG@python.org" target="_blank">Image-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/image-sig" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/image-sig</a><br>
</font></span></blockquote></div><br></div>