From: Perry G. <pe...@st...> - 2004-03-10 15:57:20
|
> > Hi Perry, > You may not be aware that, although not officially supported, Lundh > provided the following sample code (which I have used successfully to read > bmp files and do fft's on them) for converting PIL to/from Numeric arrays > via strings. It is quite fast. I think I probably found it in an email > archive, > Gary Ruben > Thanks for showing the code. I guess what I was referring to was that native support by PIL would eliminate unnecessary memory copies which occur when fromstring and tostring are used. But as I argue in a previous message, I'm not currently worried that much about that, but it seems that it would be nice if it weren't necessary to go through that copying (from PIL image to string to array rather than directly from PIL image to array) [And I *meant* to check the spelling of Fredrik's name; I have a hard time remembering the correct spelling :-) ] Perry |