From 3cb9281d6dde2e6c6d7a3570317be0860186725e Mon Sep 17 00:00:00 2001 From: j Date: Mon, 5 Sep 2016 18:16:39 +0200 Subject: [PATCH] w should never be 0 --- pandora/item/timelines.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/item/timelines.py b/pandora/item/timelines.py index 861ee1df0..c3106ab44 100644 --- a/pandora/item/timelines.py +++ b/pandora/item/timelines.py @@ -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 )