Apr-05-2019, 12:59 AM
(Apr-04-2019, 03:34 AM)woooee Wrote: This page referenced above, opens a jpeg and places it on a Label. Your code would be similar to place it on a Canvas https://effbot.org/tkinterbook/photoimage.htm
So here is the updated version. File exists as if I delete it, the program gives me a traceback showing it's missing. Like this, no errors but a blank canvas.
from Tkinter import * from PIL import Image, ImageTk root = Tk() # Remove titlebar root.overrideredirect(1) canvas = Canvas(root, width =100,height=153) image = Image.open("pngs/a.jpg") logo = ImageTk.PhotoImage(image) #logo=PhotoImage(file="pngs/a.jpg) canvas.create_image(200, 200, image=logo) #Change 0, 0 to whichever coordinates you need root.mainloop()If I only had the smarts to learn this stuff any more. Back in the days of wooden ships and iron men, all we had was FORTRAN.