problem with scipy and pil

Paul Gross dl at grosss.net
Mon May 26 17:55:20 EDT 2003


I seem to have a problem when I use both the Python Imaging Library and 
SciPy.  For example, the following code works fine:

	import Image

	img = Image.new("RGB", (300,300), (0,0,0))
	img.show()


but merely adding an import to scipy gives an error.  For example, the 
following code:

	import Image
	import scipy

	img = Image.new("RGB", (300,300), (0,0,0))
	img.show()

dies with the error:

Traceback (most recent call last):
   File "temp2.py", line 7, in ?
     img.show()
   File "e:\python22\py22\PIL\Image.py", line 749, in show
     _showxv(self, title, command)
   File "e:\python22\py22\PIL\Image.py", line 1042, in _showxv
     file = self._dump(format=format)
   File "e:\python22\py22\PIL\Image.py", line 338, in _dump
     self.save(file, format)
   File "e:\python22\py22\PIL\Image.py", line 729, in save
     SAVE[string.upper(format)](self, fp, filename)
KeyError: BMP


Anyone know what's going on here?





More information about the Python-list mailing list