0

Good morning, everyone, I tried to import image logo.gif but got an error message saying the image does not exit. Appreciate your help. Dennis

from PIL import Image, ImageChops
from PIL.GifImagePlugin import getheader, getdata
img = Image.open("logo.gif")
img.show()

from tkinter import *
window = Tk()

imgLbl = Label( window, image = img )


TclError: image "<PIL.GifImagePlugin.GifImageFile image mode=P size=92x95 at 0x8C92B38>" doesn't exist
dennis
  • 119
  • 1
  • 8

1 Answers1

0

Please refer to this post Play Animations in GIF with Tkinter

This question seems to be a duplicate. You'll have to first convert the image to tK compatible image by the function PhotoImage present in ImageTk class.

ketan Shah
  • 88
  • 9