<br><br><div><span class="gmail_quote">On 6/10/06, <b class="gmail_sendername">Johann C. Rocholl</b> &lt;<a href="mailto:johann@rocholl.net">johann@rocholl.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm working on simple module to write PNG image files in pure python.<br>Adding it to the standard library would be useful for people who want<br>to create images on web server installations without gd and imlib, or<br>on platforms where the netpbm tools are not easily available.
<br><br>Does anybody find this idea interesting?</blockquote><div><br><br>Yes, although I wouldn't want an interface taking in strings but something more like an iterator that returns each row which itself contains int triples.&nbsp; In other words more array-based than string based.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Does anybody think it could go into stdlib before the feature freeze for 2.5?</blockquote>
<div><br>Nope.&nbsp; To get added to the stdlib there needs to be support from the community that the module is useful and best-of-breed.&nbsp; Try posting on <a href="http://c.l.py">c.l.py</a> and see if people pick it up and like it.&nbsp; No way that is going to happen before b1.&nbsp; But there is always 
2.6 .<br><br>-Brett <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The module consists of only one file. It imports only sys, zlib,
<br>struct (maybe re for testing).<br>Some benchmarks for comparison with the pnmtopng program (from<br>netpbm), encoding a plain RGB file with 24 bits per pixel, input file<br>size 11520017 bytes (11M), measured with the 'time' command, including
<br>Python interpreter start-up:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pnmtopng&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;png.py<br>straight encoding&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.31 seconds&nbsp;&nbsp;&nbsp;&nbsp;0.72 seconds<br>resulting file size&nbsp;&nbsp;&nbsp;&nbsp; 342953 bytes&nbsp;&nbsp;&nbsp;&nbsp;292885 bytes<br>interlaced encoding&nbsp;&nbsp;&nbsp;&nbsp; 
3.78 seconds&nbsp;&nbsp;&nbsp;&nbsp;4.88 seconds<br>resulting file size&nbsp;&nbsp;&nbsp;&nbsp; 422441 bytes&nbsp;&nbsp;&nbsp;&nbsp;346872 bytes<br><br>The source code of the module lives here:<br><a href="http://svn.browsershots.org/trunk/shotfactory/lib/image/png.py">http://svn.browsershots.org/trunk/shotfactory/lib/image/png.py
</a><br><a href="http://trac.browsershots.org/browser/trunk/shotfactory/lib/image/png.py">http://trac.browsershots.org/browser/trunk/shotfactory/lib/image/png.py</a><br><br>I am willing to maintain the module for 5+ years, as it is a small but
<br>important part of my main project. I am also willing to write latex<br>documentation and tests for the module, and I think I could do that<br>within the next three days. The module is licensed under the Apache<br>License 
2.0, and I am ready to sign a contributor agreement for the<br>PSF.<br><br>I will probably add support for more different PNG formats, especially<br>alpha channel transparency, and then maybe color palettes. I don't<br>plan to add PNG decoding because it would make the module much larger
<br>and rather complex.<br><br>Sorry if this contribution seems brash. Perhaps it is easy enough to<br>download and deploy my module separately. But I thought that if there<br>is a chance to get it in before beta1, I should not hesitate and just
<br>ask.<br><br>Cheers,<br>Johann<br>_______________________________________________<br>Python-Dev mailing list<br><a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/python-dev">
http://mail.python.org/mailman/listinfo/python-dev</a><br>Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/brett%40python.org">http://mail.python.org/mailman/options/python-dev/brett%40python.org</a>
<br></blockquote></div><br>