my programs, put a img on the screen, is very simple because i'm trying to understand the behavior of the matter,i got stuck trying to find a way to make the img fit to my resolution and resize within my resolution range as any img editor does it, if anyone find a solution for that i would apreciatte it, because i've been looking on the internet for some time now ,and i'm stuck, my resolution of screen is 1366x 768 and the img is 1080x1513, is there an way to scale the img down or something like that, also if u find a way using label, isnted of canvas i would appreciate
from tkinter import*
from PIL import ImageTk, Image
root = Tk()
root.title('Calculator')
root.iconbitmap(r'C:\Users\username123\Desktop\calculator\icon.ico')
root.geometry("800x500")
myimg = Image.open(
r"C:\Users\username123\Desktop\calculator\img/printer.jpg")
myimg.resize((450, 350), Image.ANTIALIAS)
my_img = ImageTk.PhotoImage(myimg)
canvas = Canvas(root, width=1000, height=1000)
canvas.pack()
canvas.create_image(0, 0, anchor=NW, image=my_img)
root.mainloop()