[Image-SIG] Does PIL ImageDraw create shape objects or stain pixels?

Jeff Brantley jsbmsu at gmail.com
Wed Nov 2 22:17:18 CET 2011


Thank you both for the feedback. In the meantime, I made some major changes
to my drawing algorithm that resulted in about a 20X reduction in width and
probably a similar factor reduction in the number of line objects drawn.
Now the tk canvas performance problems are virtually gone, so it seems I
can continue prototyping with it.

But it is nice to know in future if the drawing size scales up again by an
order of magnitude, that ImageDraw may be the answer.

Thanks again,
Jeff

On Wed, Nov 2, 2011 at 4:35 PM, Edward Cannon <edward at unicornschool.org>wrote:

> I have written code that draws maybe 10K objects (circles) on a single
> canvas. No real performance issues there at all, at least not in
> regards to memory. The bottleneck in my program was another part of
> the code, not drawing the shapes so I can't be positive that it is not
> slow to draw, but it didn't seem so to me.
>
> On Wed, Nov 2, 2011 at 11:42 AM, James <virtue at rocketmonkeys.com> wrote:
> > AFAIK, ImageDraw is a raster-based library, not object or vector
> > based.  So I don't think any objects are kept around, and changes
> > simply happen to a buffer.  I could be wrong.
> >
> > That's not to say there aren't other performance issues to watch out
> > for.  But I don't imagine that simply drawing a ton of shapes will
> > overload memory in ImageDraw like it would in a lib that saves object
> > information.
> >
> > -James
> > _______________________________________________
> > Image-SIG maillist  -  Image-SIG at python.org
> > http://mail.python.org/mailman/listinfo/image-sig
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20111102/b38f0cd3/attachment-0001.html>


More information about the Image-SIG mailing list