+ 5
Can I add image In python on sololearn
Can you?
3 Answers
+ 9
Yes:
import urllib.request as request
url = "https://... "
request.urlretrieve(url, 'image.png')
https://code.sololearn.com/c6aYc8Bv6seH/?ref=app
+ 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()
+ 5
How