[Image-SIG] tif file save problem

Robert B. Klimek klimek@grc.nasa.gov
Thu, 31 Aug 2000 09:09:19 -0400


Hello,

I've come across a possible bug in PIL. There is something weird with .tif
or .bmp images that are saved by PIL. If you load a .tif image that was
previously saved by PIL and try to paste and image into it, it will crash
the program. Below is a test case from Idle but the same happens in my
python program. My OS is NT 4, sp 3.

I'm using PIL 1.0. Is this fixed in PIL 1.1? Is there a fix?

 >>> import Image
 >>> im = Image.open('c:\\Images\\im001.tif')
 >>> im.save('c:\\Images\\test1.tif')
 >>> im2 = Image.open('c:\\Images\\test1.tif')
 >>> roi = im2.crop((10,10,50,50))
 >>> im2.paste(roi,(10,10,50,50))

The last line (paste) crashes the program and produces this error message.

Error messages:

On Win98 I get:
This program has performed an illegal operation and will be shut down.
If the problem persists, contact the program vendor.
Pythonw caused an invalid page fault in module _IMAGING.DLL at...

On NT I get:
The instruction at "0x00..." referenced memory at "0x00...". The memory
could not be written.

-------------------------------------------------
Robert B. Klimek
NASA Glenn Research Center 
robert.klimek@grc.nasa.gov
(216) 433-2837
--------------------------------------------------