Does PIL ImageDraw create shape objects or stain pixels?
Jeff Brantley <[email protected]> Wed, 26 Oct 2011 17:49:33 -0400
| Newsgroups | gmane.comp.python.image |
|---|---|
| Message-ID | <CAAR5CL9suY5c0=meJ8t=hHfgz2wGsHBAik1jyygqbqZzKALA4w@mail.gmail.com> |
Hi, I am working on code to draw tens or hundreds of thousands of squares and connecting lines using the tkinter canvas, and it is incredibly slow because, as I understand it, the canvas keeps the individual shape objects around in memory and tests for the current visible bounding box to touch them, and redraws them. I am wondering whether PIL's ImageDraw module behaves in this manner, or whether it instead just paints the shapes onto a raw pixel buffer, effectively "staining" the pixels, rather than holding onto thousands of identical objects. I assume that this would be much faster if it is the case. Thanks for your help, Jeff _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig