mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-02-18 21:20:28 +03:00
Simplified code
This commit is contained in:
parent
2a2638e58f
commit
fd8fa7df79
|
|
@ -141,7 +141,7 @@ class FpxImageFile(ImageFile.ImageFile):
|
|||
|
||||
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)
|
||||
|
|
@ -156,7 +156,6 @@ class FpxImageFile(ImageFile.ImageFile):
|
|||
|
||||
x = y = 0
|
||||
xsize, ysize = size
|
||||
xtile, ytile = tilesize
|
||||
self.tile = []
|
||||
|
||||
for i in range(0, len(s), length):
|
||||
|
|
@ -224,7 +223,7 @@ class FpxImageFile(ImageFile.ImageFile):
|
|||
msg = "unknown/invalid compression"
|
||||
raise OSError(msg)
|
||||
|
||||
x = x + xtile
|
||||
x += xtile
|
||||
if x >= xsize:
|
||||
x, y = 0, y + ytile
|
||||
if y >= ysize:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user