Here is a bit of my code:
from PIL import Imageimage = Image.open('fall-foliage-1740841_640.jpg')
image.show()
The error is when the default photo viewer is started and shows the error
"It looks like the image was moved or renamed"
Restarting doesn't help. I am just starting using PIL and can't find a way round this.
I appreciate any help. Thanks!!!
You can just add a prompt to keep the python script from closing.
from PIL import Imageimage = Image.open('fall-foliage-1740841_640.jpg')image.show()input()
Essentially, The problem is that when the image is opened, it's stored in temporary memory. So when the program closes, the image is not saved and is lost from memory. There for when the Photos app or whatever app you are using to view the image, searches for the image, it's already gone when the script is finished executing.
Hope this helps