Skip to content

Commit 90d73d2

Browse files
committed
Fixed image issue
1 parent 07070e5 commit 90d73d2

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

Hacker.jpg

102 KB
Loading

Hacker.png

190 KB
Loading

Load an Image [Any Types].py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
root = tk.Tk()
1010
root.title("Image")
11-
root.geometry('600x800')
1211

13-
image1 = ImageTk.PhotoImage(Image.open('picture.jpg'))
12+
13+
image1 = ImageTk.PhotoImage(Image.open('Hacker.jpg'))
1414
label = tk.Label(root, image=image1).pack()
1515

1616
root.mainloop()

Load an Image.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,22 @@
88
from tkinter import *
99
root= Tk()
1010

11-
image1 = PhotoImage(file="logo.png") #By tkinter PhotoImage module you can workwith .png only
11+
image1 = PhotoImage(file="Hacker.png") #By tkinter PhotoImage module you can workwith .png only
1212

13-
label = Label(root,image=image1,width=400,height=400,bg="#a7d6dc").pack()
13+
label = Label(root,image=image1,bg="#a7d6dc").pack()
1414

1515
root.mainloop()
16+
17+
18+
#So here's and hack you will find if you run this code with the appropriate image :
19+
#Hack is :
20+
'''
21+
If you wanna add any jpg file with tkinter module then all you have to do is
22+
convert your image with appropriate height and width then do it
23+
and sing :
24+
I am begining feel like a Hacker good, Hacker good
25+
all my code are from front to the back nod, back nod
26+
now, who things their lengths are not long enough to Hack-box :) :))
27+
They said I Hack like Mr.Robot, so call me elliot.....
28+
29+
'''

0 commit comments

Comments
 (0)