I would like to use images with tkinter's canvas but I can't open image with Pillow. In fact, I have all my images in the same folder as my code but when I put "icon.png" it doesn't work. Then when I put the full path to the image (C:/Users/myName/Desktop/PythonWork/game/src/icon.png) , it works.
File "F:\Python\lib\site-packages\PIL\Image.py", line 2312, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'icon.png'
Therefore my question is : How do I make the relative path to work ?
Thanks in advance for your help :)