Cropping an image in tkinter
问题 I'm using tkinter and I have a "sprite sheet" and I want to cut it into multiple images. I tried PIL: img = Image.open("test.png").convert("RGBA") img2 = img.crop([300,300,350,350]) image = ImageTk.PhotoImage(img2) win = tk.Tk() label = tk.Label(win, image = image) label.pack() but on my window, there is only an empty white rectangle and I don't understand why. Moreover I tried img2.show() just to make shure that img2 wasn't empty and it wasn't. 回答1: Here is your code, with a few changes.