self.full_tile_widths[0] can be 0

This commit is contained in:
j 2016-06-20 18:33:17 +02:00
parent 150639ced3
commit 8a2f6085ed

View file

@ -389,10 +389,11 @@ class Timelines():
self.full_tile_image = Image.new('RGB', (self.full_tile_w, self.large_tile_h)) self.full_tile_image = Image.new('RGB', (self.full_tile_w, self.large_tile_h))
def _save_full_tile_image(self, mode): def _save_full_tile_image(self, mode):
resized = self.large_tile_image[mode].resize(( if self.full_tile_widths[0] > 0 and self.large_tile_h > 0:
self.full_tile_widths[0], self.large_tile_h resized = self.large_tile_image[mode].resize((
), Image.ANTIALIAS) self.full_tile_widths[0], self.large_tile_h
self.full_tile_image.paste(resized, (self.full_tile_offset, 0)) ), Image.ANTIALIAS)
self.full_tile_image.paste(resized, (self.full_tile_offset, 0))
self.full_tile_offset += self.full_tile_widths[0] self.full_tile_offset += self.full_tile_widths[0]
self.full_tile_widths = self.full_tile_widths[1:] self.full_tile_widths = self.full_tile_widths[1:]