[SciPy-user] PIL and scipy conflicting

Travis E. Oliphant oliphant at ee.byu.edu
Fri Feb 20 09:37:28 CST 2004


Jon Peirce wrote:
> Hi all
> 
> I have scipy (0.2.0_alpha_212.4128) and PIL (1.1.4) installed on a winXP 
> machine and I'm getting a strange conflict. If scipy is imported second 
> (using a clean namespace) then Image can no longer 'open':
> 

You may be interested to know that if you have PIL installed then scipy 
has some commands that make opening and saving images to and from 
Numeric arrays even easier.  I have used these commands without incident .

arr = imread('somefile.jpg')
imsave('newfile.jpg',arr)

One big difference is that the image is read in to a Numeric array 
(which of course an image should be thought of as anyway :-) )

Best,

Travis O.




More information about the SciPy-user mailing list