fix multiline mode

This commit is contained in:
j 2021-08-16 18:26:09 +02:00
parent b9ac80398c
commit f3771f1b56

View file

@ -44,10 +44,9 @@ class Timelines():
self.render_slitscan = 'slitscan' in modes self.render_slitscan = 'slitscan' in modes
if 'multiline' in modes: if 'multiline' in modes:
info = ox.avinfo(video_files[0]) info = ox.avinfo(video_files[0])
self.render_multiline = info['video'][0]['width']
self.output_h = sizes[0] self.output_h = sizes[0]
sizes = [info['video'][0]['height']] + sizes[1:] sizes = [info['video'][0]['height']] + sizes[1:]
self.render_multiline = True self.render_multiline = info['video'][0]['width']
self._pool = ThreadPool(multiprocessing.cpu_count()) self._pool = ThreadPool(multiprocessing.cpu_count())
else: else:
self.render_multiline = False self.render_multiline = False
@ -460,7 +459,7 @@ class Timelines():
self.tile_path, line, 'slitscan', self.output_h, index, type self.tile_path, line, 'slitscan', self.output_h, index, type
) )
ox.makedirs(os.path.dirname(tile_file)) ox.makedirs(os.path.dirname(tile_file))
width = self.large_tile_image[mode][line].size[1] width = self.large_tile_image[mode][line].size[0]
img = self.large_tile_image[mode][line] img = self.large_tile_image[mode][line]
if self.output_h != self.large_tile_image[mode][line].size[0]: if self.output_h != self.large_tile_image[mode][line].size[0]:
img = img.resize((width, self.output_h), Image.BICUBIC) img = img.resize((width, self.output_h), Image.BICUBIC)