[Image-SIG] PIL 1.1.2 win32 IOError saving BMP's
image-sig@lee-morgan.net
image-sig@lee-morgan.net
07 Jun 2001 15:17:40 +1000
Hi,
Anyone know why I get this?
I can save from jpg to png ok, its just saving to a bitmap that fails.
Cheers
Lee
Traceback (most recent call last):
File "bmptopng.py", line 74, in ?
img.convert("RGB").save( open(name + '.bmp', 'wb'), "BMP" )
File "c:\python20\pil\Image.py", line 723, in save
SAVE[string.upper(format)](self, fp, filename)
File "c:\python20\pil\BmpImagePlugin.py", line 199, in _save
ImageFile._save(im, fp, [("raw", (0,0)+im.size, 0, (rawmode, stride, -1))])
File "c:\python20\pil\ImageFile.py", line 374, in _save
s = e.encode_to_file(fh, bufsize)
IOError: (0, 'Error')
script:
if __name__ == "__main__":
path = <filename>
img = Image.open( path )
(name,ext) = os.path.splitext( path)
img.save( name + ".bmp" )
#img.convert("RGB").save( open(name + '.bmp', 'wb'), "BMP" )
--
image-sig