Interesting, but I'm especially impressed by how well PIL stands up to VIPS. It looks like vips was primarily designed to have a small memory imprint, especially for image files that are larger than physical memory. PIL takes only about 1.5 times as long as vips on a dual core processor, so I wonder how much of that may be due to PIL's inefficient use of multiprocessors?
A 1.5 times speedup doesn't seem to me to be a very compelling reason to drop PIL as the default imaging library, especially since PIL has a nice python interface and plays nicely with numpy. I couldn't find out how well vips plays with numpy --- is it easy (and fast) to convert back and forth between vips images and numpy arrays? The PIL memory use looks kind of high, but I can't tell from those tests if thats a systemic problem related to large 5k x 5k arrays or if its a standard PIL overhead. If its related to a scaling factor of the size of the array, then 180M / 25M is a pretty big memory scale factor and could be an issue, but if there's just a constant overhead to PIL then its pretty easy to ignore. I'd like to hear what other people think: is that factor of 1.5 or 2.0 in speed enough to motivate switching to vips for the default sage imaging library? On Jul 13, 1:02 pm, David Joyner <[email protected]> wrote: > On Mon, Jul 13, 2009 at 2:16 PM, Ondrej Certik<[email protected]> wrote: > > > On Sun, Jul 12, 2009 at 8:30 PM, David Joyner<[email protected]> wrote: > > ... > > > > > So what are the arguments against PIL and for VIPS? > > Here are two reasons ("Why use > VIPS?")http://www.vips.ecs.soton.ac.uk/supported/7.18/doc/html/vipsmanual/vi... > and ("libvips > overview")http://www.vips.ecs.soton.ac.uk/index.php?title=Libvips > In particular, it is scalable and certainly more "state of the art" than PIL. > The pagehttp://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use > explains how it is faster than PIL, Octave, Imagemagick, and others. > > > > > What I hate about PIL is the lack of docstrings with example doctests. > > But honestly, I hate this about Python standard library too! > > ... > > > > >http://www.pythonware.com/library/pil/handbook/index.htm > > which is not bad, but sphinx is better. > > VIPS has much better documentation, however, it is written in C++ with > swig Python > wrappers (http://www.vips.ecs.soton.ac.uk/index.php?title=Python) , so > it is better to > readhttp://www.vips.ecs.soton.ac.uk/supported/7.18/doc/html/vipsmanual/vi... > or the man pages for each > commandhttp://www.vips.ecs.soton.ac.uk/supported/7.18/doc/html/man/ > Needed are pythonic docstrings though. > > This is a more complicated package than PIL, but I think one should work with > it > (which I plan to do) before proposing what Sage should include. > > > > > Ondrej --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
