[Image-SIG] PIL, Python and memory issues.... HELP!
David Ascher
da@ski.org
Tue, 20 Apr 1999 22:00:40 -0700 (PDT)
On Tue, 20 Apr 1999, Kevin Cazabon wrote:
> Normally, images that would require being broken up into panels for my
> application would be in the 300MB-1.5GB range (which is huge, but I'm
> dealing with a continuous-tone photographic imagesetter at 305dpi which
> prints up to 50"x100").
Wow.
More usefully, I wonder if perhaps the format used by PIL internally isn't
VM-friendly. I also wonder if maybe a hack to PIL which used mmap() would
be a solution which would make it VM-friendly. If so, it might be easier
than to recode it in C (and possible would speed up PIL for 'smaller'
images as well.
A useful paper on mmap is found at:
http://www.zen-pharaohs.com/postscript/mmap.ps
and the mmapfile module (not needed for this, but while I'm at it) is at
ftp://starship.python.net/pub/crew/amk/new/
--david
PS: In general, I think that integrating mmap into Python data structures
would be a GoodThing (e.g. for NumPy).