Option added to Image.UIpdate to create a new PhotoImage
This commit is contained in:
parent
23123c5320
commit
1d61773df6
|
@ -769,7 +769,10 @@ class Image(Element):
|
||||||
if filename is not None:
|
if filename is not None:
|
||||||
image = tk.PhotoImage(file=filename)
|
image = tk.PhotoImage(file=filename)
|
||||||
elif data is not None:
|
elif data is not None:
|
||||||
|
if type(data) is bytes:
|
||||||
image = tk.PhotoImage(data=data)
|
image = tk.PhotoImage(data=data)
|
||||||
|
else:
|
||||||
|
image = data
|
||||||
else: return
|
else: return
|
||||||
self.tktext_label.configure(image=image)
|
self.tktext_label.configure(image=image)
|
||||||
self.tktext_label.image = image
|
self.tktext_label.image = image
|
||||||
|
|
Loading…
Reference in New Issue