<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:thr="http://purl.org/syndication/thread/1.0"
>
        <id>http://livingcode.org/2008/03/31/saving-png-from-pygame</id>
  <title type="html"><![CDATA[Comments on: Saving PNG from PyGame]]></title>
  <link rel="self" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/feed" />
  <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame" />   
  <author>
    <name>Dethe</name>
  </author>
  <generator uri="http://wordpress.org/" version="2.8.6">WordPress</generator>

<updated>2008-11-24T20:05:13Z</updated>
  <entry>
    <id>http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-30</id>
    <updated>2008-11-24T12:05:13Z</updated>
    <title type="html"><![CDATA[Comment by: Monday: saving images from Python &#8230; &#171; Jon&#8217;s PhD Journal]]></title>
    <author>
<name><![CDATA[Monday: saving images from Python &#8230; &laquo; Jon&#8217;s PhD Journal]]></name><uri>http://jdephd.wordpress.com/2008/11/24/monday-saving-images-from-python/</uri>    </author>
    <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-30" />
    <thr:in-reply-to ref="http://livingcode.org/?p=87" href="http://livingcode.org/?p=87" type="application/xhtml+xml" source="http://livingcode.org/wp-atom.php"/> 
    <link rel="related" type="text/html" href="http://livingcode.org/?p=87" />
          <content type="html"><![CDATA[<p>[...] Monday: saving images from Python&nbsp;&#8230; Filed under: Notes &#8212; JDE @ 7:53 pm   <a href="http://livingcode.org/2008/saving-png-from-pygame#respond" rel="nofollow">http://livingcode.org/2008/saving-png-from-pygame#respond</a> [...]</p>
]]></content>
        </entry>
  <entry>
    <id>http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-31</id>
    <updated>2008-12-11T07:03:46Z</updated>
    <title type="html"><![CDATA[Comment by: atm0s1]]></title>
    <author>
<name><![CDATA[atm0s1]]></name>    </author>
    <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-31" />
    <thr:in-reply-to ref="http://livingcode.org/?p=87" href="http://livingcode.org/?p=87" type="application/xhtml+xml" source="http://livingcode.org/wp-atom.php"/> 
    <link rel="related" type="text/html" href="http://livingcode.org/?p=87" />
          <content type="html"><![CDATA[<p>hi,</p>
<p>I&#8217;m trying to create an image in PIL, what I want to do is draw two polygons that overlap &#8230; how do you set a shapes fill opacity ? The effect that I&#8217;m trying to achieve<br />
is like <a href="http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/" rel="nofollow">http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/</a></p>
]]></content>
        </entry>
  <entry>
    <id>http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-32</id>
    <updated>2008-12-11T09:12:22Z</updated>
    <title type="html"><![CDATA[Comment by: delza]]></title>
    <author>
<name><![CDATA[delza]]></name><uri>http://livingcode.org/</uri>    </author>
    <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-32" />
    <thr:in-reply-to ref="http://livingcode.org/?p=87" href="http://livingcode.org/?p=87" type="application/xhtml+xml" source="http://livingcode.org/wp-atom.php"/> 
    <link rel="related" type="text/html" href="http://livingcode.org/?p=87" />
          <content type="html"><![CDATA[<p>Hi Roger,  I enjoyed your post on generating the Mona Lisa using polygons.  Looking at the PIL documentation, I don&#8217;t see any way to draw polygons using opacity.  There is an optional PIL library, aggdraw, which supports opacity (alpha):</p>
<p><a href="http://effbot.org/zone/pythondoc-aggdraw.htm" rel="nofollow">http://effbot.org/zone/pythondoc-aggdraw.htm</a></p>
<p>I will try to make a follow-up post demonstrating some ways to draw polygons with opacity in Python shortly.</p>
]]></content>
        </entry>
  <entry>
    <id>http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-33</id>
    <updated>2008-12-11T11:10:16Z</updated>
    <title type="html"><![CDATA[Comment by: atm0s1]]></title>
    <author>
<name><![CDATA[atm0s1]]></name>    </author>
    <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-33" />
    <thr:in-reply-to ref="http://livingcode.org/?p=87" href="http://livingcode.org/?p=87" type="application/xhtml+xml" source="http://livingcode.org/wp-atom.php"/> 
    <link rel="related" type="text/html" href="http://livingcode.org/?p=87" />
          <content type="html"><![CDATA[<p>figured it out thanks to your aggdraw tip</p>
<p>from PIL import Image,ImageDraw<br />
import aggdraw<br />
img=Image.new(&#8217;RGBA&#8217;,(200,200),(255,255,255))<br />
d = aggdraw.Draw(img)<br />
p = aggdraw.Pen(&#8221;red&#8221;, 0.5,50)<br />
b = aggdraw.Brush(&#8221;red&#8221;)<br />
d.polygon([60,160,90,60,190,190,60,190],p,b)<br />
b = aggdraw.Brush(&#8221;yellow&#8221;,50)<br />
d.polygon([0,0,90,60,90,190,0,90],b)<br />
d.line((0, 0, 500, 500), p)<br />
d.flush()<br />
img.save(&#8217;test.png&#8217;,'PNG&#8217;)</p>
]]></content>
        </entry>
  <entry>
    <id>http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-34</id>
    <updated>2008-12-11T11:17:38Z</updated>
    <title type="html"><![CDATA[Comment by: delza]]></title>
    <author>
<name><![CDATA[delza]]></name><uri>http://livingcode.org/</uri>    </author>
    <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-34" />
    <thr:in-reply-to ref="http://livingcode.org/?p=87" href="http://livingcode.org/?p=87" type="application/xhtml+xml" source="http://livingcode.org/wp-atom.php"/> 
    <link rel="related" type="text/html" href="http://livingcode.org/?p=87" />
          <content type="html"><![CDATA[<p>Cool!  I&#8217;m looking forward to seeing how you wrote the genetic algorithm for Mona Lisa.  Glad if I could help in some small way.</p>
]]></content>
        </entry>
  <entry>
    <id>http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-35</id>
    <updated>2008-12-11T11:34:46Z</updated>
    <title type="html"><![CDATA[Comment by: atm0s1]]></title>
    <author>
<name><![CDATA[atm0s1]]></name>    </author>
    <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-35" />
    <thr:in-reply-to ref="http://livingcode.org/?p=87" href="http://livingcode.org/?p=87" type="application/xhtml+xml" source="http://livingcode.org/wp-atom.php"/> 
    <link rel="related" type="text/html" href="http://livingcode.org/?p=87" />
          <content type="html"><![CDATA[<p>i&#8217;ll give it a shot and post back the results ;-)</p>
]]></content>
        </entry>
  <entry>
    <id>http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-39</id>
    <updated>2009-01-03T11:54:39Z</updated>
    <title type="html"><![CDATA[Comment by: Living Code &#187; Blog Archive &#187; Drawing with opacity]]></title>
    <author>
<name><![CDATA[Living Code &raquo; Blog Archive &raquo; Drawing with opacity]]></name><uri>http://livingcode.org/2008/drawing-with-opacity</uri>    </author>
    <link rel="alternate" href="http://livingcode.org/2008/03/31/saving-png-from-pygame/comment-page-1#comment-39" />
    <thr:in-reply-to ref="http://livingcode.org/?p=87" href="http://livingcode.org/?p=87" type="application/xhtml+xml" source="http://livingcode.org/wp-atom.php"/> 
    <link rel="related" type="text/html" href="http://livingcode.org/?p=87" />
          <content type="html"><![CDATA[<p>[...] is something of a followup to earlier posts Drawing Hexmaps and Saving PNG from PyGame. A recent comment from Roger Aisling on the second of those posts asked about drawing with opacity [...]</p>
]]></content>
        </entry>
</feed>
