more modulo
This commit is contained in:
parent
fed701b0c8
commit
951fcdf837
1 changed files with 2 additions and 2 deletions
|
@ -307,7 +307,7 @@ class Timelines():
|
||||||
self.large_tile_last_w = self.frame_n % self.large_tile_w or self.large_tile_w
|
self.large_tile_last_w = self.frame_n % self.large_tile_w or self.large_tile_w
|
||||||
if self.render_small_tiles:
|
if self.render_small_tiles:
|
||||||
self.small_tile_n = int(math.ceil(self.duration / self.small_tile_w))
|
self.small_tile_n = int(math.ceil(self.duration / self.small_tile_w))
|
||||||
self.small_tile_last_w =int(math.ceil(self.duration % self.small_tile_w))
|
self.small_tile_last_w =int(math.ceil(self.duration % self.small_tile_w)) or self.small_tile_w
|
||||||
|
|
||||||
if self.render_antialias:
|
if self.render_antialias:
|
||||||
self._open_full_tile()
|
self._open_full_tile()
|
||||||
|
@ -599,7 +599,7 @@ class Timelines():
|
||||||
if small_tile_x <= self.small_tile_image[small_mode].size[0] - 60:
|
if small_tile_x <= self.small_tile_image[small_mode].size[0] - 60:
|
||||||
w = 60
|
w = 60
|
||||||
else:
|
else:
|
||||||
w = self.small_tile_last_w % 60
|
w = self.small_tile_last_w % 60 or 60
|
||||||
resize = (w, self.small_tile_h)
|
resize = (w, self.small_tile_h)
|
||||||
resized = self.large_tile_image[mode].resize(resize, Image.ANTIALIAS)
|
resized = self.large_tile_image[mode].resize(resize, Image.ANTIALIAS)
|
||||||
paste = (small_tile_x, 0)
|
paste = (small_tile_x, 0)
|
||||||
|
|
Loading…
Reference in a new issue