From e0152e2c260d6f92e099a5d921f18d84f15947b5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 3 Jun 2012 01:37:20 +0200 Subject: [PATCH] always compute tile based on index, otherwise sometimes keyframes16p0 gets keyframes16p1 --- oxtimelines/timeline.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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: