Option added to Image.UIpdate to create a new PhotoImage

This commit is contained in:
MikeTheWatchGuy 2018-08-21 13:10:05 -04:00
parent 23123c5320
commit 1d61773df6
1 changed files with 4 additions and 1 deletions

View File

@ -769,7 +769,10 @@ class Image(Element):
if filename is not None:
image = tk.PhotoImage(file=filename)
elif data is not None:
image = tk.PhotoImage(data=data)
if type(data) is bytes:
image = tk.PhotoImage(data=data)
else:
image = data
else: return
self.tktext_label.configure(image=image)
self.tktext_label.image = image