Re: [Matplotlib-users] Images and memory management

2009-10-11 Thread Leo Trottier
Hi Michael, I suppose I'm a bit confused -- I thought that jpeglib, part of which is implemented by PIL (??) could process compressed images without representing decompressing them to a dense raster-image matrix (http://en.wikipedia.org/wiki/Jpeglib). That said, I tried to do some PIL things,

Re: [Matplotlib-users] Images and memory management

2009-10-11 Thread Robert Kern
Leo Trottier wrote: Hi Michael, I suppose I'm a bit confused -- I thought that jpeglib, part of which is implemented by PIL (??) Other way around. PIL uses jpeglib to read JPEG files. could process compressed images without representing decompressing them to a dense raster-image matrix

Re: [Matplotlib-users] Images and memory management

2009-10-05 Thread Leo Trottier
Hi, I think I've figured out what's going on. It's a combination of things: 1) iPython is ignorant of the problems associated with caching massive data output 2) iPython doesn't seem to have a good way to clear data from memory reliably (https://bugs.launchpad.net/ipython/+bug/412350) 3)

Re: [Matplotlib-users] Images and memory management

2009-10-02 Thread Michael Droettboom
If you assign each figure to a new number, it will keep all of those figures around in memory (because pyplot thinks you may want to use it again.) The best route is to call close('all') or fig.close() with each loop iteration. 40MB per image doesn't sound way out of reason to me. How big

[Matplotlib-users] Images and memory management

2009-10-01 Thread Leo Trottier
I have a friend who's having strange memory issues when opening and displaying images (using Matplotlib). Here's what he says: ### pylab seems really inefficient: Opening a few images and displaying them eats up tons of memory, and the memory doesn't get