[IMAGE-SIG] mods to TiffImagePlugin.py in Imaging-0.3a1

gregc@cgl.ucsf.EDU gregc@cgl.ucsf.EDU
Fri, 5 Sep 1997 23:53:27 -0700


I have a RGBA tiff file with no RowsPerStrip tag but a StripOffsets tag.
The enclosed diff to TiffImagePlugin.py allows the file to be read.  The
resulting image seems to be correct so I'm happy.
	
	Greg Couch
	gregc@cgl.ucsf.edu
-----
===================================================================
RCS file: RCS/TiffImagePlugin.py,v
retrieving revision 1.1
diff -c -r1.1 TiffImagePlugin.py
*** 1.1	1997/09/06 06:15:42
--- TiffImagePlugin.py	1997/09/06 06:48:41
***************
*** 196,202 ****
  	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]:
--- 196,205 ----
  	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]:

_______________
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________