Am 05.12.13 21:26, schrieb tastyminerals:
Hi, I am getting an error when trying to use Pillow library to display
image PNG  on a Tkinter Button widget. Here is my code.

|image=  Image.open(os.path.join('icons','bulb.png'))  # using PIL for png 
images
         self.correctGuessImage=  ImageTk.PhotoImage(image)

I don't know what is the problem here, but Tk supports PNG natively from 8.5 onwards; just use

        self.correctGuessImage=  ImageTk.PhotoImage(file='bulb.png')

Christian
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to