+ 5

Can I add image In python on sololearn

Can you?

13th Apr 2021, 12:04 AM
Codemurai
Codemurai - avatar
3 odpowiedzi
+ 9
Yes: import urllib.request as request url = "https://... " request.urlretrieve(url, 'image.png') https://code.sololearn.com/c6aYc8Bv6seH/?ref=app
13th Apr 2021, 12:10 AM
Solo
Solo - avatar
+ 7
from tkinter import * from PIL import ImageTk,Image. root = Tk() canvas = Canvas(root, width = 300, height = 300) canvas.pack() img = ImageTk.PhotoImage(Image.open("ball.png")) canvas.create_image(20, 20, anchor=NW, image=img) root.mainloop()
21st Nov 2021, 3:41 AM
Vaibhav
Vaibhav - avatar
+ 5
How
13th Apr 2021, 12:11 AM
Codemurai
Codemurai - avatar