[Image-SIG] 2 bug fix patches for Imaging-1.0b1
gregc@cgl.ucsf.EDU
gregc@cgl.ucsf.EDU
Mon, 28 Jun 1999 17:25:51 -0700 (PDT)
Enclosed are two patches: one patch for PIL/ImageTk.py which allows PIL
to work with multiple Tk interpreters (we run grail in a separate
interpreter for application help and tutorials), and one for
PIL/TiffImagePlugin.py so it recognizes more TIFF files (we still
use Nextstep).
Greg Couch
gregc@cgl.ucsf.edu
----
*** ImageTk.py 1999/06/17 22:49:47 1.1
--- ImageTk.py 1999/06/17 22:54:02
***************
*** 171,179 ****
class UI(Tkinter.Label):
def __init__(self, master, im):
if im.mode == "1":
! self.image = BitmapImage(im, foreground="white")
else:
! self.image = PhotoImage(im)
Tkinter.Label.__init__(self, master, image=self.image,
bg="black", bd=0)
--- 171,179 ----
class UI(Tkinter.Label):
def __init__(self, master, im):
if im.mode == "1":
! self.image = BitmapImage(im, foreground="white", master=master)
else:
! self.image = PhotoImage(im, master=master)
Tkinter.Label.__init__(self, master, image=self.image,
bg="black", bd=0)
*** TiffImagePlugin.py 1999/06/17 22:51:09 1.1
--- TiffImagePlugin.py 1999/06/17 22:53:45
***************
*** 209,215 ****
self.tile = []
if self.tag.has_key(273):
# striped image
! h = self.tag[278][0]
w = self.size[0]
a = None
for o in self.tag[273]:
--- 209,218 ----
self.tile = []
if self.tag.has_key(273):
# striped image
! if self.tag.has_key(278):
! h = self.tag[278][0]
! else:
! h = self.size[1]
w = self.size[0]
a = None
for o in self.tag[273]: