0

I’ve been trying to make an animation for a rotating crab image on tkinter, currently I’m just trying to get a simple rotation after a button. Right now I’ve tried creating a new file with the rotated image as well as creating a photoImage with the rotated image. Both times the image disappears instead of rotating. Any help would be appreciated! (note that labCrab2 is the original drawn crab)

def test(event):
    crabImgTemp = Image.open("Images/crab.png")
    newImg = ImageTk.PhotoImage(crabImgTemp.rotate(10))
    canvas.itemconfig(labCrab2,image = newImg)

0 Answers0