[Python-Dev] Add pure python PNG writer module to stdlib? (original) (raw)
Brett Cannon brett at python.org
Sun Jun 11 01:35:10 CEST 2006
- Previous message: [Python-Dev] Add pure python PNG writer module to stdlib?
- Next message: [Python-Dev] Add pure python PNG writer module to stdlib?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/10/06, Johann C. Rocholl <johann at rocholl.net> wrote:
I'm working on simple module to write PNG image files in pure python. Adding it to the standard library would be useful for people who want to create images on web server installations without gd and imlib, or on platforms where the netpbm tools are not easily available. Does anybody find this idea interesting?
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. In other words more array-based than string based.
Does anybody think it could go into stdlib before the feature freeze for 2.5
?
Nope. To get added to the stdlib there needs to be support from the community that the module is useful and best-of-breed. Try posting on c.l.py and see if people pick it up and like it. No way that is going to happen before b1. But there is always 2.6 .
-Brett
The module consists of only one file. It imports only sys, zlib,
struct (maybe re for testing). Some benchmarks for comparison with the pnmtopng program (from netpbm), encoding a plain RGB file with 24 bits per pixel, input file size 11520017 bytes (11M), measured with the 'time' command, including Python interpreter start-up: pnmtopng png.py straight encoding 1.31 seconds 0.72 seconds resulting file size 342953 bytes 292885 bytes interlaced encoding 3.78 seconds 4.88 seconds resulting file size 422441 bytes 346872 bytes
The source code of the module lives here: http://svn.browsershots.org/trunk/shotfactory/lib/image/png.py http://trac.browsershots.org/browser/trunk/shotfactory/lib/image/png.py I am willing to maintain the module for 5+ years, as it is a small but important part of my main project. I am also willing to write latex documentation and tests for the module, and I think I could do that within the next three days. The module is licensed under the Apache License 2.0, and I am ready to sign a contributor agreement for the PSF. I will probably add support for more different PNG formats, especially alpha channel transparency, and then maybe color palettes. I don't plan to add PNG decoding because it would make the module much larger and rather complex. Sorry if this contribution seems brash. Perhaps it is easy enough to download and deploy my module separately. But I thought that if there is a chance to get it in before beta1, I should not hesitate and just ask. Cheers, Johann
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/brett%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060610/53d33882/attachment.html
- Previous message: [Python-Dev] Add pure python PNG writer module to stdlib?
- Next message: [Python-Dev] Add pure python PNG writer module to stdlib?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]