-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI.py
More file actions
28 lines (22 loc) · 698 Bytes
/
GUI.py
File metadata and controls
28 lines (22 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from tkinter import * # pip install tkinter
from PIL import Image, ImageTk, ImageSequence # pip install Pillow
import time
root = Tk()
root.geometry("1000x500")
root.title("Sapphire") # Add the title "Sapphire"
def play_gif():
root.lift()
root.attributes("-topmost", True)
global vid
vid = vid.open("original-3b009b0c0dccfa3891b49158bb3dbd81") # Enter the gif address
lbl = Label(root)
lbl.place(x=0, y=0)
i = 0
for vid in ImageSequence.Iterator(vid):
vid = vid.resize((1000, 500))
vid = ImageTk.PhotoImage(vid)
lbl.config(video=vid)
root.update()
time.sleep()
play_gif()
root.mainloop()