diff --git a/oxtimelines/timeline.py b/oxtimelines/timeline.py index 8be0054..e3a2710 100644 --- a/oxtimelines/timeline.py +++ b/oxtimelines/timeline.py @@ -586,8 +586,8 @@ class Timelines(): # open small tile if small_tile_x == 0: image_mode = 'L' if mode == 'audio' else 'RGB' - self.small_tile_i = int(index / 60) - if self.small_tile_i < self.small_tile_n - 1: + small_tile_i = int(index / 60) + if small_tile_i < self.small_tile_n - 1: w = self.small_tile_w else: w = self.small_tile_last_w @@ -603,8 +603,9 @@ class Timelines(): self.small_tile_image[small_mode].paste(resized, paste) # save small tile if small_tile_x == self.small_tile_w - 60 or self.frame_i == self.frame_n - 1: + small_tile_i = int(index / 60) tile_file = '%stimeline%s%dp%d.jpg' % ( - self.tile_path, small_mode, self.small_tile_h, self.small_tile_i + self.tile_path, small_mode, self.small_tile_h, small_tile_i ) self.small_tile_image[small_mode].save(tile_file) if self.log: