Re: help for conversion of NUMARRAY to PIL object

2005-09-16 Thread A. L.
Sorry, I make the mistakes. I have known how to use to/fromstring method to interface between PIL and Numarray. And your code does work. Another question. Just like the code you provide, is it possible to directly load image data from PIL to Numarray array without use of to/fromstring method?

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread Robert Kern
A. L. wrote: > Thanks. But some problems remain. > > I have known using Image.tostring/fromstring and > numarray.tostring/fromstring can do the job. But when confronting > multi-spectral images, e.g., RGB color images, I don't know how to do > it. Could you give some advices on that? What's not w

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread A. L.
Thanks. But some problems remain. I have known using Image.tostring/fromstring and numarray.tostring/fromstring can do the job. But when confronting multi-spectral images, e.g., RGB color images, I don't know how to do it. Could you give some advices on that? You wrote "In [14]: img = Image.fromb

Re: help for conversion of NUMARRAY to PIL object

2005-09-15 Thread Robert Kern
A. L. wrote: > hi, everybody here, > > I am a newbie to python. I encounter a problem that how to convert > an array of numarray to pil object. For example, the data in an image > is extracted using Image.getdata, then the data are converted into an > array in numarray. But when the array is

help for conversion of NUMARRAY to PIL object

2005-09-15 Thread A. L.
hi, everybody here, I am a newbie to python. I encounter a problem that how to convert an array of numarray to pil object. For example, the data in an image is extracted using Image.getdata, then the data are converted into an array in numarray. But when the array is needed to convert to the