Merge pull request #2742 from radarhere/player

Fixed bug where player script was skipping the first image
This commit is contained in:
wiredfool 2017-09-19 10:40:36 +01:00 committed by GitHub
commit f3867f99f8

View File

@ -22,13 +22,10 @@ from PIL import Image, ImageTk
class UI(tkinter.Label): class UI(tkinter.Label):
def __init__(self, master, im): def __init__(self, master, im):
if isinstance(im, list):
# list of images
self.im = im[1:]
im = self.im[0]
else:
# sequence
self.im = im self.im = im
if isinstance(self.im, list):
# list of images
im = self.im.pop(0)
if im.mode == "1": if im.mode == "1":
self.image = ImageTk.BitmapImage(im, foreground="white") self.image = ImageTk.BitmapImage(im, foreground="white")