[Image-SIG] Use of FFT with PIL objects??

Rob W. W. Hooft rob@hooft.net
Tue, 25 Apr 2000 09:36:43 +0200 (CEST)

>>>>> "BK" == Bob Klimek <robert.klimek@grc.nasa.gov> writes:

 >> It would be very convenient to use the FFT routines implemented in
 >> the Numeric package.  I expect I'd have to create a 2D 'array'
 >> object from 'im', unless by great good fortune the Numeric package
 >> is already familiar with Image objects (unlikely I'd guess).  That
 >> suggests I'd need to extract the data from the image object.

 BK> Since I doubt that NumPy understands PIL image format, you'll
 BK> have to convert the image to a linear array of integers and then
 BK> read it into NumPy.

I think it is a better idea to use im.tostring() and the Numpy
fromstring() routines. Twhere is currently no direct connection between
the two packages.


=====   rob@hooft.net          http://www.xs4all.nl/~hooft/rob/  =====
=====   R&D, Nonius BV, Delft  http://www.nonius.nl/             =====
===== PGPid 0xFA19277D ========================== Use Linux! =========