[Image-SIG] IOError: image file is truncated, 312 bytes left in buffer

Paul Keeley pkeeley@insci.com
Tue, 5 Nov 2002 14:31:26 -0500


I am trying to convert a BMP file to TIF as follows:

img = Image.open(filename.bmp)
img.save(filename.tif)

every time it displays the error
IOError: image file is truncated, 312 bytes left in buffer

If I insert a img.show() between the two lines then sometimes it works and
sometimes it does not.  Any ideas?

Thanks,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paul Keeley
IDS Developer, INSCI                                   Tel: 508-870-4324
Two Westborough Business Park                   Fax: 508-870-5585
Suite 2000/2001                                            
Westborough MA 01581                               mailto: pkeeley@insci.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~