w should never be 0

This commit is contained in:
j 2016-09-05 18:16:39 +02:00
parent bf984fe256
commit 3cb9281d6d
1 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,9 @@ def join_tiles(source_paths, durations, target_path):
w = small_tile_last_w
data['target_images']['small'] = Image.new(image_mode, (w, small_tile_h))
# paste large tile into small tile
w = 60 if large_tile_i < large_tile_n - 1 else small_tile_last_w % 60
w = small_tile_last_w % 60
if not w or large_tile_i < large_tile_n - 1:
w = 60
data['target_images']['large'] = data['target_images']['large'].resize(
(w, small_tile_h), Image.ANTIALIAS
)