mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Use raw size for striped tiles
This commit is contained in:
parent
a859695d9a
commit
a92dca66bd
|
@ -1569,7 +1569,7 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
if STRIPOFFSETS in self.tag_v2:
|
||||
offsets = self.tag_v2[STRIPOFFSETS]
|
||||
h = self.tag_v2.get(ROWSPERSTRIP, ysize)
|
||||
w = self.size[0]
|
||||
w = xsize
|
||||
else:
|
||||
# tiled image
|
||||
offsets = self.tag_v2[TILEOFFSETS]
|
||||
|
@ -1603,9 +1603,9 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
)
|
||||
)
|
||||
x = x + w
|
||||
if x >= self.size[0]:
|
||||
if x >= xsize:
|
||||
x, y = 0, y + h
|
||||
if y >= self.size[1]:
|
||||
if y >= ysize:
|
||||
x = y = 0
|
||||
layer += 1
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user