Skip to content

Commit a92dca6

Browse files
committed
Use raw size for striped tiles
1 parent a859695 commit a92dca6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PIL/TiffImagePlugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ def _setup(self) -> None:
15691569
if STRIPOFFSETS in self.tag_v2:
15701570
offsets = self.tag_v2[STRIPOFFSETS]
15711571
h = self.tag_v2.get(ROWSPERSTRIP, ysize)
1572-
w = self.size[0]
1572+
w = xsize
15731573
else:
15741574
# tiled image
15751575
offsets = self.tag_v2[TILEOFFSETS]
@@ -1603,9 +1603,9 @@ def _setup(self) -> None:
16031603
)
16041604
)
16051605
x = x + w
1606-
if x >= self.size[0]:
1606+
if x >= xsize:
16071607
x, y = 0, y + h
1608-
if y >= self.size[1]:
1608+
if y >= ysize:
16091609
x = y = 0
16101610
layer += 1
16111611
else:

0 commit comments

Comments
 (0)