Search code examples
pythontkinterpython-imaging-library

Python Image Library and Tkinter Clashing


I have an issue where PIL and Tkinter are not working together in the same program.

Basically, I tried to run my program and when it was on the line 'image.open()' it thought I was trying to call tkinter's image.open function and not PIL's because both Tk and PIL have the same 'image.' functions.

Mainly what I want to know is if there is a way to restrict tkinter from accessing a part of my code.


Solution

  • As it turns out this was actually not happening. I just had to change the image mode for it to work.