Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/PIL/FpxImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _open_subimage(self, index: int = 1, subimage: int = 0) -> None:

size = i32(s, 4), i32(s, 8)
# tilecount = i32(s, 12)
tilesize = i32(s, 16), i32(s, 20)
xtile, ytile = i32(s, 16), i32(s, 20)
# channels = i32(s, 24)
offset = i32(s, 28)
length = i32(s, 32)
Expand All @@ -156,7 +156,6 @@ def _open_subimage(self, index: int = 1, subimage: int = 0) -> None:

x = y = 0
xsize, ysize = size
xtile, ytile = tilesize
self.tile = []

for i in range(0, len(s), length):
Expand Down Expand Up @@ -224,7 +223,7 @@ def _open_subimage(self, index: int = 1, subimage: int = 0) -> None:
msg = "unknown/invalid compression"
raise OSError(msg)

x = x + xtile
x += xtile
if x >= xsize:
x, y = 0, y + ytile
if y >= ysize:
Expand Down
Loading