I load an image this way:
from PIL import Image
im = Image.open('test.png')
gives me the following error:
IOError: [Errno 2] No such file or directory: 'test.png'
I have saved the image 'test.png' on the desktop.
So where should I save the image?
You need to give the directory where the file is located. So if you put in desktop it should go something like this:
Image.open('C:\Users\$(your_user_name)\Desktop\test.png')
or move the file "test.png" to folder where your script is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With